Repository navigation
feat(analysis): record syntax run-memo reads in the probe trace - #10926
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f51xjzAhck2zj1mK7Bw3q
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 25 minutes. View limit details
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces tracking for syntax run-memo consultations in the RIPR_PROBE_READ_TRACE diagnostic, recording a memo read on every hit or miss. It updates the run_memo functions to log these reads, adds a test suite to verify the behavior, and updates the documentation. The feedback suggests optimizing the byte-to-hex string formatting loop in probe_read_trace::memo by pre-allocating the string and formatting in-place to avoid multiple allocations.
…mo and what is not covered (#9784) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f51xjzAhck2zj1mK7Bw3q
|
Generated by Claude Code |
There was a problem hiding this comment.
Verification questions
- Confirm real probe memo coverage is still not asserted by the CLI trace test identified in the seeded thread.
- Confirm the syntax run memo records one read for every in-scope consultation, but no real CLI test asserts that a memoized syntax product produces a Memo row.
- Confirm the sibling-path evidence covers the three named run-memo helpers but does not establish that no other syntax memo lookup route exists.
- Confirm the existing real CLI trace test does not assert a memo read, so direct scope-level tests do not prove real classification attribution.
- Confirm the unit test covers instrumentation semantics but not an end-to-end syntax probe.
- Confirm real probe memo coverage remains unverified by an end-to-end fixture.
- Confirm the available thread still lacks an assertion that a real probe emits a memo read; the new unit test directly constructs memo scopes and calls run_memo APIs.
- Confirm real CLI classification-path memo coverage is not asserted by the added test; the seeded thread already records this as unverified.
Refuted
- memoize_many crosses a worker/async-style handoff where memo state or trace attribution could be lost or misattributed.; refuted because: The changed code constructs keys and emits trace reads on the calling thread before worker execution; workers only receive computed values. The diff contains no JS runtime, GC, detach, or transfer ownership boundary.
- The per-byte hex formatting is an architectural defect requiring a preallocated formatter change.; refuted because: This diagnostic-only allocation is outside the changed semantics, the author explicitly declined it in the seeded thread, and it does not affect the memo boundary or trace behavior.
- The hexadecimal-subject allocation objection is a correctness or oracle failure.; refuted because: It is not: the formatting occurs only after the tracing-enabled check and affects diagnostic allocation volume, not the represented memo identity or read semantics.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f51xjzAhck2zj1mK7Bw3q
|
Merged main (includes the #10927 goldens fix) and pushed baff3f3, which also carries a docs commit stating where a real classification consults the run memo. Devin and github-actions asked for end-to-end memo coverage; I tried the CLI fixture with and without a helper chain and neither produced a memo read, so I did not add an assertion that cannot hold, and the design note now says no end-to-end fixture covers it. Generated by Claude Code |
|
The run on baff3f3 passed the gates and all four test shards; only the final Generated by Claude Code |
|
Independent source/currentness reconciliation at baff3f3: no new behavioral blocker found. All five candidate files, the complete docs-only b98e8e5→946f8d5 successor, and the complete five-path c948531→baff delta were inspected. The three production/test files and changelog have identical blobs across independently reviewed b98e8e5, current baff3f3, and executed merge f70fdb1; the changed coverage paragraph correctly retains unknown/reusable=false. Recording remains after memo-scope admission and before hit/miss lookup; batch reads stay on the caller thread; disabled tracing avoids formatting. Existing hosted logs pass the new memo unit test, 19 trace/run-memo library controls plus the real CLI preservation test (20 relevant controls total), and and classification/value-origin preservation tests. Those last two do not assert an actual memo row, so #10933 remains an explicit real-classification coverage residual, not an established production defect. Replacement qualification40690393732 passed producer, four shards, verifier and Result for baff3f3/request40690393732-1. Verifier:22,778 listed/JUnit, zero duplicate/missing/extra. Actual checkout f70fdb1 has base66048679 and candidatebaff3f32. Older same-head qualification40683252005 failed final eligibility and remains a failed historical attempt. Later main66048679→86c05558 changes agent-refusal/docs paths with no overlap in this five-path candidate; that later whole-main composition was not executed. Main ruleset and clean PR state were readable, but the legacy required-status-check inventory GET returned403 Resource not accessible by integration and was not retried. This receipt therefore does not assert independently enumerated current legacy protection requirements. No new qualification or formal APPROVE review was submitted. |
|
Review of record, head baff3f3 Angles inspected on this exact head:
Findings: two threads (Gemini, a CI: qualification run 40690393732 on this head passed gates, four shards, verifier and Squash-merging with the expected head. Generated by Claude Code |
Governing issue or accepted claim: #9784
Acceptance delta (one sentence): The Phase A read trace records a
memoread for every syntax run-memo consultation, hit or build, attributed to the calling site.Why
The design note requires memos to record on read, not on build, so a probe that hits an entry another probe built still shows the dependency. The syntax run memo (
syntax/run_memo.rs) is shared across probes inside a worker scope and was invisible to the trace.What changed
Kind::Memoandprobe_read_trace::memo(product, key_digest). The subject isproduct:key-digest(hex of the key over source text, discriminator and query). It returns before formatting when tracing is off.memoize,memoize_withandmemoize_manyrecord a read whenever they consult an entry inside a memo scope;#[track_caller]attributes it to the consumer, notrun_memo.Product::name()names the product.changelog.dfragment.Proof
external_docs:plus 64 hex digits; the site is the caller's file.probe_read_traceandrun_memolib tests pass;cargo xtask precommitpasses.Not claimed
Diagnostic output only. The digest names the key, not the produced value. The other memos in the design note's table (candidate index, transitive reach and the rest) are not yet recorded, and the unknown-input list is unchanged, so coverage stays
unknownandreusablefalse. No analysis behavior or speed change.Generated by Claude Code