Skip to content

Reconcile the versioned manifest transactionally - #28

Closed
git-hulk wants to merge 1 commit into
skills-versioned-manifestfrom
skills-transactional-reconcile
Closed

Reconcile the versioned manifest transactionally#28
git-hulk wants to merge 1 commit into
skills-versioned-manifestfrom
skills-transactional-reconcile

Conversation

@git-hulk

@git-hulk git-hulk commented Aug 31, 2026

Copy link
Copy Markdown
Owner

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

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
git-hulk force-pushed the skills-transactional-reconcile branch from 9f6930c to 291e0a3 Compare September 1, 2026 02:18
@git-hulk git-hulk closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant