Keep Forge UI available when provider startup fails - #928
Open
wesm wants to merge 1 commit into
Open
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>
roborev: Combined Review (
|
mariusvniekerk
added a commit
that referenced
this pull request
Aug 18, 2026
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>
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.
Summary
Forge is an offline snapshot of provider data. Before this change, a GitHub token or identity lookup failure during startup terminated the daemon. The daemon then entered a restart loop, so the local snapshot was unavailable whenever GitHub was unavailable.
Provider startup is now best-effort when sync is enabled:
flowchart LR A[GitHub unavailable] --> B[Provider bootstrap fails] B --> C[Serve cached SQLite snapshot] C -. restart after recovery .-> D[Provider sync resumes]The UI stays available with the last successful snapshot. Provider-backed reads and writes remain unavailable until the provider can be initialized again. Explicit no-sync startup errors remain fatal.
Verification