Repository navigation
fix: reduce checkpoint packing I/O before publication - #293
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR computes checkpoint hashes during packing and adds separate transfer and verification timings. Example: Packing a 1,073,741,824-byte SQLite checkpoint into two raw chunks.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open: it provides a focused optimization absent from main, with no introduced correctness or security defect found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe private checkpoint helper snapshots native SQLite state, packs and uploads release assets, then authenticates a complete restore before publishing the checkpoint. flowchart LR
A[Native SQLite state] --> B[Pinned snapshot]
B --> C[Compression and stream hashes]
C --> D[Private draft assets]
D --> E[Authenticated download]
E --> F[Disk and SQLite verification]
F --> G[Checkpoint promotion]
Technical reviewBest possible solution: Land the focused stream-hashing optimization while retaining the existing separate production qualification before workflow activation. Do we have a high-confidence way to reproduce the issue? Main visibly hashes the standalone database separately and rereads each compressed part; this establishes redundant I/O, but does not establish a production timeout. Is this the best way to solve the issue? Computing hashes during existing traversals addresses the redundant reads directly while preserving the independent authenticated restore and publication checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 95d1154f8972. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 17, 2026, 2:15 PM ET / 18:15 UTC. |
What Problem This Solves
Checkpoint packing rereads the entire database and every compressed part solely to compute hashes, consuming time needed for verified publication.
User Impact
Packing avoids those redundant reads while preserving the compressed format, authenticated restored-file hashes and full SQLite checks. The existing publication reserve and deadline remain unchanged. Sufficient production headroom still needs a measured end-to-end run.
Why This Change Was Made
The packing owner now carries the database hash from its existing input traversal and compressed hashes from successful output writes, including gzip headers and closing trailers. Incomplete writes, hash failures and close failures stop before upload. Fixed phase timings distinguish download, reconstruction, disk hashing and SQLite verification.
This follows the checkpoint transport introduced in #287 and its shared deadline in #291. Recovery, workflow triggers, credentials, retention and scheduling are unchanged.
Production LOC: +62/-32 (net +30) for bounded stream accounting and phase attribution. Tests: +131/-3.
Evidence
3c3f7feef8cd622b72c38a73d72a6377352186b7(scoped-clean, no findings).git diff --checkpassed. All 18 source checks passed, including CI 39056366959, Docker and CodeQL; later conditional bot-dispatch checks were skipped.