Skip to content

fix(output): base-side count in Summary, Hidden total matches bullets, unknown classes no longer read as a found absence (#8389) - #8493

Merged
EffortlessSteven merged 5 commits into
mainfrom
claude/dogfood-8389-noise-and-cost
Oct 17, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
claude/dogfood-8389-noise-and-cost

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Before: ripr check --base 7930d93^ on bytes printed 4 of 4 findings unsuppressed although 2 of those were base-side (deleted-line) evidence, and Hidden: said 1 lower-priority finding(s) omitted; 2 base-side... while listing 3 bullets. On regex c4865a0^ the header said 0 no path ... 1 unknown but the footer said ripr found no static test path for any of the 1 changed expression(s). Regex 64ad0b6^ (human-full) took 118 s with the pre-fix binary, spending most time re-parsing the same file per probe/test pair.

After: bytes Summary ends (2 base-side evidence, not candidate edit targets) and Hidden reads 3 finding(s) omitted: 1 lower-priority, 2 base-side evidence (not candidate edit targets). (ripgrep 241b87b: 55 finding(s) omitted: 26 lower-priority, 29 base-side; smallvec 1c3b840: 12 omitted: 1 lower-priority, 11 base-side). Regex c4865a0 footer now says ripr could not classify any of the 1 changed expression(s)...; found no static test path is kept only for the no_static_path class. Regex 64ad0b6 output is byte-identical with and without the parse memo; wall time 33.4 s on current main vs 28.8 s with the memo (most of the 118 s to 33 s drop was already on main, not this PR).

What it does: makes the human counts and footer agree with the finding classes and trims a repeated-parse cost, without changing any class, probe or classification result.

How: output/human.rs appends the base-side count to the Summary line (totals unchanged) and rewrites the all-no-path lead from the summary classes (no_static_path vs infection/propagation/static unknown); output/human/triage.rs states the omitted total before the mix; analysis/syntax/nesting.rs memoizes parse_source_file per thread (4 entries, files up to 512 KiB, keyed by full text equality so a hit is exactly a fresh parse). Spec RIPR-SPEC-0122 updated; 51 fixtures' human goldens blessed with reason. Added tests for the memo, the Summary/Hidden agreement and the three footer branches.

Refs #8389 (the signature/import-line noise, identical before/after pairing, source ... evidence lines and the serde_json ambiguous-parent note are not addressed here). Tests: cargo test -p ripr --lib filters nesting/output::human/classify/probes pass (1827); cargo xtask precommit exit 0 (goldens check incomplete for one network-dependent fixture, owner_return_pin_fallible_literal, left to hosted CI).


Generated by Claude Code

…tch its bullets, stop unknown classes reading as a found absence; memoize source parses (#8389)

Refs #8389. Summary appends the base-side count, the selected Hidden line states the total before the mix, the all-no-path footer follows class (no_static_path vs unclassified), and parse_source_file memoizes recent parses per thread keyed by full text. Fixture human goldens blessed under RIPR-SPEC-0122.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nf95NxBDVr2E4EGJVNg76T
@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!

@EffortlessSteven EffortlessSteven self-assigned this Oct 17, 2026
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 71 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 6a4cd0d5-10cf-4200-adbf-d799f232bd96
📥 Commits

Reviewing files that changed from the base of the PR and between 0af0fac and acc655c.

📒 Files selected for processing: 132
  • crates/ripr/src/analysis/syntax/nesting.rs
  • crates/ripr/src/output/human.rs
  • crates/ripr/src/output/human/triage.rs
  • docs/specs/RIPR-SPEC-0122-bounded-human-check-output.md
  • fixtures/constant_declaration_probe_reconciliation/expected/CHANGELOG.md
  • fixtures/constant_declaration_probe_reconciliation/expected/human-full.txt
  • fixtures/constant_declaration_probe_reconciliation/expected/human.txt
  • fixtures/currentness_matrix_move/expected/CHANGELOG.md
  • fixtures/currentness_matrix_move/expected/human.txt
  • fixtures/currentness_matrix_python_deleted_statement/expected/CHANGELOG.md
  • fixtures/currentness_matrix_python_deleted_statement/expected/human.txt
  • fixtures/currentness_matrix_tail/expected/CHANGELOG.md
  • fixtures/currentness_matrix_tail/expected/human.txt
  • fixtures/currentness_matrix_typescript_deleted_statement/expected/CHANGELOG.md
  • fixtures/currentness_matrix_typescript_deleted_statement/expected/human.txt
  • fixtures/decimal_field_observer_non_member_access/expected/CHANGELOG.md
  • fixtures/decimal_field_observer_non_member_access/expected/human.txt
  • fixtures/enum_variant_declaration_not_call/expected/CHANGELOG.md
  • fixtures/enum_variant_declaration_not_call/expected/human.txt
  • fixtures/error_path_diagnostic_absent/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_absent/expected/human-full.txt
  • fixtures/error_path_diagnostic_absent/expected/human.txt
  • fixtures/error_path_diagnostic_error/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_error/expected/human-full.txt
  • fixtures/error_path_diagnostic_error/expected/human.txt
  • fixtures/error_path_diagnostic_escaped/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_escaped/expected/human-full.txt
  • fixtures/error_path_diagnostic_escaped/expected/human.txt
  • fixtures/error_path_diagnostic_format/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_format/expected/human-full.txt
  • fixtures/error_path_diagnostic_format/expected/human.txt
  • fixtures/error_path_diagnostic_neutral/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_neutral/expected/human-full.txt
  • fixtures/error_path_diagnostic_neutral/expected/human.txt
  • fixtures/error_path_diagnostic_raw/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_raw/expected/human-full.txt
  • fixtures/error_path_diagnostic_raw/expected/human.txt
  • fixtures/error_path_diagnostic_typed_argument/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_typed_argument/expected/human-full.txt
  • fixtures/error_path_diagnostic_typed_argument/expected/human.txt
  • fixtures/error_path_diagnostic_typed_message/expected/CHANGELOG.md
  • fixtures/error_path_diagnostic_typed_message/expected/human-full.txt
  • fixtures/error_path_diagnostic_typed_message/expected/human.txt
  • fixtures/error_path_operand_error_lexeme/expected/CHANGELOG.md
  • fixtures/error_path_operand_error_lexeme/expected/human-full.txt
  • fixtures/error_path_operand_error_lexeme/expected/human.txt
  • fixtures/error_path_oracle_execution_called/expected/CHANGELOG.md
  • fixtures/error_path_oracle_execution_called/expected/human-full.txt
  • fixtures/error_path_oracle_execution_called/expected/human.txt
  • fixtures/error_path_oracle_execution_direct/expected/CHANGELOG.md
  • fixtures/error_path_oracle_execution_direct/expected/human-full.txt
  • fixtures/error_path_oracle_execution_direct/expected/human.txt
  • fixtures/error_path_oracle_execution_false_branch/expected/CHANGELOG.md
  • fixtures/error_path_oracle_execution_false_branch/expected/human-full.txt
  • fixtures/error_path_oracle_execution_false_branch/expected/human.txt
  • fixtures/error_path_oracle_execution_no_assertion/expected/CHANGELOG.md
  • fixtures/error_path_oracle_execution_no_assertion/expected/human-full.txt
  • fixtures/error_path_oracle_execution_no_assertion/expected/human.txt
  • fixtures/error_path_oracle_execution_reached_uncalled/expected/CHANGELOG.md
  • fixtures/error_path_oracle_execution_reached_uncalled/expected/human-full.txt
  • fixtures/error_path_oracle_execution_reached_uncalled/expected/human.txt
  • fixtures/error_path_oracle_execution_shadowed/expected/CHANGELOG.md
  • fixtures/error_path_oracle_execution_shadowed/expected/human-full.txt
  • fixtures/error_path_oracle_execution_shadowed/expected/human.txt
  • fixtures/error_path_oracle_execution_uncalled/expected/CHANGELOG.md
  • fixtures/error_path_oracle_execution_uncalled/expected/human-full.txt
  • fixtures/error_path_oracle_execution_uncalled/expected/human.txt
  • fixtures/human_full_shared_parse_port/expected/CHANGELOG.md
  • fixtures/human_full_shared_parse_port/expected/human-full.txt
  • fixtures/human_full_shared_parse_port/expected/human.txt
  • fixtures/human_full_shared_parse_port/expected/library-human-lines.json
  • fixtures/match_arm_tuple_derived_return_before_assertion/expected/CHANGELOG.md
  • fixtures/match_arm_tuple_derived_return_before_assertion/expected/human-full.txt
  • fixtures/match_arm_tuple_derived_return_before_assertion/expected/human.txt
  • fixtures/multi_hunk_removed_line_wrong_target/expected/CHANGELOG.md
  • fixtures/multi_hunk_removed_line_wrong_target/expected/human.txt
  • fixtures/observation_unverified_field_construction/expected/CHANGELOG.md
  • fixtures/observation_unverified_field_construction/expected/human.txt
  • fixtures/observation_verified_field_construction/expected/CHANGELOG.md
  • fixtures/observation_verified_field_construction/expected/human.txt
  • fixtures/observation_verified_return_value/expected/CHANGELOG.md
  • fixtures/observation_verified_return_value/expected/human.txt
  • fixtures/owner_return_pin_identity_traps/expected/CHANGELOG.md
  • fixtures/owner_return_pin_identity_traps/expected/human.txt
  • fixtures/owner_return_pin_json_alternate_return/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_alternate_return/expected/human.txt
  • fixtures/owner_return_pin_json_effectful_operand/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_effectful_operand/expected/human.txt
  • fixtures/owner_return_pin_json_ignored_result/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_ignored_result/expected/human.txt
  • fixtures/owner_return_pin_json_nested_literal/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_nested_literal/expected/human.txt
  • fixtures/owner_return_pin_json_real_literal/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_real_literal/expected/human.txt
  • fixtures/owner_return_pin_json_shadowed_assertion/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_shadowed_assertion/expected/human.txt
  • fixtures/owner_return_pin_json_shadowed_constructor/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_shadowed_constructor/expected/human.txt
  • fixtures/owner_return_pin_json_shadowed_owner/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_shadowed_owner/expected/human.txt
  • fixtures/owner_return_pin_json_uncalled_closure/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_uncalled_closure/expected/human.txt
  • fixtures/owner_return_pin_json_unrelated_equality/expected/CHANGELOG.md
  • fixtures/owner_return_pin_json_unrelated_equality/expected/human.txt
  • fixtures/propagated_error_closing_early_path/expected/CHANGELOG.md
  • fixtures/propagated_error_closing_early_path/expected/human-full.txt
  • fixtures/propagated_error_closing_early_path/expected/human.txt
  • fixtures/python_adversarial_changed_sink_non_delta_operand/expected/CHANGELOG.md
  • fixtures/python_adversarial_changed_sink_non_delta_operand/expected/human-full.txt
  • fixtures/python_adversarial_changed_sink_non_delta_operand/expected/human.txt
  • fixtures/python_dynamic_route_registration_limit/expected/CHANGELOG.md
  • fixtures/python_dynamic_route_registration_limit/expected/human.txt
  • fixtures/python_metaclass_limit/expected/CHANGELOG.md
  • fixtures/python_metaclass_limit/expected/human.txt
  • fixtures/rust_committed_golden_expected_file/expected/CHANGELOG.md
  • fixtures/rust_committed_golden_expected_file/expected/human-full.txt
  • fixtures/rust_committed_golden_expected_file/expected/human.txt
  • fixtures/rust_field_construction_token_coincidence/expected/CHANGELOG.md
  • fixtures/rust_field_construction_token_coincidence/expected/human.txt
  • fixtures/rust_test_written_expected_file/expected/CHANGELOG.md
  • fixtures/rust_test_written_expected_file/expected/human-full.txt
  • fixtures/rust_test_written_expected_file/expected/human.txt
  • fixtures/rust_test_written_expected_file_bound/expected/CHANGELOG.md
  • fixtures/rust_test_written_expected_file_bound/expected/human-full.txt
  • fixtures/rust_test_written_expected_file_bound/expected/human.txt
  • fixtures/ts_parse_depth_budget/expected/CHANGELOG.md
  • fixtures/ts_parse_depth_budget/expected/human.txt
  • fixtures/typescript_parse_error_unsupported_syntax/expected/CHANGELOG.md
  • fixtures/typescript_parse_error_unsupported_syntax/expected/human.txt
  • fixtures/whole_value_string_from_shadow/expected/CHANGELOG.md
  • fixtures/whole_value_string_from_shadow/expected/human-full.txt
  • fixtures/whole_value_string_from_shadow/expected/human.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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

Confirmed findings

  • Fixture goldens for owner_return_pin_fallible_literal were left to hosted CI per the PR description; if that fixture exercises the base-side Summary or unknown-class footer it may still need blessing, but the diff shows no other fixture remaining in a 'Pending' state beyond the 51 CHANGELOG entries already updated.
  • PR body claims 1827 tests pass and cargo xtask precommit exit 0; ripr sensor in this packet failed exit 2, cargo-test is scheduled-late (not yet present), and no clippy/fmt/build lease ran in this profile. The 51 fixture goldens are 'blessed' via CHANGELOG append, but no test asserts that blessed mode regenerates outputs — reliance on xtask ritual rather than a CI guard. Hosted CI still needed.

Verification questions

  • Confirm crates/ripr/src/output/human.rs:2486 — The without_base test asserts the render contains no substring 'base-side evidence' anywhere, but the plain Summary already references 'base-side' as a label class elsewhere in templates when no base findings exist? Confirm that with no BaseDeleted/MovedOrRenamed findings the rendered output really has zero 'base-side' substrings; otherwise relax to 'no (N base-side evidence parenthetical'.
  • Confirm existing test in human.rs still asserts old Hidden phrasing '(weak, base-side)' with single bullet count, but fixture diffs show Hidden now lists multiple bullets and uses new 'T finding(s) omitted: L lower-priority, B base-side evidence (not candidate edit targets)' wording. Stale assertion risk.
  • Confirm ripr sensor failed with exit code 2; safe to suppress because the PR is output-formatting + parse memo only and PR body explicitly states precommit goldens are correct on main. Re-run cargo xtask precommit in hosted CI to confirm green.
  • Confirm test summary_names_base_side_findings_and_hidden_total_matches_bullets asserts exactly 2 '(weak, base-side)' matches, but specimen has 1 weak-base-side bullet + the base_a/base_b selected findings. Mismatch likely.

Refuted

  • The Hidden bullet label '(weak, base-side)' in the new test counts is wrong; this is actually a test-gap, not a defect.; refuted because: Investigated: with selected=weak/non-base and base_a,base_b=BaseDeleted and lower=plain, the only (weak, base-side)-tagged bullets are findings that are BOTH weak AND base-side. None in this scenario, so count==2 fails on the test as written — flagged as candidate high.
  • An attacker could craft a diff that makes the cache hold many large parses and OOM the process.; refuted because: PARSE_CACHE_MAX_BYTES gates the cache: any text >512 KiB skips cache and goes straight to parse_source_file_uncached. Entries are truncated to 4 with move-to-front; each cache entry holds one source String (capped) and one Parse clone. Worst-case resident text per thread is fixed; Parse clones are sizeable but bounded by the same 512 KiB gate (classification does not attempt cache on over-cap sources). Not a remotely triggerable DoS; the only trigger is the same file being parsed repeatedly by classification, which the PR's own measurements (regex 64ad0b6: 33.4s → 28.8s) show is bounded to a small per-process/cap.
  • PARSE_CACHE adds an async/worker-handoff hazard by memoizing Parse; refuted because: Cache is thread_local<RefCell<Vec<(String, Parse)>>> with no Send/Sync impl and no cross-thread sharing. Classification work stays on the thread that owns the file text; the cache never crosses a worker/async boundary, never transfers Parse across a postMessage/transfer, and never reaches into a JS realm.
  • The new parse_cache could store mutable interior state via the green-tree Parse and break immutability assumptions downstream (e.g. if a caller caches a node and the next probe mutates the tree).; refuted because: rowan Parse trees are immutable green trees; clone() shares nodes observationally; nesting.rs already returns Parse by value everywhere, so sharing a cached clone is observationally identical to the prior fresh parse. The new test asserts equality of {:#?} for cached vs uncached on interleaved inputs.

Evidence gaps

  • Memo's MAX_BYTES bypass (512 KiB) returns parse_source_file_uncached. No test covers a >MAX_BYTES source hitting the cache path; only PARSE_CACHE_ENTRIES*2 small sources are exercised. Correctness of bypass is left to observation, not proved.
  • Model proof intent was rejected by deterministic validation.

Keep both numbered golden CHANGELOG entries for the two rust_test_written_expected_file fixtures.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nf95NxBDVr2E4EGJVNg76T
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 15:46
@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!

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

Confirmed findings

  • PARSE_CACHE_MAX_BYTES=512KiB silently bypasses the memo; the bypass is documented but not unit-tested. A fixture or test that injects a >512KiB file via parse_source_file is not asserted to behave identically to parse_source_file_uncached. Submaterial polish, not an oracle gap.
  • Parse cache ceiling 512 KiB and 4 entries is a hardcoded heuristic; the PR comment claims regex 64ad0b6 dropped 118s→33.4s on main and 33.4s→28.8s with memo, so the memo itself saves ~4.6s while cache eviction policy is untested beyond the unit test. No robustness regression; just a hardcoded magic number with no rationale comment beyond the regex example.
  • 51 fixture goldens blessed by CHANGELOG append + ripgrep-equivalent xtask ritual; no test asserts that blessed mode regenerates outputs and that PR's ripr sensor in this packet failed exit 2. Hosted CI remains the only guardrail.
  • Cache growth bound is text-derived (text.len() > MAX_BYTES ⇒ bypass), not entry-count check-then-parse; a 512 KiB file is parsed uncached but still allowed. No bug, but the spec only documents the bound, not the order of checks. Acceptable for current call sites.

Verification questions

  • Confirm pR body claims 'cargo test -p ripr --lib filters nesting/output::human/classify/probes pass (1827)' but cargo-test receipt is scheduled-late and not present in this packet; ripr sensor failed exit 2; no clippy/fmt/build lease ran. Hosted CI must confirm the 1827 count and the goldens check that the PR description flags as incomplete for owner_return_pin_fallible_literal. Without cargo-test proof the claim that Summary/Hidden agreement and the three footer branches are exercised is asserted, not witnessed.
  • Confirm no live cargo-test witness in this packet: cargo-test is scheduled-late, ripr sensor failed exit 2, build/clippy/fmt/check/clippy leases disabled by gh-runner profile.

Refuted

  • Summary note overcounts by including suppressed findings because base_side_summary_note iterates output.findings without applying the suppression filter that render_header_summary uses for unsuppressed; refuted because: Docstring states 'totals themselves are unchanged' and the note is attached to the 'unsuppressed' summary line as a parenthetical; the number is informational (how many counted findings are base-side), not a recomputation of the unsuppressed total. The unsuppressed count output.summary.findings - suppressed.len() is unchanged. No semantic conflict.
  • Hidden total clause in RIPR-SPEC-0122 could disagree with the new selected_hidden_line output for the all-base-side or all-unresolved omitted set, since the spec says 'All N omitted finding(s) are base-side evidence, not candidate edit targets' and the diff rewrote the base-side-mixed arm; refuted because: the all-base-side/all-unresolved arms in selected_hidden_line are not touched in this diff (only the (base_side,0,lower), (0,unresolved,lower), and (base_side,unresolved,lower) arms changed); the untouched All-N clause remains the only path for those pure sets, so the spec and renderer stay aligned.
  • Memo could leak or alias parse nodes across threads, causing UAF or type confusion in downstream syntax consumers; refuted because: thread_local storage isolates state per thread; Parse is returned by value with clone() sharing immutable green trees (no interior mutability); no raw pointers escape. Allocation failures cannot occur on the cache hit path because entries are pre-populated clones.
  • PARSE_CACHE could detach/resize a buffer aliased by a held Parse and corrupt subsequent parses or lengths; refuted because: Parse is rowan's immutable green tree (Arc-backed) whose SyntaxText borrows the green node, not a heap buffer the cache mutates; clone yields a fresh Parse pointing at the same green tree. Files >PARSE_CACHE_MAX_BYTES (512 KiB) bypass the cache entirely. The cache only stores the owned String key and clones the Parse on insert and on move-to-front; no in-place mutation, no resize of an aliased slice.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • ripgrep 241b87b (55 omitted) and smallvec 1c3b840 (12 omitted) referenced in PR body are not in this repo's fixtures; PR body's numbers are external to ripr-swarm and cannot be oracle-verified here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nf95NxBDVr2E4EGJVNg76T
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 16:02
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 16:02
@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!

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

Confirmed findings

  • No new unsafe surface or native-pointer ownership seam was touched by this PR. The added thread_local RefCell holds owned String + Parse; Parse is an immutable green tree so cloning shares structure observationally. parse_source_file no longer takes &mut and the only allocations are the to_string cache key and the clone of the parse, both bounded by the 512KiB gate and 4-entry LRU. No lifetime, aliasing, or ownership invariant regressed.
  • cargo-test sensor is scheduled-late and not present in this packet; the 1827-test claim and cargo xtask precommit exit 0 cannot be independently verified from available receipts (ripr sensor failed exit 2, no clippy/fmt/build lease). Hosted CI is the only remaining guardrail, which the PR description acknowledges.
  • The memo ceiling 4 entries / 512KiB and move-to-front policy have no boundary tests: only round 0..3 with 3 sources and a >2*ENTRIES eviction loop are covered, not the exact eviction point or the bypass on >512KiB.

Verification questions

  • Confirm pARSE_CACHE_MAX_BYTES=512KiB is a text-length gate, not an entry-count gate; a single >512KiB file parses uncached each call. Bypass is silent and not unit-tested for behavioral equivalence to parse_source_file_uncached.
  • Confirm new memo test asserts parse equality but not cache-hit behavior; an always-fresh-parse cache (no-op) would still pass. Coverage of move-to-front and 512KiB bypass is asserted only for correctness, not for hit-rate.
  • Confirm memo parse_source_file clones Parse per hit; RAAL semantics for SyntaxNode are not asserted by the test (only Debug fmt and errors().len()) — same Debug output is necessary, not sufficient for green-tree equivalence.

Refuted

  • Memo could mutate a shared Parse across threads and corrupt classification; refuted because: thread_local! gives per-thread storage; Parse is a rowan green tree whose APIs take &self; move-to-front only rearranges the Vec and re-clones the (immutable) Parse. No cross-thread aliasing introduced.
  • The memo's stored String key plus cloned Parse could double memory or hand back a parse whose green-tree internals were invalidated by re-parse elsewhere.; refuted because: Diff only adds an immutable cache (vec of owned (text,parse) tuples); moves and clones operate on the same immutable green tree that parse_source_file_uncached returned, and the 2021/Edition::CURRENT fallback decision is made before insertion. No back-mutation, resize, or detach surface exists.
  • The new thread_local! parse cache could be weaponized as an oracle or DoS amplifier (growing unbounded across threads, leaking parse-tree differences across security boundaries, surviving thread pool reuse to leak prior inputs).; refuted because: Cache is per-thread (thread_local!), keyed by opaque String equality only, truncated to 4 entries with a 512 KiB byte cap; no public visibility of entries, no parser API change, and parse_source_file_uncached still drives the actual parse. RefCell cannot leak across threads and entries are dropped when the thread exits. No allocation-failure / Box-from-slice pattern appears in the diff.

Evidence gaps

  • All 51 fixture CHANGELOG 'Pending' entries use cargo xtask goldens bless; no test asserts blessed-mode regenerates outputs and the ripr sensor in this packet exit-2 — precommit left owner_return_pin_fallible_literal to hosted CI per PR body.
  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • hosted-CI fixture owner_return_pin_fallible_literal remains the only golden not blessed by this PR; PR body explicitly defers it. No sibling fixture pattern is left in Pending state inside this diff.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 16:37
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 16:37
@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!

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

Confirmed findings

  • PARSE_CACHE_MAX_BYTES=512KiB bypass and the exact 4-entry eviction boundary are untested; submaterial oracle gap (no false-positive risk) but worth a focused boundary test.
  • 51 fixture CHANGELOGs all appended a Pending — <fixture> block rather than a diff entry; blessed mode is human-ritual (xtask) rather than enforced by CI. Acceptance relies on hosted cargo-test sensor.

Verification questions

  • Confirm 51 fixtures' CHANGELOG append 'Pending' entries assert blessing but no test confirms blessed-mode regenerates outputs; ripr sensor failed exit 2 and cargo-test scheduled-late in this packet, so the 1827-test claim cannot be independently verified from available receipts.
  • Confirm memoization is per-thread and equality-keyed by full source text; LRU evict is move-to-front followed by truncate(4). Test exercises interleaved sources and >2*ENTRIES eviction. No test asserts the >512KiB text bypass path returns the same parse as the uncached path.
  • Confirm parse memo unit test asserts memo == fresh parse via format debug + error count; >512KiB bypass path is exercised only by length check, not by an equality test that compares bypass result against parse_source_file_uncached.
  • Confirm memo lives only in parse_source_file; parse_clean_source_file still bypasses it. If classification in any sibling path calls the clean variant per probe, the memo savings are partial.
  • Confirm summary now names base-side findings; Hidden total equals bullets; without-base render keeps Summary unchanged and hides the suffix.
  • Confirm all-no-path footer lead now branches on (unclassified==0, no_static_path==0, mixed); existing test patches assertions rather than rewrites cases.
  • Confirm parse memo: equality-keyed LRU of 4 entries, 512KiB byte bypass, move-to-front; test covers correctness and >2*ENTRIES eviction but bypass and exact eviction point are uncovered.

Refuted

  • parse_source_file thread-local memo could leak mutable parse state across worker/JS postMessage boundaries; refuted because: The diff is pure Rust synchronous output formatting plus a thread_local cache; no js_bindgen or WASM bridge is touched and no Send/Sync boundary is added. The cache key is full text equality and stores Parse (an immutable rowan green tree), so sharing a clone is observationally identical and remains single-thread owned.
  • The new thread_local! RefCell<ParseCacheEntries> could introduce an aliasing or soundness regression: holding an owned Parse<SourceFile> plus String, mutating via borrow_mut, and serving clones to callers might extend lifetime past stack frames or share interior mutability.; refuted because: No unsafe was added; Parse<SourceFile> is an immutable green tree so clone() shares structure observationally; RefCell is confined to the memo and never aliased across threads (thread_local). Calls to parse_source_file return Parse<SourceFile> directly with no &mut escape; no FFI or pointer indirection exposed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants