Repository navigation
Conversation
Every machine pins its package independently, so a skill fix merged to main only reaches a host when someone re-runs bootstrap-agent there. A theme deleted on main stayed in use for a week that way. bin/refresh-agent compares the installed .release-revision against the tip of main and, when they differ, re-runs bootstrap-agent from the package being replaced, so the installer updates on the same tick. It reads url and tokenRef from the existing host config and never writes it. A matching pin prints one line and exits zero. A missing config, a missing package, a non-sha revision, and an unreachable GitHub each exit nonzero naming the failing step, because this runs unattended. --install --job-id writes the hourly LaunchAgent through the hub reporter and refuses to overwrite a plist it did not write. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two hourly runs, or one racing a manual bootstrap-agent, would both clear install-agent's guards and then race the agent-current relink. mini-host.py takes the same non-blocking flock around activate; a second runner now exits naming the lock step instead of interleaving. The documented and suggested job ids also have to follow the registry's <host>.launchd.<label> convention, and a wrong example in the one document telling operators how to run this is how the next drift starts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The first scheduled run failed on both hosts: the unauthenticated commits endpoint returned 504 in about 70ms, with an nginx-style HTML body rather than GitHub's JSON error, and kept doing so for minutes across two machines with separate egress while gh reached the same path fine. It later recovered on its own. git ls-remote read the ref exactly and instantly on both hosts throughout. It needs no media type, no unauthenticated rate limit, and no second network path, and it is the transport the tarball install already depends on. The tests patch fetch_tip by name, so the seam is unchanged; resolve_tip now also catches SubprocessError, since a subprocess timeout is not an OSError and would otherwise escape as a traceback in an unattended job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Superseded. This branch still carries the pre-squash commits from #6, so it conflicts with main and GitHub cannot compute a merge commit, which is why no checks ran. Reopening the same change on a branch cut fresh from main. |
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.
Why
The hourly refresh job's very first scheduled run failed on both hosts.
bin/refresh-agentresolved main through the unauthenticated commits API. That endpoint returned 504 in about 70 milliseconds, with an nginx-style HTML body rather than GitHub's JSON error format, and kept doing so for several minutes across two machines with separate egress.ghreached the identical path fine throughout, andbootstrap-agentdownloaded tarballs from the same host minutes earlier. It later recovered on its own.A job whose purpose is to stop silent regressions should not report a failed run every time an upstream edge hiccups.
What changed
fetch_tipnow reads the ref withgit ls-remoteinstead of the API. That needs no media type, no unauthenticated rate limit, and no second network path, and it is the transport the tarball install already depends on. It resolved exactly and instantly on both hosts during the entire window the API was failing.resolve_tipalso catchesSubprocessError, because a subprocess timeout is not anOSErrorand would otherwise escape as a traceback in an unattended job.The tests patch
fetch_tipby name and the self-check replaces it via global, so the seam is unchanged and no test needed editing.Verification
Self-check passes. 14 Python deploy regressions, 68 bun tests with 193 assertions, clean typecheck. The new path was also run against the real remote with the real host config and correctly reported
up to date at 9467fe2with exit 0, so the replacement is proven rather than inferred.🤖 Generated with Claude Code