Skip to content

perf(mcp): count and hash gap evidence in one pass - #5407

Merged
EffortlessSteven merged 1 commit into
mainfrom
perf/mcp-evidence-length-digest-5301
Oct 4, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
perf/mcp-evidence-length-digest-5301

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

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.

Acceptance Evidence
Same encoded length and SHA256 Independent buffered oracle covers empty/nested values, escapes, Unicode, 64 KiB content and real finding projection
One evidence serialization Serializer-call counter plus inspected production call site; total projection work is unmeasured
Same failure context Injected serializer failure preserves the original first-pass prefix
Same snapshot/get-gap binding Real snapshot producer and buffered-oracle identities; equal-length altered evidence changes identity
Real protocol compatibility Exact before/after executables return identical complete MCP transcripts, including wrong-snapshot rejection and retained-current recovery

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, tree d31f949eb6c1c9fb94932bfb1fc13cfd7c50d61a, parents main 48c921e47bbce92b027a5ebe83d53b2b2b42f75a and 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; tree 1762a35e687e29f7eaa4dc458d0476b68b876c29; sole parent/basis 9acf0b6630fc21101baa0bbf52cc872dfe3b08a2.

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.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ffee2dc0-877a-43fe-9b22-d29971336ab1
📥 Commits

Reviewing files that changed from the base of the PR and between 48c921e and fab7fd0.

📒 Files selected for processing (2)
  • crates/ripr/src/mcp/gaps.rs
  • crates/ripr/src/mcp/workspace.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Limit details: You’ve used all 10 included reviews currently available.


Summary by CodeRabbit

  • Bug Fixes
    • Snapshot IDs now distinguish findings with different evidence even when that evidence has the same serialized length. Retrieving a finding from a snapshot returns its corresponding original details.
    • Evidence length and digest now consistently reflect the same serialized content, including for varied JSON values. Serialization errors continue to include their existing context.

Walkthrough

The 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.

Changes

Evidence Identity

Layer / File(s) Summary
Single-pass evidence identity
crates/ripr/src/mcp/gaps.rs
GapItem::from_finding obtains evidence length and digest together. Tests check serialization count, byte length, digest, error context, and projection consistency.
Snapshot identity regression test
crates/ripr/src/mcp/workspace.rs
A regression test checks that different, equal-length evidence produces different snapshot IDs and that get_gap returns the corresponding original evidence.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to fab7f

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 Review

Security architecture risk: ⚪ Minimal · up to fab7f

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
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed path affects evidence and identity within existing MCP workspace snapshots. Finding-controlled content already reached JSON serialization in the base implementation; the replacement writer adds only in-memory counting and hashing, not a new privileged sink or repair capability.

Trust Boundaries and Controls

  • observed — The static evidence boundary remains separate from repair authorization. Served gap documents bind snapshot and gap links while retaining a null repair-attempt link; projection and serving do not authorize source edits or a repair transaction.

Resilience and Maintainability Implications

  • observed — Existing refresh controls reject concurrent attempts and publish only a fully constructed snapshot under the session lock. Projection or worker failure preserves the last-good snapshot, and interruption cleanup clears the in-flight state. The changed writer introduces no shared mutable state or partial-publication path.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 53.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: counting and hashing gap evidence in one pass.
Description check ✅ Passed The description provides a detailed summary, acceptance evidence, test results, scope limits, performance-claim boundaries, and rollback plan. It does not explicitly complete several template sections…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the bytes in flight
One pass counts and hashes them right
Two equal lengths, distinct IDs
The original evidence stays
Then off I hop beneath the moon

Comment @coderabbitai help to get the list of available commands.

gemini-code-assist[bot]

This comment was marked as resolved.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

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, ripr-rs-python-wheel-fab7fd03b478c30faa13db432eccbf0c0a76575f, 44,499,537 archive bytes, SHA256 0b1f730f98b1596a939131e06bb0962aab345217cfaa1332ac8f93e406747ffe. Its workflow pins Rust 1.95.0, release profile and Linux x64, and emits a source/tree/lock/toolchain/payload receipt. Three adjacent archives measured 44.48–44.63 MB by API metadata. These archive sizes are an artifact forecast, not runtime or expanded-binary measurements.

There is no qualified baseline artifact yet. In particular, #5385's head 53fa79c1ce8a55cce8081181cfd7c047482226b4 has tree 0be9a7a755504f624d7ba24045c8f575e8c49501, which differs from this candidate's exact base tree 46b1bb84c70628cc7a64e79484c0c37f9a7c47c6. Its successful wheel cannot be substituted merely because #5385 squashed into base 9acf0b6630fc21101baa0bbf52cc872dfe3b08a2.

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

EffortlessSteven commented Oct 4, 2026 •

Copy link
Copy Markdown
Member Author

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 ea55b3caa8ce39c7b680812979811d67c5a9cb63 / tree 5a5983462e94720b4a710d34aa532ab8cf8f2de6, parent 4ea0f70ef616da80e1ac0530e9f7c8a568b7c6dc. Complete two-file +165/−9 delta preserves later upstream changes. Reviewed source fab7fd03b478c30faa13db432eccbf0c0a76575f / tree 1762a35e687e29f7eaa4dc458d0476b68b876c29, sole base 9acf0b6630fc21101baa0bbf52cc872dfe3b08a2 / tree 46b1bb84c70628cc7a64e79484c0c37f9a7c47c6. Independent exact-head REVIEW_READY, required successful app-bound result, resolved thread and live protection/rules preceded merge.

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 5524540d4b62ffcad03caa25fa65c23a2106df34 / tree d31f949eb6c1c9fb94932bfb1fc13cfd7c50d61a, parents48c921e47bbce92b027a5ebe83d53b2b2b42f75a and candidate. Final squash is different; ordinary final-main run37225961527 subsequently cancelled. No final-main CI pass is claimed.

Matched artifact provenance:

Binding Baseline Candidate
Exact source 9acf0b6 fab7fd0
Run / artifact 37189021148 /11298229475 37187068140 /11298185963
Archive bytes 44495653 44499537
Archive SHA256 ded0a6ea326cddcdc5710efd7f8c9f1989f3c6bebaa385bae2e4d1484ad972ba 0b1f730f98b1596a939131e06bb0962aab345217cfaa1332ac8f93e406747ffe
Executable bytes 25436440 25440152
Executable SHA256 0416ba9c9cb2f3fa58cb5e993366949f5efa17326d47f7568233197fa57750da 1b4824889d727290c5f6f0193390aff4056a030a97bcdaa5c2ad4e74135b550e

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/SHA256be0c562833a2c2e9198052a9c8a6aa63d60de40d1ea5fdb0f125b8dacdd08406; completed first/repeated refresh/six findings, list/detail/resource identities, actual stale-snapshot error/current-SID recovery and corrupted-response rejection pass. Budget fields are observed parity, not independent limit/selector correctness. Timing from those functional runs is ineligible. All local performance attempts remain rejected. The renewed admitted5700X block18:38:40–18:38:46UTC failed its Cargo/rustc prelaunch fence: zero subjects/no first sample/groups[]/releasedtrue. No competing process stopped; ownership/workdir unknown. No local Cargo or Corsair work.

The admitted existing Ubuntu22 fallback #5838 is now protected squash merged20:45:17UTC as c51d10940a08cb9aa19ff48151af5e2cdc0ed46c / tree a5bae11b0804d7a83c7165dfbd158e321842bc47, parent8f29e0cfefe77488136ea1e3cf3ac4e269ca636b. Reviewed head856db1669047e12ff9245bb3a23a051587cf0e04/tree5dfff3ab87e00219bb21aa969ddec5e475d509fd; exact one-file+392/−0 patch and candidate workflow blob preserved. Final independent REVIEW_READY, resolved threads and live protection/app-bound required result preceded merge. Required run37228329651/worker111519449382 succeeded:12,087passed/2skipped;doctests2passed/1ignored;policy/all-target/strictClippy/golden/fixture/evidence contracts passed. Result111524566883/app15368 on exacthead; actual integration635c871fd42fdd6c8fdedce5cec224a291641afb/tree4817b6ea46c6976ce4dd031f2d062800bfb63907. Normal final-main run37233315063 cancelled; latermainf595cb895e581cae5aa7763d88f6a860d66ec209 contains the squash. No final-main pass is claimed.

Actual pair run37228898991/job111514200409 succeeded on exact historical9acf/fab sources and the corpus-owner anyhow pin. Official artifact11313144233, ZIP140,550bytes/SHA256930962aca03f10392e2a9419a1b7193749f738cd954721cb9efca181bd788865,36files/2,984,518uncompressedbytes;raw398records/SHA256ba92785c5e551a48227534eb933ae1d5cc151bdd7f9285df92f655a52e45fa97. All12complete30-response transcripts match;2validsix-finding CLI controls;12actualstale-SID rejection/recoveries;changed-response oracle negative pass;all14owned groups absent/released19:51:52UTC. Complete source/input/compiler/runner/driver/raw/output/arithmetic/control/release dimensions independently verified.

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 hosted-source worktree was removed through ordinary Git at 20:53:10 UTC after exact path/head/tree/branch/common-store checks, a fresh zero-process-reader check and the independent reviewer's zero queued-reader confirmation. This released 2,529,126 bytes including linked metadata. Task footprint is 108,539,657 bytes at 2026-10-04T20:56:34.2526211Z, below the 512 MiB cumulative allowance. Original matched artifact archives, unique successful/rejected raw evidence, hosted artifact, CI logs and receipts remain retained. The common source Git store and branches remain because they contain unique committed/unpublished proof-contract work and exact source/review history. Superseded expanded executable copies had already been released after verified restoration from the original archives. No permanent proof purge or unrelated state change.

#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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 4, 2026 18:50
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T18:51:29.829819Z fab7fd0 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@EffortlessSteven
EffortlessSteven merged commit ea55b3c into main Oct 4, 2026
48 of 50 checks passed
@EffortlessSteven
EffortlessSteven deleted the perf/mcp-evidence-length-digest-5301 branch October 4, 2026 18:50

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant