Repository navigation
fix(pr): hash captured snapshots through read-only stdin - #173899
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 passes captured evidence bytes to Git through an unlinked read-only temporary file instead of a synchronous stdin pipe. Example: Correction admission hashes a captured 32 MiB evidence file on POSIX.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused tooling improvement, and no introduced correctness defect was identified; required CI remains red. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherNative PR correction tooling captures review and baseline evidence, hashes it with the selected Git executable, and compares the resulting object IDs during admission. flowchart LR
A[Captured evidence bytes] --> B[Hash owner]
B --> C[Private temporary snapshot]
C --> D[Unlinked read-only descriptor]
D --> E[Git hash-object]
E --> F[Admission identity checks]
Technical reviewBest possible solution: Retain the focused hash transport change while preserving exact evidence bytes and existing admission authority. Do we have a high-confidence way to reproduce the issue? The historical publication stall is not reproduced: the body explicitly limits its negative control to rejecting pipe stdin, and no target code was executed during this read-only review. Is this the best way to solve the issue? The implementation coherently replaces read-only hash transport within its existing owner, preserves Git hashing semantics, and documents its accepted disk and interruption costs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6508e01b27c6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +272, Docs +13, Other +29. Total +314 across 4 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
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 16, 2026, 2:34 AM ET / 06:34 UTC. |
…3899) * fix(pr): hash captured snapshots through read-only stdin * fix(ui): remove unused LitContent import
What Problem This Solves
Captured-evidence hashing in PR correction admission currently feeds Git through a synchronous pipe; this change gives that boundary a complete, closed byte snapshot. A reported publication stall motivated the repair, but its historical cause remains unproven.
User Impact
No product-facing behavior changes. PR tooling hashes the same captured evidence bytes without rereading the original authority path. Write hashes, signatures, authority checks, locks, and transport remain unchanged.
Why This Change Was Made
Read-only hashes now use an exclusive private snapshot, close the writer, and open a fresh read-only descriptor at offset zero. On supported POSIX hosts, the pathname and directory are removed before the selected Git executable starts.
Temporary disk must fit the largest captured file. Unlinking is not secure erasure; abrupt termination before unlink can leave private snapshot data. Windows is not qualified by this change.
Evidence
Production delta: +35/-6 lines; tests: +272 lines; documentation: +13 lines. The added production lifecycle owns exclusive snapshot creation, descriptor closure, and cleanup without changing admission authority.