Skip to content

feat(worker): Model bounded rolling checkpoint retention - #442

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

danny-avila merged 1 commit into
mainfrom
danny-avila/rolling-checkpoint-state

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Summary

Model the worker-local retention rules before adding a catalog or attaching a proof consumer. A speculative checkpoint must not evict the last verified checkpoint, and superseded bytes must stay charged until cleanup is acknowledged.

Transition Effect
Explicit enrollment and reservation Allocate a monotonic sequence for the exact lane incarnation and charge the candidate before any future writes. No upsert or sequence reuse.
Promotion Match the exact pending attempt and expected verified pointer (including absence); publish the candidate and mark the previous pointer garbage in one state change. Expired, stale, and failed attempts cannot change the verified pointer.
Discard and cleanup Discard only the matching pending attempt. Release charges only for exact garbage acknowledged by the future durable cleanup adapter.

Internal and unwired. No catalog serialization, proof inputs or runtime wiring, filesystem cleanup, or release changes. The module documents the trusted caller and commit boundaries that future adapters must supply.

Verification

  • Worker build and TypeScript no-emit check.
  • 37 focused worker tests passed, including 5,000 synthetic promotions that plateau at two charged entries with simulated cleanup, stale and lost retries, and quota exhaustion preserving the latest pointer.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review exact head 2f5b6baaad55b744dc2e5b77b60b9cca57f9f6dc — first pass for the unwired retention state machine. Please focus on lane/sequence identity, pointer CAS, stale retries, and garbage accounting.

@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:21:10.195135Z 2f5b6ba 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. Breezy!

Reviewed commit: 2f5b6baaad

ℹ️ 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 2f5b6ba.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 2f5b6baaad

ℹ️ 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 2f5b6ba. 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: 2f5b6baaad

ℹ️ 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 3639c00 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