Repository navigation
Add checkpoint pack/unpack: the session packet engine subcommands - #201
Conversation
Implements pillbox.session-packet/1: a deterministic ustar packet with packet.json first, then workspace/ and harness/ trees. The manifest is specified by proto/pillbox/session-packet-1.schema.json; layout, credential exclusions and limits are in docs/session-packet.md. unpack verifies the digest before writing, every entry against the manifest, and refuses traversal, escaping symlinks and unlisted entries. Both are hidden engine subcommands and build with --no-default-features.
|
@codex review Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5c5ab8f0e
ℹ️ 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".
…ide a packed tree
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: d5c5ab8f0e
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
… -shm, -journal) An unflushed OpenCode credential write in WAL mode lives in opencode.db-wal, which the exact-basename check let through.
Before: the 2026-10-11 decision said the engine would gain a session packet (
checkpoint pack|unpack), but no such command existed. Stratus's Cloudflare sandbox checkpoints with its own ad-hoc tar, and the local runner takes no checkpoints at all, so a session can't move between placements.After:
pillbox checkpoint packwrites one deterministic, content-addressed packet (pillbox.session-packet/1) from a workspace and optional harness state, excluding credential files.pillbox checkpoint unpackverifies the digest before writing anything, checks every entry against the manifest, and refuses traversal, escaping symlinks and tampering. Both are hidden engine subcommands for Stratus, print one versioned JSON object, and build with--no-default-features, so the Cloudflare container's Linux binary writes the same packet as macOS.How
proto/pillbox/session-packet-1.schema.json) and documented indocs/session-packet.md. It is a ustar file withpacket.jsonfirst, thenworkspace/…andharness/…, entries sorted, mtime 0, owner 0 and modes normalized. Every object in the manifest is closed, and optional keys are left out rather than written as null.src/checkpoint/tar.rs) because no tar crate is in the lockfile, soCargo.tomlis unchanged.docs/decisions.md(2026-10-18) records the layout, the exclusions and the limits: 1 GiB, 250,000 entries, and 4096 bytes per path. OpenCode state can't be packed, because its credentials live insideopencode.db.Verification
cargo fmt --checkpasses, and so doescargo clippy --no-default-features --all-targets -D warnings.jsonschema(Draft 2020-12) agreed on real and mutated packets.cargo test --no-default-features --all-targetspasses except two existing tests,the_owner_cannot_rewrite_a_locked_protected_pathanda_worker_editing_a_protected_test_does_not_change_its_grade. Both expect a write to a read-only file to fail, and the sandbox they ran in runs as root. They don't touch this change.brief checkpasses.Generated by Claude Code