Repository navigation
release: v3.10.10 — a commit missing from this clone is no longer taken as gone - #294
Merged
Merged
Conversation
…en as gone sync demoted (commit: <sha>) to (commit-stale: <sha>) whenever the SHA did not resolve locally. A pull-only clone that never fetched a commit demoted refs the author's clone still resolved, and the uncommitted ledger edit then blocked its own git pull --ff-only, after every SessionStart sync. A SHA missing locally is now demoted only when the repo has no remote, or GitHub answers HTTP 422 "No commit found" for it. A 404, a failed lookup or a non-GitHub remote leaves the annotation alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MVx3HWniZnrXYfPiCo5Lrs
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.
What broke
On a pull-only agent-config clone (the Windows box), SessionStart sync rewrote 4 entries from
(commit: a46fa6b|e672651|d7e9245)to(commit-stale: …)because those objects were missing locally. The author's clone still held them, so it left them alone: one ledger, two verdicts depending on what each object store happened to contain. The uncommitted edit then madegit pull --ff-onlyabort ("local changes would be overwritten"), after every sync. agent-config ledgerdocs/found-issues.md:1.Measured: the three SHAs exist on GitHub (
gh api repos/AltDoug/agent-config/commits/<sha>→ 200). No remote branch contains them (squash-merged feature-branch commits; e672651 is PR #594).Fix (
lib/sync.sh)A SHA missing locally is demoted only when the absence is evidence:
gh apicall per SHA per run).A 404 (a repo the signed-in account can't see), any other failure, or a non-GitHub remote leaves
(commit:)alone, the same way shallow clones and ambiguous SHAs already did.Evidence
tests/cli-sync-commit-stale.bats: a real--single-branchclone missing a side-branch commit (red before, green after); GitHub-exists → untouched; GitHub-422 → still demotes; lookup failure → untouched. 7/7 ok.1..2048, 2047 ok, 1 fail = README test-count stat (2044 → 2048, updated; docs-consistency re-run 0 failures).deadbee) still demotes:Synced. Demoted: 1 (0 PR-closed + 1 commit-stale).Not in this PR
Sync's auto-archive (and merged-PR closures) still write the ledger on a pull-only clone, so a pull can still abort once upstream commits the same archive. Logged as
lib/sync.sh:770with a decide tag (read-only sync mode vs deploy-side workaround).🤖 Generated with Claude Code
https://claude.ai/code/session_01MVx3HWniZnrXYfPiCo5Lrs