Record the sync point a publish creates - #63
Merged
Conversation
`goodeye skills publish` moved the registry without ever touching the local sync index. A directory publish set both drift signals at once: the uploaded tree left the recorded hashes on superseded content while the version advanced, which classifies as a conflict. Nothing could clear it, because a pull refuses a dirty tree and a push sends a token the registry has already replaced, so the mirror stayed stuck until a forced pull discarded the local edits it was protecting. A directory publish now records the whole sync point, found by the published directory's own path. The tree was uploaded, so the registry holds what the directory holds whatever version the index was sitting at, which also recovers a mirror already stranded. A body-only publish reads no directory, so it records only what it knows, only on mirrors sitting at the version it replaced, and writes the new body to disk only when nothing unsaved is there to lose. Publishing a directory also cleared every sibling-file label. A label lives only in the registry, and a snapshot that omits one clears the stored value, so a tracked mirror's recorded labels now ride along with the upload the way a push already sends them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A directory publish builds its snapshot from the walk alone, so the recorded manifest is the only source for anything the walk cannot recover. The role label was already carried back; the execute bit was not. A filesystem that does not preserve the bit reports every file as non-executable, so publishing from a Windows checkout or a FAT/exFAT mount cleared a flag the registry rightly held, and now recorded that loss in the manifest as well. For a file whose content is unchanged the recorded bit is authoritative, the same rule a push already applies; a changed file still carries what disk reports, since its content and any permission meant to go with it are what is being uploaded. Also wrap a test line the formatter rejected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A publish reaches the local index only after its write has landed on the registry, so an unreadable index or an unwritable mirror warns and moves on rather than reporting a completed publish as a failure. Nothing tested that, so a change letting the exception escape would have turned a successful publish into an error. Two tests pin it, one per input mode. A push records the verifier refs a save left behind, which is what `_bindings_from_save` was extracted for, so it goes through the helper instead of repeating the comprehension. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch carries only a bug fix (the publish sync-point record and best-effort index reuse), not a feature. The single-path file commands that originally justified a minor bump already shipped in 0.25.2 (tag v0.25.2). No v0.26.0 tag exists yet, so nothing is pinned to it.
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.
goodeye skills publishmoved the registry without ever touching the local sync index. A directory publish set both drift signals at once: the uploaded tree left the recorded hashes on superseded content while the version advanced, which classifies as a conflict. Nothing could clear it, because a pull refuses a dirty tree and a push sends a token the registry has already replaced, so the mirror stayed stuck until a forced pull discarded the local edits it was protecting.What changes
A directory publish records the whole sync point, found by the published directory's own path. The tree was uploaded, so the registry holds what the directory holds whatever version the index was sitting at, which also recovers a mirror already stranded.
A body-only publish reads no directory, so it records only what it knows, only on mirrors sitting at the version it replaced, and writes the new body to disk only when nothing unsaved is there to lose. A mirror holding unsaved edits keeps them and reads as ordinary drift a push resolves.
Publishing a directory also cleared every sibling-file label and execute bit. Both live only in the registry, and a snapshot that omits one clears the stored value, so a tracked mirror's recorded labels and execute bits now ride along with the upload the way a push already sends them. For an unchanged file the recorded execute bit wins, which is the rule
build_files_payloadalready applies on a push, so publish and push cannot disagree about the same directory.build_files_payloaditself is untouched.Verification
Not in scope
publish -would be better served byput-file.Release
Version bumped to 0.25.3. This release carries only the bug fix: the single-path file commands shipped in 0.25.2. Not tagged yet. The changelog entry lives in the server repo and ships as a separate PR.
🤖 Generated with Claude Code