Skip to content

Add crash-recoverable catalog snapshot and apply - #113

Merged
schickling-assistant merged 2 commits into
mainfrom
schickling-assistant/2026-07-30-catalog-snapshot-apply
Aug 1, 2026
Merged

Add crash-recoverable catalog snapshot and apply#113
schickling-assistant merged 2 commits into
mainfrom
schickling-assistant/2026-07-30-catalog-snapshot-apply

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add deterministic declaration snapshots and root-CAS whole-catalog apply with source-free recovery
  • keep all authoring staging in the retained .st2 control plane and publish through no-follow directory capabilities
  • fence unlocked readers with a durable monotonic generation plus recoverable incomplete-generation intent
  • preserve marker-time message, status, context, and Resource mutations through a coherent retained-capability address book

Contract

  • st2 catalog snapshot --output DIR [--json]
  • st2 catalog apply --prepared DIR --expect-sha256 HEX [--json]
  • st2 catalog apply --resume [--json]
  • st2 agent digest (--spec FILE | --bundle DIR) [--json]
  • st2 agent publish ... --input-sha256 HEX

Apply has exactly two closed modes: a new prepared hash-CAS transaction or marker-authorized resume. A durable apply marker protects whole-catalog recovery. Each declaration writer also creates a durable generation intent before mutation; shared readers fail closed on it, and the next exclusive writer conservatively advances the generation and clears an orphan intent.

State traffic remains unlocked. During apply, routing uses the validated original-agent/current-spec union, coherent generation -> marker -> generation sampling, and retained component directory capabilities. No state or declaration mutation follows swapped path ancestors.

Verification

  • cargo check --tests
  • focused integration: 74/74
    • presentation: 13/13
    • publish: 17/17
    • catalog apply: 28/28
    • task inventory: 10/10
    • message: 6/6
  • resource traversal unit: 1/1
  • git diff --check
  • causal coverage for apply/publish/presentation ABA, post-commit generation failure and recovery, .st2 and declaration ancestor swaps, leaf and identity EXDEV/resume, marker-clear address fencing, and marker-time message/status/context/resource mutations
  • final independent read-only review: no P0/P1/P2 findings

This now targets main after #106 merged.

@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-07-30-catalog-snapshot-apply branch from d85e72f to 962ceb0 Compare July 31, 2026 00:03
@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-07-30-catalog-publication branch from 57bb745 to 7e1bd02 Compare August 1, 2026 09:56
agent-session-id: ed878dac-3735-4276-b3e0-ea1b1cd65291
agent-tool: Codex CLI
agent-tool-version: 0.145.0
agent-model: unknown
agent-runtime-profile: /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json
agent-skills-manifest: /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json
tooling-profile: dotfiles@0fb7e03
agent-session-id: ed878dac-3735-4276-b3e0-ea1b1cd65291
agent-tool: Codex CLI
agent-tool-version: 0.145.0
agent-model: unknown
agent-runtime-profile: /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json
agent-skills-manifest: /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json
tooling-profile: dotfiles@0fb7e03
@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-07-30-catalog-snapshot-apply branch from 962ceb0 to 7347816 Compare August 1, 2026 11:28
@schickling-assistant
schickling-assistant changed the base branch from schickling-assistant/2026-07-30-catalog-publication to main August 1, 2026 11:29
@schickling-assistant
schickling-assistant merged commit 19d658b into main Aug 1, 2026
1 check passed
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

@myobie Thank you — #113 is merged and green. Your push to make the failure and capability boundaries explicit made this substantially better.

https://media.giphy.com/media/11sBLVxNs7v6WA/giphy.gif

@schickling schickling added area:catalog Catalog structure, declarations, transactions, and admission · Set: manual origin:agent Filed or primarily produced by an AI agent · Set: manual type:feature New user-visible or system capability · Set: manual labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:catalog Catalog structure, declarations, transactions, and admission · Set: manual origin:agent Filed or primarily produced by an AI agent · Set: manual type:feature New user-visible or system capability · Set: manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants