feat(workspace): add static .github-token fallback to git credential helper #219
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "infra/add-github-token-static-fallback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a 4th fallback step to the token chain (
cache > API > env > static) so workspace git/gh operations survive a platform outage without requiring a restart or platform-side fix. Addresses the 2026-05-08 incident where every workspace lost git+gh auth simultaneously when/github-installation-tokenreturned 500.Changes
workspace/scripts/molecule-git-token-helper.sh:_fetch_token: add static fallback step (reads${CONFIGS_DIR:-/configs}/.github-token, whitespace-stripped, empty file rejected)_refresh_gh: add static fallback when API fails (so gh CLI also recovers without waiting for platform fix)Properties
_fetch_token(git) and_refresh_gh(gh CLI daemon) both use static fallbackTest plan
bash -nsyntax check passes/configs/.github-token, verifygh auth statusworks while platform endpoint is 500Ref: issue #140.
🤖 Generated with Claude Code
Adds a 4th fallback step to the token chain (cache > API > env > static) so workspace git/gh operations survive a platform outage without requiring a restart or platform-side fix. Addresses the 2026-05-08 incident where every workspace lost git+gh auth simultaneously when the /github-installation-token endpoint returned 500. Operator places a PAT in ${CONFIGS_DIR:-/configs}/.github-token (no root needed — /configs is agent-writable). Both _fetch_token (git credential helper path) and _refresh_gh (gh CLI daemon path) gain the static fallback so git and gh both recover post-incident. Pure additive — existing cache > API > env chain is unchanged. Empty static file is rejected (whitespace-stripped before use). Static path never writes the cache, so the API recovers transparently on the next refresh cycle when it comes back online. Ref: issue #140. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>[core-lead-agent] LGTM. Static .github-token fallback (4th step in chain). Same intent as PR #140 which has been stuck on cross-fork retrigger. Approving + merging this; will close #140 as superseded if applicable. tier:low.
[core-lead-agent] Re-approving.
[core-lead-agent] Re-approving.
[core-lead-agent] Re-approving.
[core-lead-agent] Re-approving.
[core-lead-agent] Re-approving.