Skip to content

feat(worker): Hold exact retained checkpoints across restore crashes - #450

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/crash-durable-restore-hold
Dec 5, 2026
Merged

danny-avila merged 1 commit into
mainfrom
danny-avila/crash-durable-restore-hold

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

What changes

#449 authenticates publication, but an in-memory read cannot keep the exact checkpoint rooted after a restore process dies. This adds a private retention-store primitive, not a restore endpoint or materializer.

  • Resolve only the exact proof-bound verified selector, recheck the publication envelope and Git HEAD, and durably record the hold before delivering bytes. Worker, owner, source incarnation, restore operation and destination journal must all match.
  • A held checkpoint stays verified and charged. Promotion cannot rotate it, and the worker-local HEAD reclaim fence refuses to remove its Git ref. The producer must already have durably installed that ref; callers must use the same private store lease for all ref removals.
  • Status can resume an existing hold but cannot create one. Release compares the original identity and reads the exact durable journal. A restored receipt alone cannot release it: the caller also needs a durable target disposition. The one-shot tombstone prevents reopening the source journal as a different attempt.

No live worker/bridge wiring, source reuse, command replay, deployment, or release. Destination admission and target attachment remain separate.

Verification

  • Native WSL: focused checkpoint/restore/lifecycle suite, 127 passed, 3 environment/platform skips; tsc --noEmit and build passed.
  • Full worker suite in WSL: nine failures reproduced on untouched main (PTC and host filesystem fixtures).
  • Process-kill tests after hold, journal reservation, and journal settlement; cross-process reclamation, identity substitutions, and ambiguous catalog commits.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head bbb2339, pass 1. Please check durable selector binding, release authorization, and cross-process reclaim.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-05T13:52:19.267882Z bbb2339 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: bbb233952b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Pass 2 of 3 on head bbb2339.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: bbb233952b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

This is the final review for this PR (pass 3 of 3) of head bbb2339. Please flag only blocking issues: correctness, security, or data loss.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: bbb233952b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila
danny-avila merged commit 09de7e5 into main Dec 5, 2026
31 checks passed
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