Repository navigation
perf(mcp): count and hash gap evidence in one pass - #5407
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Limit details: You’ve used all 10 included reviews currently available. Summary by CodeRabbit
WalkthroughThe change computes evidence byte length and SHA-256 digest in one serialization pass. Tests cover the computed identity and verify that snapshots with different, equal-length evidence retain distinct IDs and return their original evidence. ChangesEvidence Identity
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to This change computes evidence length and digest in one serialization pass while keeping snapshot identity behavior the same. No concrete merge-blocking risk was found. Hosted checks should still pass before merging. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change preserves evidence identity and snapshot isolation without adding permissions or exposing new operations. No introduced or worsened security concern was identified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the bytes in flight Comment |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent source-review receipt — REVIEW_INCOMPLETE
Accountable author recording the read-only review performed by the delegated reviewer; this COMMENT is not an author approval.
Published head verified independently: fab7fd0.
Tree: 1762a35e687e29f7eaa4dc458d0476b68b876c29.
Commit parent / candidate basis: 9acf0b6.
Observed main/PR base: 48c921e.
Review completed 2026-10-04 07:54:29 UTC.
The reviewer independently inspected the complete published two-file patch, producer and budget consumers, snapshot identity and get-gap rendering. The previous source-backed test compilation finding (GapItem has no Clone) was repaired by rebuilding oracle items from retained findings; the re-review found no remaining blocking source issue. The GitHub-published tree exactly matches the reviewed local tree. The two newer main commits inspected by the reviewer touch no MCP file or CheckOutput field; combined-tree execution remains pending.
Observed invariants: the same emitted JSON bytes feed count and SHA256, successful serialization precedes digest finalization, first-pass error context is preserved, and list-summary counting remains separate. Independent buffered byte/hash oracles and equal-length evidence changes cover the intended snapshot binding. The helper-call counter observes the helper, not total projection work.
Observed checks are in flight; hosted formatting passed, but no complete required-gate result was established at review time. Devin's successful status describes a skipped full review due to an expired trial and is not substantive source review. Gemini's write_all suggestion is non-blocking and unmeasured; its thread has a scoped reply and remains pending qualification.
Missing: actual test compilation/execution, executed negative controls, real shared-check/stdio compatibility transcripts, protected checks, and matched CPU/wall/RSS/allocation measurements under parent resource admission. No local build, benchmark or profiler ran. No speed or memory improvement is established. Do not arm merge from this disposition.
|
Qualification preparation; no new local execution The hosted route attached to head fab7fd0 has passed repository policy, workspace/all-target checking and strict Clippy. Required Rust tests, doctests and output/fixture contracts are still in flight at this checkpoint. This is not a completed gate or measured-efficiency result. A smaller potential resource route avoids a fresh local Cargo target: the existing exact-head read-only wheel workflow has produced artifact 11298185963, There is no qualified baseline artifact yet. In particular, #5385's head Proposed parent allocation: a bounded baseline build through that same existing workflow at the retained exact base, then runtime-only trials on the established 5700X, with at most 512 MiB cumulative task artifacts and no local Cargo target. Check receipts, exact before/after trees, lock/features/profile/target, artifact digests and expanded sizes before admitting any pair. Refuse mismatched or oversized inputs. Start trials only during the parent-allocated quiet host interval; baseline noise controls precede matched pairs. No workflow dispatch, binary download, benchmark, allocator instrumentation or shared-target mutation has started here. CPU/RSS observability remains #5213/#5282; #5257/#5260 provide surface behavior/latency oracles. Allocation statistics remain unavailable until the separately documented benchmark-side observer passes its controls. The source draft remains REVIEW_INCOMPLETE pending those qualification dimensions. |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Test snapshot binding in workspace.rs::identity rebuilds GapItem oracles and computes snapshot_identity twice (once via Snapshot::from_output, once via the oracle) but only asserts equality; if Snapshot::from_output ever mutated evidence_bytes/digest it would silently pass. Minor defense-in-depth gap, not a blocker.
- crates/ripr/src/mcp/gaps.rs:418 — Override std::io::Write::write_all on IdentityWriter so the fused update runs once instead of relying on the trait default's write-loop. Behaviorally compatible: write() already accepts the full buffer and returns its length.
Verification questions
- Confirm serialized_evidence_identity emits evidence once and matches byte-oracle length+digest across null/empty/nested/escapes/Unicode/64 KiB/finding values.
- Confirm snapshot identity still changes when equal-length evidence text is edited, and get_gap serves the original snapshot document under that id.
- Confirm pR claim 'Serialize evidence once' is structurally true at source level but execution unverified.
- Confirm pR body declares 'execution pending' for the new identity, single-pass, error-context, and snapshot-binding tests; ripr sensor failed and cargo-test is scheduled-late, so source-route route-truth is asserted only via static inspection, not executed proof.
Refuted
- serialized_evidence_identity should be hoisted to a shared utility or merged with serialized_bytes to avoid two near-identical serialization helpers; refuted because: serialized_bytes remains a generic Value->usize used for list_summary_bytes where no digest is needed; merging would force every length-only caller to pay for Sha256 allocation or add a flag parameter, expanding scope beyond #5301 item 3. Two tightly scoped private helpers are the smaller change.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Landed source and qualification checkpoint — #5407 / #5301 item 3, updated 2026-10-04 20:56:31 UTC PR #5407 merged 18:50:15 UTC by ordinary protected squash Observed correctness: Rust-only37187068097/job111391150598, four new controls explicitly pass/6,813 passed/0 failed/1 ignored; routed37187068230/job111391197023, four new PASS lines/11,660 passed/2 skipped plus policy/all-target/strict Clippy/doctest/golden/fixture controls. Both executed integration Matched artifact provenance:
Producer logs explicitly checkout each exact source/tree. Wheel/payload hashes and ELF64 match receipts. Workflow, packaging, toolchain and Cargo.lock blobs are identical; lockSHA2565d89ada8888aa3a1ee0982548261adcec98d7c44a49b4ab1c45d4b56b9c018e5. Both locked/stripped release Linuxx64, lang-python/lang-rust/lang-typescript, Rust1.95.0/LLVM22.1.2, maturin1.14.1, runnerimage20260927.309.1. Both consumer jobs pass. General compatibility is still explicitly unqualified. Those original archives remain recoverable proof. Expanded ELF copies and temporary restoration witnesses were released after exact archive/wheel/payload digests, WSL owner/mode/mtime, clean source, contained paths and fresh zero actual/queued consumers were verified. They are distinct from the fresh hosted experiment executables and must not be conflated with their builder-attested hashes. Local existing-binary functional observations only: complete ten-response MCP transcripts match,61,741bytes each/SHA256 The admitted existing Ubuntu22 fallback #5838 is now protected squash merged20:45:17UTC as Actual pair run37228898991/job111514200409 succeeded on exact historical9acf/fab sources and the corpus-owner anyhow pin. Official artifact11313144233, ZIP140,550bytes/SHA256 No repeatable efficiency gain or causal regression established. All three AB/BA/AB deltas and three A/A controls, including slower warm pair+17.666ms/+30ms, remain in #5838's table. CPU10ms resolution/only3paired sessions/6findings/shared-runner noise limit interpretation. Firstrefresh application-new/sharedcache,OSunflushed;batchwall includes observation overhead. VmHWM decreases172,032/331,776/425,984bytes in3baseline sessions remain unchanged with stablePID/startbindings; report maximumsampledVmHWM/approximate snapshot only, no exact terminal/lifetime peak or per-request memory saving. Allocationunavailable. Fresh-hosted executable hashes are builder-attested, binaries excluded from artifact and not locallyrehashed. Budget/selected-byte/omission/overflow evidence is full emitted-field parity, not independent budget algorithm/limit correctness. CLIoneparitypair. No5700X/cold-cache/whole-repo/LSP/release/later-main extrapolation. Resource closeout: no owned local runtime or Cargo invocation; no Cargo target or installation created. All 14 hosted process groups were absent at terminal release 19:51:52 UTC. The clean linked #5301 stays open; only source correctness of item3 is accepted, matched smoke is complete without demonstrated gain, and broader efficiency/observer/corpus qualification stays with established #5213/#5282/#5257/#5260/#5425/#5288 owners. Current canonical acceptance and instrumentation contract. No new benchmark or download is required merely to seek a positive result. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent exact-head review refresh — REVIEW_INCOMPLETE
Accountable author recording the delegated read-only review; this COMMENT is not author approval.
Reviewed published head: fab7fd0.
Tree: 1762a35e687e29f7eaa4dc458d0476b68b876c29.
Sole parent/candidate basis: 9acf0b6.
Readback timestamp: 2026-10-04 09:06:42 UTC.
No new blocking source or artifact-provenance findings. The reviewer inspected producer/consumer behavior, byte/hash oracles, error handling, equal-length snapshot invalidation and the complete published two-file patch. Count and hash consume the same emitted JSON stream; failed serialization cannot produce an identity. List-summary counting remains separate. The helper counter does not observe total projection work.
Actual test execution is now independently established. Both Rust-only and routed logs explicitly show all four new tests passing. Rust-only records 6,813 passed / zero failed / one ignored / zero filtered; routed records 11,660 passed / two skipped. Policy, all-target checking, strict Clippy, required tests/doctests, golden and fixture contracts succeeded. Both execute integration commit 5524540/tree d31f949eb6c1c9fb94932bfb1fc13cfd7c50d61a, with parents 48c921e and the published head. Thus the prior automated execution-unverified questions are stale; integration-tree execution remains distinguished from exact-head source review.
The exact baseline/candidate pair is independently provenance-ready: baseline run37189021148, artifact 11298229475, exact base 9acf0b6 / tree 46b1bb84; candidate run37187068140, artifact 11298185963, exact fab7fd0 / tree 1762a35e. The reviewer independently hashed archives, embedded wheels and extracted ELF executables, matching GitHub digests, receipts and producer logs. Effective workflow/packaging/lock/toolchain/features/release profile/target/runner inputs match. Baseline executable SHA256 0416ba9c9cb2f3fa58cb5e993366949f5efa17326d47f7568233197fa57750da; candidate 1b4824889d727290c5f6f0193390aff4056a030a97bcdaa5c2ad4e74135b550e. General compatibility is still unqualified; runtime_performance_observed remains false.
Gemini's direct write_all override is behaviorally compatible and non-blocking; its optimized benefit remains unmeasured and its thread retains a scoped response. UB review's direct snapshot-item assertion suggestion is non-blocking defense in depth: no current post-projection mutation exists, and independent GapItem byte/hash plus equal-length identity-change controls already pass.
Missing proof: deliberate wrong/removal controls for the fusion, real shared-check/stdio baseline/candidate parity, matched performance trials and qualified allocation coverage/negative/overhead controls. Packaging controls and passing unit tests do not substitute for these experiments. The parent-approved artifact preparation is complete; runtime work awaits the quiet-slot release on the 5700X. No local Cargo build, subject execution, benchmark, profiler run or allocation measurement has occurred. No efficiency improvement is established. Do not arm merge from this disposition.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent runtime-proof review — REVIEW_INCOMPLETE
Accountable author recording the delegated read-only review; this COMMENT is not author approval.
Published head fab7fd0; tree 1762a35e687e29f7eaa4dc458d0476b68b876c29; exact candidate basis 9acf0b6. Head was freshly re-read before this receipt.
No outstanding production-source findings. Previously observed hosted tests, the direct call-site inspection, serializer-count/error controls, independent buffered length/hash oracles and equal-length snapshot/get-gap tests support the bounded serialization change. An additional executed source mutation is impractical under existing-binary/no-Cargo admission and is not a new approval or qualification gate.
Exact artifact bindings remain valid. The runtime fixture uses corpus version 2026-10-04.4's anyhow HEAD e621bd35ddddcd8b2f39d80b9f5938583571a87d / tree 7e4a98f93d3d68aa41a10c22ee88ec90317e28dc, with origin/main controlled to the pinned first parent 917a16932009c1957f53c2ea325663948add2153. Tracked source is clean; ignored cache files exist.
The reviewer independently hashed retained CLI stdout/stderr: both match exactly and recorded exit statuses are zero. Six findings occupy 42,671 stdout bytes. This supports CLI output parity only. Its wall/CPU/RSS observations are rejected because concurrent native workloads failed the intended quiet-host fence; a wrapper bug also interrupted that attempt. No MCP session ran.
The corrected 18:01:28–18:01:36 UTC block failed at the pre-launch host guard. It has no subject sample or accepted performance evidence. Runtime allocation is released; an exact-owned-executable/driver-path readback found no remaining process. Native unrelated work was preserved.
Independent external-wrapper inspection found cleanup, deadline, tool-error, warm completion, identity, resource parsing and Windows/Linux guard defects; their source repairs were read back, and syntax validation passed. Stable wrapper SHA256 39d0a9ac4e2161bbd4cc9e9558db8bd5866b4b13ab2c45e2dfa16ac76b8616d3. Those repaired runtime paths are still unexecuted.
Outstanding: accepted MCP execution and complete JSON-value transcript parity, the runtime parity-oracle negative control, and matched observations on a coordinated quiet host. Allocation remains unavailable; no observer qualified. A rejected trial is not a speed/memory result. Future RPC wall labels must include request writing/response parsing; batch wall includes wrapper logging; self CPU resolution is 100 Hz; RSS is process-lifetime VmHWM; new sessions share caches; three pairs are exploratory.
Required Ripr Rust Small Result remains successful. Advisory droid-review remains queued. Source head is unchanged and no local Cargo build or instrument installation occurred. No measured CPU, latency, RSS or allocation benefit or merge-ready conclusion is supported. The draft remains REVIEW_INCOMPLETE.
Canonical attempt/resource checkpoint: #5407 (comment)
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent functional-review refresh — REVIEW_INCOMPLETE
Accountable author recording the delegated read-only review; this COMMENT is not author approval.
Exact published head fab7fd0; tree 1762a35e687e29f7eaa4dc458d0476b68b876c29; candidate basis 9acf0b6. Fresh head fence passed.
No outstanding source or functional findings. Prior direct call-site inspection and the four explicitly executed hosted tests support the bounded count/hash fusion. No new source-mutation gate is imposed under no-Cargo admission.
The reviewer independently inspected the retained lightweight before/after MCP runs. Eight-response transcript parity passed; the follow-up ten-response transcript files are byte-identical (61,741 bytes; SHA256 be0c562833a2c2e9198052a9c8a6aa63d60de40d1ea5fdb0f125b8dacdd08406). Request/reply IDs match. First and repeated refreshes completed with six findings; five are selected, and budget/omission/detail/resource/snapshot identities match.
Actual product negative: both executables rejected a deliberately wrong snapshot with isError=true, failure.code=stale_snapshot and the correct current_snapshot_id. A subsequent correct-list request succeeded using the retained snapshot. A separately corrupted resource text was rejected by the complete JSON-value transcript oracle. The reviewer confirmed the corruption receipt differs only at that text.
Exact executed wrapper 3046806c4271ae5973ccb786ea31ccd0462c544800003fa0876ea8a64eb0d449 is preserved. The terminal receipt at 18:23:26 UTC confirms owned groups 1019/1087 absent. First-block groups 1032/1100 were likewise absent. One subject ran at a time under 30-second case / 1 GiB limits. All functional RPC records explicitly exclude performance use; both blocks are wholly ineligible. Raw evidence is preserved unchanged.
The previously rejected performance observations remain rejected. Accepted matched CPU/wall/RSS observations and any qualified allocation statistics remain outstanding. The reported native compiler/Cargo PIDs exited before ownership tracing, so no workdir/task attribution is established. A later current native snapshot was empty; no external work was changed. Timing may resume only after a real quiet fence and parent allocation.
Current required Rust result is successful; source head is unchanged. Draft stays REVIEW_INCOMPLETE. No measured efficiency benefit, allocation reduction or merge-ready conclusion follows. Proposed hosted fallback in the canonical checkpoint is unexecuted and would produce CI-runner evidence, not 5700X data.
Evidence/resource checkpoint: #5407 (comment)
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head independent review refresh — REVIEW_READY
Reviewed head fab7fd0, tree1762a35e687e29f7eaa4dc458d0476b68b876c29; final independent readback2026-10-04 18:48:37UTC. Parent authorized correctness-only acceptance; this supersedes earlier REVIEW_INCOMPLETE dispositions that required measured benefit.
Integration basis: candidate parent9acf0b6630fc21101baa0bbf52cc872dfe3b08a2; main48c921e47bbce92b027a5ebe83d53b2b2b42f75a. Executed integration5524540d4b62ffcad03caa25fa65c23a2106df34 / treed31f949eb6c1c9fb94932bfb1fc13cfd7c50d61a.
Claim: one evidence serialization, unchanged encoded length/SHA256/error context/budget/snapshot binding. Full two-file diff and semantic consumers inspected: GapItem::from_finding, identity writer, separate list-summary counting, budget consumers, real snapshot producer/identity, list/detail/resource output and test oracles. Blocking findings:none.
Observed proof: four new tests explicitly pass in both decoded logs (Rust-only6813passed/0failed/1ignored; routed11660passed/2skipped). Exact executable provenance, CLI byte parity, complete ten-response MCP parity, actual stale-snapshot rejection and retained-current recovery, and corrupted-resource rejection independently reviewed. Serializer count/error/buffered byte-hash/equal-length identity controls qualify this bounded source change; no additional source-mutation gate is imposed.
Current checks15success/27skip/1queued advisory review, no failure. Ripr Rust Small Result successful with required Actions app15368. Classic protection zero approvals/strict=false; active ruleset18845973 zero approvals and resolved review threads required. Optional write_all suggestion addressed by source-backed reply4178858620, read back, then resolved and read back. Direct snapshot-field assertions remain optional hardening. Earlier clone defect repaired; execution-unverified questions superseded by actual logs.
Missing accepted CPU/wall/RSS/allocation data remains follow-up and does not block authorized correctness-only acceptance. Renewed18:38:40–18:38:46 block failed prelaunch, launched no subject; functional timings are ineligible. No efficiency, general compatibility or release qualification claim. Public acceptance, remote state and thread resolution refreshed; source/tests/artifact/integration unchanged.
Independent reviewer review_efficiency_protocol performed read-only inspection without builds, subject execution, profiling or writes. Author records its explicit disposition with COMMENT due GitHub's author-approval constraint. Disposition:REVIEW_READY for normal protected squash convergence.
|
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. |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm snapshot::from_output -> get_gap -> GapItem::document(id) route still derives GapItem via from_finding each request; the new test rebuilds oracle items and proves get_gap returns item.document(original_id) for both equal-length variants.
- Confirm two GapItem::from_finding paths can still call serialized_evidence_identity after a prior step allocated evidence_core; if evidence_core build fails, no digest is emitted.
- Confirm snapshot_identity_binds_same_length_evidence test rebuilds oracles via GapItem::from_finding then overwrites evidence_bytes/digest from a second serde_json::to_vec pass.
Refuted
- Two-pass serialization or hidden buffer retention of full evidence bytes remains in serialized_evidence_identity.; refuted because: Diff shows one to_writer into IdentityWriter; write accepts the full buffer and returns its length, so no re-buffering or second pass is possible. The Cell-counter test for the Observed Serialize impl asserts exactly 1 call across all listed inputs.
- The PR body says 'one evidence serialization' but the helper only counts writes through the producer; a future re-serialization elsewhere would not be observed.; refuted because: The claim is scoped to GapItem::from_finding's evidence projection, which is the only call site for serialized_evidence_identity. The cell-counter test verifies that one pass produces length+digest matching the to_vec oracle. The PR body and author replies explicitly disavow total projection work measurement.
- IdentityWriter write_all default loop may double-process the final partial buffer and inflate evidence_bytes or sha256, breaking the byte/hash oracle.; refuted because: IdentityWriter::write is infallible and returns the full buffer length; serde_json::to_writer only invokes write with complete chunks plus at most one final chunk, so the default write_all loop degenerates to a single call and bytes/digest match serde_json::to_vec. The new evidence_identity_serializes_once_and_matches_encoded_bytes test asserts length+digest equality against to_vec across null/empty/nested/escapes/Unicode/64KiB/finding values.
- The fused count+hash writer should be promoted to a shared module-level helper to avoid future duplication (e.g. for list_summary or other metrics).; refuted because: list_summary already uses its own serialized_bytes and no other call site needs both count and sha256; promoting would widen surface beyond parent #5301 item 3 and recreate the duplication the PR removes.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
MCP refresh previously encoded every complete gap evidence document twice and retained a full encoded buffer for SHA256. This change counts and hashes the same JSON byte stream in one writer, preserving byte budgets, evidence digests and snapshot identity.
Implements only #5301 item 3. The parent authorized correctness-only acceptance after repeated quiet-host fences failed. CPU, latency, peak RSS and allocation benefits are unmeasured; no efficiency improvement is advertised.
All four new tests explicitly pass in the Rust-only job (6,813 passed, zero failed, one ignored) and routed Rust job (11,660 passed, two skipped). Policy, all-target checking, strict Clippy, tests/doctests, golden and fixture contracts pass. Both jobs execute integration commit
5524540d4b62ffcad03caa25fa65c23a2106df34, treed31f949eb6c1c9fb94932bfb1fc13cfd7c50d61a, parents main48c921e47bbce92b027a5ebe83d53b2b2b42f75aand the candidate. Local standalone Rust 1.95 rustfmt and whitespace checks also pass.The qualification checkpoint binds exact release executables, identical build inputs and the corpus owner's anyhow pin. Ten-response functional transcripts match byte-for-byte (61,741 bytes; SHA256
be0c562833a2c2e9198052a9c8a6aa63d60de40d1ea5fdb0f125b8dacdd08406). Initial/repeated refreshes complete with six findings; list selection, omissions, budgets, detail and resource identities match. Actual stale-snapshot requests fail correctly and recovery succeeds; corrupted resource content is rejected by the parity oracle.Functional observations are explicitly ineligible for performance claims. Earlier timing samples were rejected. The renewed 18:38:40–18:38:46 UTC block also failed its prelaunch competing-compiler fence, launched no subject and released all owned process charge. The measurement plan retains A/A noise controls, interleaved A/B–B/A, exact output parity and bounded resource controls. A read-only existing Ubuntu 22 CI path is authorized for follow-up; it would establish runner-scoped observations, not 5700X results. Allocation statistics remain unavailable pending a qualified observer.
Published head
fab7fd03b478c30faa13db432eccbf0c0a76575f; tree1762a35e687e29f7eaa4dc458d0476b68b876c29; sole parent/basis9acf0b6630fc21101baa0bbf52cc872dfe3b08a2.Rollback is this two-file change. Parser/cache/OOM work, list selection, detail cloning, transport encoding and dependencies remain with their existing owners. This PR does not close the eight-item #5301 or qualify a release.