Repository navigation
Documentation update: Cache fallback feature and system_status table - #7
Merged
Merged
Conversation
Co-authored-by: surrealwolf <7536859+surrealwolf@users.noreply.github.com>
Co-authored-by: surrealwolf <7536859+surrealwolf@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update and consolidate project documentation
Documentation update: Cache fallback feature and system_status table
Oct 21, 2025
surrealwolf
marked this pull request as ready for review
October 21, 2025 04:24
surrealwolf
approved these changes
Oct 21, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates all project documentation to reflect the cache-fallback feature and system_status table introduced in PR #4. The documentation now accurately describes the system's ability to serve cached data during upstream API outages, the new 503 error semantics, and the enhanced database schema with the system_status table for tracking upstream API health.
Key Changes:
- Added comprehensive cache fallback documentation across all relevant files
- Documented the new system_status table and its purpose
- Clarified error code semantics (404 vs 503 vs 500) for API consumers
- Updated architecture diagrams to show cache fallback flow
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/ARCHITECTURE.md | Added cache fallback flow diagram, system_status table schema, and updated API lifecycle to include upstream status tracking |
| docs/API.md | Documented cache fallback behavior on 5 endpoints, added 503 error responses with examples, and explained status code semantics |
| README.md | Added cache fallback to features list, documented all 8 database tables, added cache fallback strategy section, and updated troubleshooting guide |
| DEVELOPMENT.md | Added cache fallback implementation guide, system_status table documentation, and database migration notes |
| .github/copilot-instructions.md | Updated component descriptions with accurate line counts and table counts, added cache fallback pattern guide |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR comprehensively updates all project documentation to reflect the cache-fallback feature and system_status table introduced in #4. The documentation now accurately describes the current system architecture, error handling behavior, and database schema.
Changes Made
1. README.md - User-Facing Documentation
system_statustable)https://api.helldivers2.dev2. DEVELOPMENT.md - Developer Guide
get_latest_*_snapshot()) and status tracking methodssystem_statustable purpose and usageCREATE TABLE IF NOT EXISTS)3. docs/API.md - API Reference
GET /api/campaignsGET /api/planetsGET /api/planets/{planet_index}GET /api/factionsGET /api/biomes4. docs/ARCHITECTURE.md - System Architecture
set_upstream_status()is called5. .github/copilot-instructions.md - AI Agent Instructions
INSERT OR REPLACE)6. Documentation Cleanup
*_SUMMARY.md,COMPLETE_GUIDE.md, etc.)Cache Fallback Feature Summary
The cache-fallback feature provides graceful degradation when the upstream Hell Divers 2 API is unavailable:
Behavior:
200 OKwith cached data (transparent to client)503 Service UnavailableSystem Status Tracking:
system_statustable tracksupstream_api_availablebooleanDatabase Changes:
system_statuswith indexedstatus_keycolumnget_latest_*_snapshot()for cache retrievalset_upstream_status()andget_upstream_status()CREATE TABLE IF NOT EXISTS(no manual steps required)Testing
All changes are documentation-only. Verified:
python -m py_compile src/*.py)Related Issues
Closes #5
Documentation Stats
For API Consumers: The cache-fallback feature improves uptime during upstream outages. A
200 OKresponse may now contain cached data. Implement retry logic for503responses, as they indicate both upstream failure AND no cached data available.For Developers: See DEVELOPMENT.md for the cache fallback implementation pattern and how to add it to new endpoints.
Original prompt
Fixes #5
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.