Repository navigation
fix(analysis): preserve candidate blob bytes on Windows - #3548
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ 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. |
|
@codex review |
|
Warning Review limit reachedNext included review available in 33 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Exact-head substantive review for |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 946bfe7bc9
ℹ️ 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".
Current-head hosted disposition — 946bfe7The displayed source-of-truth and droid-review failures are cancelled jobs, not source findings. The source-of-truth job stopped during document-artifact validation with no diagnostic output; droid-review had no executed steps. Rust gates, UB review, dependency, security, routing, and plan checks pass. This leaves those two lanes NOT_PROVEN; no unchanged retry or merge claim is made. The bounded Windows candidate-blob fidelity claim remains locally proven only. |
…onversion (#3548 review) git archive honors .gitattributes (e.g. '*.rs text eol=crlf') even with core.autocrlf=false, so archive-extracted candidate roots could silently differ from the exact blob bytes bound by the immutable candidate identity. Materialize instead by enumerating the tree (ls-tree -r -z, fail-closed on non-UTF-8 paths per the #3545 lossy-collapse family) and writing each blob through cat-file, which never applies attribute conversion. Traversal-safe path joins and the bounded-output limits are preserved; the in-crate tar machinery is removed. Regression: a candidate committed under an eol=crlf attribute must materialize byte-identical to git show <tree>:<path> (LF stays LF).
…n message (#3548 review) The blob-wise materialization rejects a symlink at tree enumeration (unsupported tree entry mode 120000, naming src/linked.rs) before any byte is written, so the fail-closed property is structural; the falsifier tests now assert the new typed message while keeping the entry-naming and cleanup assertions.
…file --batch session (#5105) * perf(analysis): batch candidate-tree materialization through one cat-file --batch session (#5015) Materializing a candidate tree spawned one sequential git cat-file subprocess per file, each carrying the full per-invocation git deadline: N spawns for an N-file tree and a worst case of N x git_timeout for a slow or hanging git, with a 512 MiB buffer per blob. Replace the per-blob loop with one streaming git cat-file --batch session (two git spawns total with the ls-tree listing, O(1) in tree size). The session is a lockstep request/response protocol through the shared git spawn authority: blob bytes stream to disk in bounded 64 KiB chunks, so memory stays bounded regardless of tree size and a large blob can never deadlock against an unread pipe. The same value the per-blob calls each used before now bounds the whole materialization phase once, enforced incrementally on every blocking read through the shared named git_invocation_timeout classification; cooperative cancellation is checked per request and per chunk. The materialized byte total is capped at MAX_ARCHIVE_BYTES for the whole tree. Fail-closed behavior is preserved: unsupported modes, non-UTF-8 paths, and traversal attempts fail with the existing named errors before any byte is written; malformed framing, truncated streams, missing objects, and deadline expiry fail the whole subject, and the temp-root guard removes the partial tree. Blob bytes remain byte-identical to per-blob cat-file output, preserving the #3548 no-textconv identity argument against git archive. Evidence: stream-parser unit tests (chunk-boundary reassembly, truncation, spent-budget timeout), a real-repository session round trip against the raw git show oracle including a missing object, a zero-budget named-timeout control through finish, and a 300-file plus multi-chunk binary plus empty-file scale fixture asserting byte parity with the bound blobs. Spawn count for the materialization phase goes from N+1 to 2 structurally; wall-clock magnitude stays a measurement-pending claim per the issue's own design_question classification (RIPR-SPEC-0206). * style: apply rustfmt from CI gate log * fix: restore the request_blob try-operator and compute budget before stdin drop * docs: register RIPR-SPEC-0206 in the doc-artifacts ledger * docs: bring RIPR-SPEC-0206 to the required spec format headings * fix: satisfy clippy cast-sign-loss and duration-unit lints in new tests * fix: harden the batch session from review findings - Backpressure: the stdout chunk reader now feeds a bounded sync_channel (8 x 64 KiB); a slow destination stalls git through the pipe instead of queuing unbounded chunks in memory. - Absolute deadline: stream waits recompute their allowance from one deadline Instant per wait, so fragments dribbling just under each individual wait cannot outlive the overall budget; new dribbling-fragment test pins it. - Abort routing: every stream failure (truncated stream, oversized header, malformed header/kind, bad framing) now terminates the owned process tree through the shared terminate-then-classify contract instead of relying on the drop path. - One budget for both git processes: the materialization clock starts at entry, ls-tree runs inside the remaining budget, and the batch session receives only what is left after listing and validation. - The truncation test now parses a real header before asserting the mid-blob EOF; RIPR-SPEC-0206 documents the residual stalled-write limitation honestly. * style: apply rustfmt from CI gate log * fix: reject buffered bytes past the overall deadline
Summary
Force git archive materialization to disable core.autocrlf so candidate-tree bytes remain exact on Windows. Tests now compare extracted bytes with git show candidate blobs.
Proof
Claim boundary
This proves byte-preserving candidate materialization for the covered archive paths. It does not establish release or publication readiness. No workflow, dependency, or release surface changed.