fix: keep local archive available during GitHub outages - #932
fix: keep local archive available during GitHub outages#932mariusvniekerk wants to merge 5 commits into
Conversation
Forge's LaunchAgent previously treated GitHub token and identity bootstrap errors as daemon-fatal. A transient GitHub API outage therefore caused launchd to restart the process and Caddy to return 502 instead of serving cached local data. Keep provider startup best-effort when sync is enabled. Fall back to an empty provider registry and preserve the SQLite-backed UI until the provider is available again. Explicit no-sync startup errors remain fatal. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
Forge resolved GitHub credentials and account identity before it could serve archived data. A transient provider outage could therefore block the local-first console from starting at all. Degrade only for temporary network, timeout, rate-limit, and server failures. Keep configured routes and scheduled sync active so normal cadence recovers automatically. Permanent authentication and configuration failures still stop startup. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
|
This overlaps with #928, i will let you reconcile |
PR #928 and this branch both kept the local archive available when GitHub startup failed. Keeping separate implementations would leave two fallback policies that disagree about permanent authentication and configuration errors. Retain this branch's transient-only fallback and scheduled recovery behavior while merging PR #928's history into the replacement change. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
|
looking |
GitHub App token minting can report exhausted primary or secondary rate limits as HTTP 403. Treating every 403 as permanent still prevented the local archive from starting during those rate-limit windows. Preserve response headers and use GitHub's rate-limit signals to distinguish temporary 403 responses from ordinary forbidden failures. Non-rate-limit 403 responses remain fatal. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
Transient GitHub bootstrap failures could still block archive APIs while startup resolved configured repositories. A transient route could also hide a later permanent credential failure. Use SQLite and config only when expanding repositories for a degraded provider-host. Validate credential routes independently so permanent errors still stop startup, and recognize structured secondary-rate-limit responses when headers are absent. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
Forge is a local-first console, but startup previously required GitHub credential and identity lookups to succeed before it served archived data. A temporary GitHub outage could therefore make the existing local archive unavailable.
This change treats only temporary network, timeout, rate-limit, and GitHub server failures as degraded startup. Forge preserves configured routes and normal scheduled sync, while using conservative host-level personal access token accounting until the next restart. Missing credentials, invalid configuration, and permanent authentication failures still stop startup.
The live daemon was not restarted during verification. The startup decision is covered by focused tests with injected upstream failures.
Validation
make test-short— 6,559 tests passed; 226 skipped.make lint-check— zero issues.generated by a clanker