Skip to content

feat(worker): Reconcile interrupted restore journals - #447

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

danny-avila merged 1 commit into
mainfrom
danny-avila/restore-crash-journal

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Summary

A restart after reserving or partially materializing a restore cannot safely recreate the destination. An unpublished success record is also not proof that the operation committed.

Add an internal Linux journal primitive using the merged checkpoint catalog. Under an exclusive caller-held reservation, it reconciles the matching published record:

Published state Result
Empty directory Status leaves it empty; start durably reserves before calling creation
Reserved Discard only admissible unpublished replacement bytes; durably reject without invoking creation
Restored / rejected Replay the same terminal record without reading a retained payload or invoking creation
Conflicting, corrupt, or initialization temp only Fail closed

The restored fingerprint records what committed; it is not proof of the current target and grants no attachment authority. This does not wire worker dispatch, change fences, or enable restore.

Tests

  • Worker tsc --noEmit and build passed.
  • 22 focused journal/catalog tests passed, including process kills after reservation, during materialization and after terminal commit, plus failed terminal sync.
  • Full worker suite in the restricted local runner: 872 passed, 294 failed, 2 cancelled, 29 skipped. The existing test set reproduced the same failure names and counts without the eight journal tests; not a full green local run.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review — pass 1 for exact head 01940261ce968e238c21decb0cf52751f769cc8f. Please check crash boundaries, durable terminal semantics, and the caller-held reservation contract.

@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:01:00.180567Z 0194026 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. What shall we delve into next?

Reviewed commit: 01940261ce

ℹ️ 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 0194026.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 01940261ce

ℹ️ 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 0194026. 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. Breezy!

Reviewed commit: 01940261ce

ℹ️ 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 6bc7e93 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