Skip to content

feat(worker): Persist a bounded checkpoint catalog - #444

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/checkpoint-catalog
Dec 5, 2026
Merged

danny-avila merged 1 commit into
mainfrom
danny-avila/checkpoint-catalog

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Summary

Add an internal catalog persistence primitive for a private, already-pinned Linux directory under an exclusive lease. The catalog stores opaque bytes in a versioned, checksummed record capped at 1 MiB on disk. Initialization is explicit and refuses an existing entry; replacement first validates the existing catalog. Missing or corrupt state never becomes an empty catalog.

Boundary Behavior
Stage Exclusively create the fixed owner-only temp, write and sync it, then close it.
Publish Rename in the same pinned directory under the lease, then sync the directory. Never modify the published inode in place.
Recover An operation error disables that instance. Reopen under lease validates the published file and syncs the directory again. An abandoned temp blocks writes and is never removed by this primitive.

Independent of #442 (retention rules) and #438 (directory reservation). No runtime or package entry point wiring, retention transitions, or cleanup. The caller owns lease/isolation, directory handle lifetime, filesystem admission, and payload semantics. This is not a disk-retention plateau measurement.

Verification

  • Worker build, tsc --noEmit, and git diff --check passed.
  • 13 focused Linux catalog/staging tests passed, including injected directory sync failure and SIGKILL after file sync, after rename, and after directory sync. Process termination is not a power-loss test.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review — pass 1 for exact head 29aca1321edfbca2a6de3611cd9c6f476a041a7b. Please review the pinned-directory lease assumptions and the fail-closed publication/reopen boundaries.

@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-05T03:26:57.939879Z 29aca13 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. Another round soon, please!

Reviewed commit: 29aca1321e

ℹ️ 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 29aca13.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 29aca1321e

ℹ️ 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 29aca13. 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. You're on a roll.

Reviewed commit: 29aca1321e

ℹ️ 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 9139d5c 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