Reconcile the versioned manifest transactionally - #28
Closed
git-hulk wants to merge 1 commit into
Closed
Conversation
Add Reconcile, the single apply path of repository-versioned skill
management: it proves the entire desired state can be resolved and
installed before changing either agent target, then replaces target
directories recoverably.
- Preflight validates the complete manifest, ensures every
referenced snapshot is cached (contacting the remote only for
uncached versions, so cached syncs work offline), reads every
catalog, and resolves each selected skill to content whose path
stays inside the snapshot and contains SKILL.md. Any failure
aborts before a single download, deletion, or write.
- Apply stages content and backs up replaced directories beside
each target, then swaps them with renames. Directory replacement
removes files deleted upstream. On any failure — including the
manifest save, which happens only after targets applied — every
changed target restores from backup automatically; if restoration
itself fails, a PartialStateError reports the retained backup
paths for manual recovery.
- PurgeCache deletes only cache entries the manifest does not
reference, plus leftover temporary fetch directories.
Failure injection in tests covers a mid-apply crash on the second
target, a failed manifest rename, and a failed restoration.
Assistant By Fable 5
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
git-hulk
force-pushed
the
skills-transactional-reconcile
branch
from
September 1, 2026 02:18
9f6930c to
291e0a3
Compare
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.
Add Reconcile, the single apply path of repository-versioned skill
management: it proves the entire desired state can be resolved and
installed before changing either agent target, then replaces target
directories recoverably.
Preflight validates the complete manifest, ensures every
referenced snapshot is cached (contacting the remote only for
uncached versions, so cached syncs work offline), reads every
catalog, and resolves each selected skill to content whose path
stays inside the snapshot and contains SKILL.md. Any failure
aborts before a single download, deletion, or write.
Apply stages content and backs up replaced directories beside
each target, then swaps them with renames. Directory replacement
removes files deleted upstream. On any failure — including the
manifest save, which happens only after targets applied — every
changed target restores from backup automatically; if restoration
itself fails, a PartialStateError reports the retained backup
paths for manual recovery.
PurgeCache deletes only cache entries the manifest does not
reference, plus leftover temporary fetch directories.
Failure injection in tests covers a mid-apply crash on the second
target, a failed manifest rename, and a failed restoration.
🤖 Generated with Claude Code