Skip to content

fix(pilot): follow multiline match heads in change-first ranking (#5604) - #8026

Merged
EffortlessSteven merged 5 commits into
mainfrom
codex/pilot-5604-source-lines
Oct 15, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
codex/pilot-5604-source-lines

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #5604. Editing a later line of a multiline match scrutinee, pattern or guard could leave ripr pilot recommending an unchanged function. Pilot now carries the parser-owned match-head range through fact caches, inventories and seam-limited supplements.

The range is separate metadata: existing match/=> token offsets, display lines, seam IDs and calibration spans are preserved. Separate arm-body lines remain outside the head. Cache generations are full 1.73, compact/sharded 0.79, and file-fact 1.38, composing with main's already-landed #8011 generation. Live version consumers and dependent fixture commitments follow those versions.

Swarm / Source Boundary

  • Ordinary ripr-swarm product development; one production behavior.

Source-of-truth Links

Acceptance

Behavior Discriminator
Later scrutinee/pattern/guard lines count as changed Real parser → fact wire → inventory → pilot; literal line sets, offsets 49/156/184 and IDs; LF/CRLF
Body and unrelated lines stay outside the head Every surrounding line checked; arm body contains " => }"
Cache transport and invalidation Cold/wire cases, actual warm-cache-hit trace, source replacement, strict predecessor rejection including main 1.72/0.78
Missing/partial tests and both caps No-test and discovered smoke_only fixtures; actual inventory supplement; literal one-of-five accounting
Identity and fallback Pre-fix literal IDs; spanless calibration; invalid/absent metadata retains expression-span fallback

Production changes stay in existing parser/fact/seam/pilot owners. Synthetic initializers carry no range. The fact-size budget retains its old allowance plus exactly the optional range, without a per-shape heap allocation. Exposure/actionability, cap sizes, deduplication and analyzed/total accounting policy are unchanged.

Proof

Baseline 322088b: doctor, independently verified zero-diff check-fast and locked all-target check passed.

Behavioral RED: test-only commit c8e91de5cf0ba6baf7e0c714c6ee88e1783d28ab, tree 989268fcc3fd560efa16b35a7cb4367d766dc59f. Rust-only --lib multiline_match_ compiled and failed 2 subjects on actual false versus literal true. The real CLI subject compiled and failed actual top line 2 versus literal 5; both native exits 101. Neither was a setup failure. Test paths moved from analysis inventory to output/pilot after the architecture gate required correct ownership; independent token comparison verified preserved fixtures/oracles. CLI preconditions were strengthened without changing the ranking expectation.

Current head 184d240c8 is green locally:

  • 207 focused subjects: pilot 72, cache 106, schema 1, match CLI 1, first-use CLI 1, LSP 19, xtask 7.
  • cargo xtask precommit: pass, 24 changed records, merge base 3855 independently verified; all-target Clippy for both impacted packages ripr and xtask.
  • cargo xtask goldens check: 449 fixtures, zero drift, zero fixture errors after the declared fixture dependency prerequisite.
  • cargo xtask dogfood: pass, expected 1/2 findings and 6/6 first-action cases.
  • Ordinary Rust-only CI: actual checkout c6ce47c, parents 3855 + 184d, tree 4127900; 10,316 passed, zero failed, two ignored across 81 terminal summaries. Source-of-truth, security, Windows advisory, three-platform paste and read-only wheel workflows succeeded. Skipped lanes are not counted as passes.

The first Draft CI failure exposed four stale version consumers; those were repaired, preserving literal semantic expectations. Precommit then exposed test placement; tests were moved without a policy exception. A later actual generation conflict was composed with fresh 1.73/0.79 to reject main's 1.72/0.78 caches.

Initial local golden drift matched #7616's unprepared availability case: fixture-locked anyhow 1.0.100 was missing. The ordinary locked fetch in the same Cargo home restored the expected exposed result with unchanged source/binary/goldens. Crate checksum matches the lock. Binary SHA before/after preparation and recheck: 206613ac3ddf4d3c8a97b199e6da101bee98427f745cd74bf981161e4b8de89d. The diagnostic base build was cancelled, exit 143; no inherited source failure is claimed.

Pinned Rust 1.95.0, one Cargo job, isolated target, bounded commands. Original RED binaries/logs and exact source/test Git identities remain in /workspace/5604-evidence. RED log SHA256s: unit cf91c814782726e92e466754d4d399d28f3424b9ef39ef3452d06f70cea2645f, CLI eb3364c6ee3d3eb228fc5a98eef6ce8cf5a009be4939c1f0d90e7f344f5f547b. Current log-manifest SHA256 8d1be44b9c2292235326bec0ae09c5d56ceaf44f709446a1bf49213dcf1008c6.

Review and Integration

Independent fresh-context exact-head review covered semantic owners/consumers, literal IDs/line sets, actual CLI/caps, both wire routes, cache lineage and independently recalculated commitment chains. Composition review found no source issue. Automated suggestions are source-refuted or nonblocking hardening; no unresolved material finding or inline thread.

Later main 8b7a9ba4 has no new fact initializer or material prerequisite for this claim. Inspected merge tree 17566e6e is clean; affected implementation/oracle bytes are unchanged. No behind-only restack. A future newer-main checkout remains a separate proof subject.

No local/source blocker to normal expected-green Ready qualification. Merge disposition remains REVIEW_INCOMPLETE pending required hosted matrix and actual checkout receipt. Author COMMENT records are not account approvals.

Boundary and Rollback

Support-tier impact: none. No own policy/workflow/permission/dependency/process-spawn/publication change. Existing absent-file behavior stays governed by #6976. No full native-Windows execution claim. Changelog: changelog.d/5604-pilot-match-source-lines.md; spec/test/code traceability updated. Rollback: revert the squash.

Continuation

Owner / claim: this Codex pass, #5604.
Candidate: PR#8026 / 184d240 / basis 3855533 / tree 4127900 / observed merge c6ce47c.
Review: exact-head substantive source and completed local receipts; no established material finding.
Validation: local gates and ordinary Draft CI green. Ready confirmed at unchanged head 184d240c8. Routed Rust Small and Pilot Ranking are running.
Dependency: none missing; #8011 composed. Initial fixture setup issue resolved under #7616's declared prerequisite.
Next owner: root. Wait for Rust gates job 116219056431 and Pilot Ranking to finish, inspect required results and actual checkout commit/parents/tree, refresh merge review, then coordinate normal merge. Current gate checkout is NOT_ESTABLISHED: job-log read at 02:45:28 UTC returned 404 BlobNotFound while running. Ordinary CI's c6ce receipt is not substituted for that future checkout. Do not re-toggle Ready. No auto-merge requested.
Resources: retain owned source worktree, 3.6 GiB target, 1.2 GiB pinned toolchain and 357 MiB unique evidence for review/CI repair. Diagnostic base worktree/target released; no shared cache deleted.

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

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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: f38ff6c5-0e0e-40de-8f5e-b02edb298880
📥 Commits

Reviewing files that changed from the base of the PR and between d07e3ad and 184d240.

📒 Files selected for processing: 12
  • .ripr/traceability.toml
  • crates/ripr/src/analysis/mod.rs
  • crates/ripr/src/analysis/seam_cache.rs
  • crates/ripr/src/output/pilot/tests.rs
  • crates/ripr/tests/lsp_lifecycle/gap_corpus_currentness.rs
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/after.repo-exposure.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/agent-receipt.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/agent-verify.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/before.repo-exposure.json
  • xtask/src/tests/rust_corpus_projection.rs
🔗 Linked repositories identified

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

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Summary by CodeRabbit

  • Bug Fixes
    • ripr pilot now recognizes edits to later lines of multiline match expressions—including scrutinees, patterns, and guards—when ranking changes.
    • Matching remains accurate with cached results and seam limits, while edits to arm bodies remain separate from match-head changes.

Walkthrough

Parser probe facts now preserve source-line ranges for multiline match expressions and arms. Repository seams carry those ranges, and ripr pilot uses them to match changed lines. Cache generations and regression coverage were updated.

Changes

Match-head changed-line tracking

Layer / File(s) Summary
Capture and preserve probe source lines
crates/ripr/src/analysis/syntax/ra.rs, crates/ripr/src/analysis/facts/model.rs, crates/ripr/src/analysis/classifier.rs, crates/ripr/src/analysis/probes/*
Match-expression and match-arm probe facts carry inclusive source-line ranges. Fact serialization preserves the optional field. Other probe shapes and test fixtures initialize it as absent.
Carry source lines into seams and caches
crates/ripr/src/analysis/seams.rs, crates/ripr/src/analysis/seam_inventory.rs, crates/ripr/src/analysis/seam_cache.rs, docs/OUTPUT_SCHEMA.md, fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/*, crates/ripr/tests/lsp_lifecycle/gap_corpus_currentness.rs, xtask/src/tests/rust_corpus_projection.rs
Repository seams retain optional source-line coverage without changing their IDs or display lines. Tests cover multiline match heads and guard/body boundaries. Cache generations advance to record the added coverage.
Match pilot changes to source-line coverage
crates/ripr/src/output/pilot/current_change.rs, crates/ripr/src/output/pilot/tests.rs, crates/ripr/tests/cli_smoke.rs, docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md, .ripr/traceability.toml, changelog.d/5604-pilot-match-source-lines.md, crates/ripr/src/analysis/mod.rs
Pilot uses seam source lines when available and retains the previous span calculation as a fallback. Tests and specification entries cover matching, invalid ranges, warm caches, and seam caps.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 184d2

Pilot now follows edits to later lines of multiline match heads. Seam IDs and the existing fallback are unchanged. No merge-blocking risk was found; wait for the pending hosted checks.

Security architecture risk: 🔵 Low · up to 184d2

The change improves how multiline Rust match heads are attributed to edits. It keeps existing seam identities and display behavior, rejects stale cache generations, and preserves the prior behavior when the new line range is unavailable or invalid.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The changed cache constants allocate new internal cache generations without adding a caller, external API declaration, permission path, or dependency-direction reversal in the inspected cache boundary.

Trust Boundaries and Controls

  • observed — Stale or copied predecessor cache data is rejected before reuse through generation and embedded-key checks; malformed or integrity-invalid cache envelopes are not served as hits.

Resilience and Maintainability Implications

  • observed — Existing cache publication protects committed state across cancellation, partial shard writes, competing writers, and restoration races by using per-key publication coordination and publishing a manifest only after generation data is prepared.
Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Linked Issues check Passed Issue #5604 requires pilot to count changes within the real source range of multiline match scrutinees and arm patterns. The parser now carries inclusive match-head line ranges through fact wires, inv…
Out of Scope Changes check Passed The changes remain within issue #5604. Cache-generation updates, version-consumer updates, compatibility fallback, tests, specification, traceability, and changelog changes support match-head source-r…
Docstring Coverage Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 15 files. (7 skipped: 7…
Title check Passed The title clearly and concisely describes the primary change: updating pilot ranking to follow multiline match heads.
Description check Passed The description is detailed and on-topic. It covers the change, scope, source links, acceptance criteria, proof, cache updates, review status, claim boundaries, and rollback. Some template checklist s…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

I’m a rabbit; I hop through the lines,
Where match heads stretch past their signs.
Guards count, but bodies stay clear,
Warm caches keep the right lines near.
Pilot ranks the changed seam with care,
Then I nibble a carrot and disappear.

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

@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 source/oracle inspection record, recorded by the PR author as COMMENT (this is not an account approval).

reviewed_head_sha: d07e3ad
integration_basis: 322088b; tree ef27b3cf8444cafd85e9f8b991bef25581bd5186.
claim_boundary: #5604 match-head membership in pilot change-first ranking; no exposure/actionability or cap-policy change.

A fresh-context read-only reviewer inspected the entire committed diff, parser producer, attached/detached fact wire and decoder, inventory, full/compact/sharded cache transport, membership/ranking/budget/supplement consumers, output renderers, spec/changelog and traceability. It independently recomputed literal token offsets49/156/184 and IDs e940643c461ff034/4ce9196b0fa03e6d/4d0e996b0fc0342a. It challenged body/guard boundaries, punctuation literals, LF/CRLF, malformed metadata, missing AST, legacy fallback, cache generation and existing #6943/#6976 boundaries.

No actionable source or oracle findings remain. Initial test review found unobserved cache-hit/cap-trigger/partial-discovery premises; all three preconditions are now asserted. Match token/arrow identities and calibration spans remain unchanged. Pattern/guard coverage excludes separate body lines; inclusive end uses line_for_range_end. Zero/inverted tuples cannot reach range lookup. All affected cache generations advance and metadata survives both fact-wire routes.

Observed by the independent reviewer: exact committed diff and diff --check exit0; retained behavioral RED logs compiled and failed2 unit subjects and1 CLI subject on the intended wrong membership/ranking. At that review's terminal read, GREEN was still running; it did not execute Cargo or claim hosted/native Windows proof. Delivery-owner subsequent observation on unchanged d07e3ad: current unit regressions2/2, real CLI regression1/1, and pilot unit70/70 pass; remaining cache/fact/proportional repository checks are active/pending.

blocking_findings: none identified.
proof_or_review_missing: final completed local checks and published-head hosted receipts; native Windows execution not established, no executable attribute/missing-AST case claimed.
affected_currentness_dimensions: production, test stimuli/oracles, public membership claim and traceability reviewed for this exact head. Main's unrelated movement does not alter that review.
disposition: REVIEW_INCOMPLETE for qualification/merge; keep Draft through remaining local checks. This record supplies substantive source/oracle review, not a green-CI or merge assertion. Root coordinates merge.

@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

  • crates/ripr/src/output/pilot/current_change.rs:325 — touches_seam uses seam.source_lines() but the source_lines filter start>0 && start<=end silently treats None and Some((0,0)) identically, while Some((0,1)) is filtered to None. No test asserts that line 0 (impossible 1-based) vs filtered-out is observable. Add a test exercising Some((0,1)) falling back to expression-text span.
  • RIPR-SPEC-0009 acceptance clause uses inclusive language ('match head: the match keyword through the scrutinee, or the arm pattern and guard through =>') but the parser computes end as expr().syntax().text_range().end() for scrutinee and arm.pat()..end of arm for patterns, which excludes trailing whitespace and comments between match and expr. A trailing comment line therefore does not count as match-head even when a reviewer might.

Verification questions

  • Confirm unit tests pin exact line tokens 49/156/184 and FNV IDs but those are author-derived literals; any drift in hashing or line_index is silently encoded as truth.

Refuted

  • An attacker-controlled source_lines field in a tampered cache file could trigger OOB panic via changed.range(start..=end) with degenerate inputs; refuted because: RepoSeam::source_lines() applies a strict filter (start>0 && start<=end) before returning; invalid values are dropped to None and the consumer falls back to the existing expression-span path, which uses saturating_sub and display_line-based arithmetic.
  • Schema bump from 1.37→1.38 may orphan 1.37 caches mid-flight in long-running daemons; refuted because: ripr pilot is documented as a short-lived CLI invocation in this PR; no daemon owns the cache between runs. The bump rejects only 1.37 entries, which is the documented contract.

Parked follow-ups

  • ProbeShapeFact::source_lines is parser-initialized only at the two match/=> push sites in ra.rs; the synthetic ProbeShapeFact fixtures across probes/*::{classify,diff,repo,error_return_boundary_tests}.rs and seam_inventory.rs are explicit None per the PR's claim boundary.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@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 source review and automated-finding disposition, recorded by the delivery owner as COMMENT; this is not an account approval.

reviewed_head_sha: 24a6299
reviewed_tree: 3ad5b7f65bdf2ecd9b2ec03462397e9e708f5b1c
basis: 322088b
claim: #5604 match-head changed-line membership; cap/accounting and identity contracts preserved.

Fresh-context read-only reviewer inspected the implementation at d07 and all seven changed files in the24a fixup. It independently derived the token anchors/IDs and all changed content/raw/verify/receipt hashes. Version assertions follow live cache identity; before/after snapshots remain byte-identical; classifications, movement, deltas and routing expectations are unchanged. The prior review missed these downstream version consumers; CI exposed that miss and this review corrects it. No further live consumer or source finding was identified.

Disposition of github-actions review findings:

  1. Zero-start fallback is already discriminated at output/pilot/tests.rs:2620 by Some((0,20)), None and inverted ranges. It asserts false at18/22 and true at21. Removing the positive-start guard incorrectly admits18; returning no membership instead of legacy fallback rejects21. Some((0,1)) uses the same rejected branch and adds no missing behavioral requirement.
  2. The stated comment/boundary defect is refuted by syntax/ra.rs:1515-1523: interval start is the match token, end is the scrutinee's last occupied line. Comments/whitespace BETWEEN match and expression lie inside the continuous interval. Separate comments after the expression fall outside the spec's "through the scrutinee" endpoint. Arm range at1546-1553 ends at fat_arrow_token().text_range().end(), not end of arm; existing real-parser test accepts head lines3-5 and rejects body6-8 including punctuation text.
  3. Literal ID independence is established by the separate reviewer's recomputation from fixture bytes and documented FNV identity contract; the implementation's selector does not compute expected membership/IDs.

blocking_findings: none established.
proof_observed_by_reviewer: committed-byte diff/hash/source inspection and diff --check; retained original behavioral RED logs. It did not run Cargo or claim a hosted pass.
delivery_owner_observed_on_current_head: schema regression1/1, match unit regressions2/2 pass; remaining local/hosted proof in progress.
disposition: REVIEW_INCOMPLETE pending completed local and hosted receipts. Keep Draft until local qualification completes. Native Windows proof remains distinct.

@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

  • crates/ripr/src/analysis/seam_inventory.rs:3930 — multiline_match_heads_follow_changed_lines_without_moving_seam_identity pins display_line/ID literals that the parser would emit regardless of the source_lines fix, so a regression that silently zeroed shape.source_lines before reaching with_source_lines would still leave display_line/ID unchanged; consider asserting each seam has source_lines() == Some(start,end) before the touches_seam loop so the test fails the moment the wire/range is dropped.
  • xtask/src/tests/rust_corpus_projection.rs:129 — xtask literal updated to 1.72 but no symmetry test pins FILE_FACT_CACHE_SCHEMA_VERSION=1.38. If a future drift bumps only one side, this xtask check will catch the corpus side while the file-fact side remains silent. Add an xtask assertion mirroring the bump (or document why 1.38 is intentionally out of scope).
  • Author-derived literal pins (FNV ids e940643c…, display_lines 2/9/11, file_fact version 1.38, classified 1.72) make drift silently encode-as-truth. RED log SHA256 cf91c814…/eb3364c6… anchor the pre-fix failure but were self-issued; an independent recomputation by CI would harden them.
  • crates/ripr/src/analysis/seams.rs:620 — source_lines accessor filters Some((start,end)) with start>0 && start<=end. Some((0,1)) is silently coerced to None and falls back to the expression-text span; some downstream code paths may observe a span they expect to carry. Add a unit test covering Some((0,1)) + Some((0,0)) + Some((22,20)) cases alongside pilot_match_source_lines_preserve_identity_and_refuse_invalid_ranges so an adversarial cache payload cannot silently hijack ranking.
  • The size-budget pin probe_shape_fact_retains_no_per_shape_kind_allocation now subtracts an Option<(usize,usize)> allowance, but with String (24) + tag overhead the existing < size_of::<usize>() * 3 + size_of::<String>() * 2 + size_of::<Option<(usize, usize)>>() bound can be silently satisfied even if a future change reorders/aligns and shrinks the struct below the documented 72-byte pin. Pin the absolute size_of::<ProbeShapeFact>() so size regressions are caught regardless of layout drift. (crates/ripr/src/analysis/facts/model.rs:2448).
  • diff class is source-ub in Rust; lane scope is JS-backed memory crossing worker, async, GC, detach, and transfer boundaries. No JS, no SharedArrayBuffer, no Transferable, no worker postMessage in this PR. Lane is not applicable.
  • docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md:210 — Acceptance clause text 'match keyword through the scrutinee' and 'arm pattern and guard through =>' is inclusive; the parser actually uses expr().syntax().text_range().end() and arm.pat()..=> token end, which exclude trailing whitespace/comments. Tighten wording to 'match keyword through the scrutinee expression, excluding trailing comments; arm pattern and guard up to the => token' to keep reviewers from misreading.
  • seam.source_lines() filter start>0 && start<=end silently maps Some((0,1)) and None to identical fallback to expression-text span; only Some((0,20)) and Some((22,20)) are pinned in pilot_match_source_lines_preserve_identity_and_refuse_invalid_ranges. A literal Some((0,1)) case would make that contract observable and prevent silent behavior change if the filter is tightened.
  • Smallest-complete fix is achieved; the seam.source_lines().filter(|(start,end)| *start > 0 && start <= end) rule silently collapses Some((0,0)) and None and converts Some((0,1)) to None; an explicit invariant or property test asserting this equivalence would harden the contract against future regressions, particularly because the same value semantics are relied upon in touches_seam fallback semantics.

Verification questions

  • Confirm repoSeam::source_lines() filters start>0 && start<=end, silently coercing None/Some((0,0))/Some((0,1)) to fallback expression-text span; pilot unit test covers (0,20) and (22,20) but not Some((0,1)) (github-actions review flagged this).
  • Confirm fixture unchanged-after-attempt regenerates content_sha256 under schema 1.72 without changing movement/classification literals.
  • Confirm repoSeam::source_lines() filters (start>0 && start<=end); None and Some((0,0)) collapse to the expression-text fallback while Some((0,1)) also collapses. No test pins Some((0,1)) -> expression-text fallback explicitly; pilot_match_source_lines_preserve_identity_and_refuse_invalid_ranges only pins None, Some((0,20)), Some((22,20)).

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

Follow-up exact-head adjudication of the refreshed automated review, recorded by delivery owner as COMMENT, not account approval.

reviewed_head_sha: 24a6299
tree: 3ad5b7f65bdf2ecd9b2ec03462397e9e708f5b1c
integration basis: 322088b
Independent fresh-context reviewer read the current tests, cache/model contracts and committed source; no new blocker established.

  1. Dropping source_lines is already detected behaviorally. Identity pins serve a separate invariant. The cold and fact-wire membership loops assert literal line sets; removing the metadata makes scrutinee line3 fail, exactly the retained behavioral RED. A direct field-shape assertion supplies no missing discriminator.
  2. The xtask DTO projects source_subject.corpus from classified RepoSeamCacheKey (1.72); it has no file-fact version to mirror. File-fact1.38 has its own literal pin at seam_cache.rs:4318, stale1.37 rejection, and the schema-example test checks both nested versions.
  3. Independent recomputation has already occurred: the separate reviewer derived the three FNV IDs and the complete fixture commitment chain from committed bytes, then verified all three frozen RED executable hashes against their manifest. Hashes establish retained-byte identity; observed executed RED logs establish wrong behavior. Another implementation of FNV in CI is not required by an identified correctness gap. Exact-head hosted CI remains required.
  4. Some((0,20)) rejects the same zero-start branch as (0,1)/(0,0), and its positive legacy-line21/negative18/22 expectations distinguish fallback from accepting the tuple or returning no membership. Existing invalid-range test is behavioral, not only a getter check.
  5. The original fact layout assertion used less-than72 on64-bit, an upper budget, not an absolute size/minimum. The new bound preserves that budget plus exactly size_of<Option<(usize,usize)>>, retaining one-byte kind. A smaller layout is allowed; an absolute size would constrain platform/compiler layout without fixing a demonstrated defect.
  6. Match-token start includes comments/whitespace before the scrutinee. Separate trailing comments after that expression are outside the defined endpoint. Arm coverage ends at fat-arrow token, not body. Spec and source agree. The JS/worker/transfer lane is inapplicable: no such surface changes.

Review surfaces and RED identities from the prior exact-head record remain current. No optional expansion or test mirroring the implementation is added.
delivery_owner_observed: current-head31 nonempty focused subjects pass (schema1, parser2, matchCLI1, first-useCLI1, LSP19, xtask7); check-fast passes15gates/23changedpaths including full workspace all-targets Clippy. Selector independently verified merge-base322088b and23paths. Precommit/goldens/dogfood still pending; no pass inferred from an active command.
blocking_findings: none established.
disposition: REVIEW_INCOMPLETE pending remaining local and hosted receipts; Ready remains a qualification request, not merge approval. Root coordinates merge.

@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 of the test-placement repair (delivery owner COMMENT, not an account approval).

reviewed_head_sha: 4ad04f1
tree: b76fb0f67a871d27730ac7426dba9f771ef2638e
basis: 322088b
claim_boundary: unchanged #5604 match-head current-change membership.

Fresh-context read-only inspection confirms both reexports are cfg(test) pub(crate), the tests now follow output→analysis direction, and spec/traceability paths resolve. Independent token comparison found the main test unchanged apart from its redundant import. The guard fixture, literal expectations and membership loop are unchanged; the inline index setup retains the same file and flat-function memberships. No production or policy changes. Existing source/cache/hash-chain review and both automated-finding adjudications remain applicable.

The old source-blobs manifest is preserved as repair-24a-source-blobs.txt; final-source-blobs.txt and final-head.txt now bind4ad. Original RED source/binaries/logs remain retained. These are provenance receipts, not unexecuted proof.

blocking_findings: none in the repair.
proof_observed: committed source/token/trace inspection, diff --check, prior unaffected evidence. Final-head Cargo driver99544 is active; no pending command is counted as passing.
affected_currentness: test placement, equivalent index setup, traceability; production/ranking/cache/fixture semantics unchanged.
disposition: REVIEW_INCOMPLETE pending final local and hosted receipts. Keep Draft through local gates. Ready will request qualification; root coordinates merge.

@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 composition review, recorded by delivery owner as COMMENT, not account approval.

reviewed_head_sha: 184d240
tree: 412790000fab6bef832c2d722b48acadf19c2755
integration_basis: 3855533
parents:4ad04f1e+3855533; ordinary merge of an actual cache-generation conflict.
claim_boundary: #5604, unchanged.

The fresh-context read-only reviewer inspected the complete candidate delta against3855 and the conflict resolution. Main's colon-probe implementation is preserved byte-for-byte. Match production code, relocated parser→inventory→pilot tests, literal IDs/line sets and CLI assertions are byte-identical to reviewed4ad. Full1.73 / compact+sharded0.79 reject both prior1.71/0.77 and main1.72/0.78 across full/compact and single/sharded storage. File-fact generation remains1.38. Live docs, corpus assertions and snapshots agree; remaining older strings are history/rejection controls.

Independent committed-byte recomputation:

  • content sha256:ea3ab9d6addbf59e11d6b39e0e34589e9c3ae38ec274e918caa0397df1eea2da
  • both snapshot raw hashes sha256:043775a01919efb7afb4e502f49dc2f0509aa733bc5f30b6b3f0bd27fae7b6fa
  • verify raw hash sha256:3d2fa9bca2febca9f4c3edb47be132492fb2a5ff2e3bb523a4f84bce2672063d
    All dependent references validate; semantic movement/classes/deltas/routing oracles are unchanged. Diff whitespace check passes.

blocking_findings: none established.
affected_currentness: composed cache lineage, version consumers, commitments and integration basis; earlier full source/oracle review and automated-finding refutations remain applicable.
proof_observed: committed source/hash/token/trace inspection. Prior Cargo results remain attributed to original heads. Current184d driver8904 is active, not a pass.
residuals: complete current-head local gates and exact published-head hosted/actual-checkout receipts; no native Windows claim inferred.
disposition: REVIEW_INCOMPLETE pending proof. Keep Draft through local gates; root coordinates merge.

@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

  • Thextask rust_corpus_projection pins cache_schema_version == 1.73 but no symmetric xtask assertion pins FILE_FACT_CACHE_SCHEMA_VERSION=1.38; a future drift bumping only one side would be caught only on the corpus side.
  • crates/ripr/src/analysis/syntax/ra.rs:1522 — Match scrutinee source_lines uses expr().syntax().text_range().end() for the head's end, but the pat/guard path uses token.text_range().end() (= arrow position). If a guard sits past the arrow end the scrutinee path stays consistent, but a multiline guard past => is measured from the pat start to the arrow, which is the spec, yet the function falls back to token end on missing expr — pin a sibling test for None-mappable scrutinee (no expr) to lock the behavior.

Verification questions

  • Confirm rA parser computes match scrutinee end as expr().syntax().text_range().end() and arm pattern end as token.text_range().end() (the => token), excluding trailing whitespace and comments. Spec phrasing says 'match keyword through the scrutinee' but actual geometry is 'match keyword through end of scrutinee expression'. Not a security issue but is a documentation/contract mismatch.
  • Confirm seam_cache predecessor table now references 1.37 but real-world binary repacks may still emit arbitrary intermediate versions.
  • Confirm source_lines filter start>0 && start<=end collapses Some((0,1)) to None; the spec wording 'match keyword through scrutinee' excludes trailing whitespace/comments so a later edit may still read as unchanged.

Refuted

  • Adding source_lines to ProbeShapeFact (24 bytes Option<(usize,usize)>) violates the per-shape heap-allocation budget pin at facts/model.rs:2449.; refuted because: Refuted: the existing pin was relaxed by exactly that Option budget: assert!(size_of::() < size_of::()*3 + size_of::()*2 + size_of::<Option<(usize,usize)>>()); the addition is precise, not loose; reviewer comment in PR body confirms retention of the 1.38 fact-size regression with optional range.
  • Unbounded (start,end) range could cause OOB or information disclosure via line iteration; refuted because: touches_seam uses changed.range(start..=end).next().is_some() with start/end coming from the filtered source_lines() or the bounded expression geometry. There is no indexing, no allocation, no file/network I/O along this path. The end is bounded by expression text line count in the fallback path. No panic surface identified.
  • Could the new parser-owned tuple alias or outlive a TextSize token range, causing OOB or Dangling-pointer reads?; refuted because: TextSize values are copied into the seam; the parser passes them by value through push_probe_shape_with_text into ProbeShapeFact.source_lines (Copy type), and the seam-side accessors filter inverted/zero ranges before deriving a range. RepoSeam.source_lines is owned, not borrowed, so no lifetime escapes into tokens.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • RED log SHA256s (cf91c814…/eb3364c6…) are author-derived and self-issued; an independent CI recomputation would harden the red/green proof chain.
  • Test moves cross-layer (output->analysis) use cfg(test) pub(crate) reexports added to analysis/mod.rs; no production visibility bleed, no sibling reexports affected.
  • Schema-version bumps (CACHE_SCHEMA_VERSION 1.72->1.73, FILE_FACT 1.37->1.38, SHARDED/COMPACT 0.78->0.79) and one new 1.38->0.44 transition table row plus a 1.37 predecessor in the file-fact stale-generation loop. xtask assertion and gap-corpus-currentness mirror 1.72->1.73; file_fact 1.38 only mirrored at seam_cache literal pin (no xtask mirror). Follow-up: keep file-fact mirror symmetry out-of-scope per PR claim, but flag for human review.

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

Final pre-Ready inspection record (delivery owner COMMENT, not account approval).

reviewed_head_sha: 184d240
integration_basis: 3855533; tree412790000fab6bef832c2d722b48acadf19c2755
claim_boundary: #5604 match-head changed-line membership, preserving token IDs/calibration and cap/accounting.
changed_surfaces_and_semantic_owners_inspected: parser/fact wire and decoder, inventory/seam cache generations, pilot membership/ranking/budget/supplement consumers, rendered CLI, schema/version/hash consumers, moved tests, spec/traceability/changelog. Earlier exact-head source and independent recomputation records remain current.

blocking_findings: none established.
refuted_or_stale_findings: both automated waves' field-shape, version-symmetry, zero-start, size-budget and trailing-comment assertions are answered in prior records. Latest missing-expr suggestion is nonblocking: parser-backed extraction rejects syntax errors before shapes; lexical fallback emits none; defensive token endpoint remains safe. Arbitrary noncurrent cache generations fail strict equality, independent of the representative predecessor table.

proof_and_ci_observed:

  • Independent reviewer read207 passing focused subjects at184d, no ignored/failures; pilot72/cache106/schema1/CLI2/LSP19/xtask7.
  • Precommit v2 passes exacthead184d / mergebase3855 /24changed records, selected all-target Clippy for ripr+xtask; digest01e258c3ff4b898a597d63b2a8d4d62549bd4cb86b45eb1df03ceda19c21589c.
  • Prepared goldens:449fixtures,0drift,0fixtureerrors. Dogfood: expected1/2findings and6/6first-action cases.
  • Initial golden drift was unprepared fixture availability (#7616), resolved by declared locked anyhow1.0.100 fetch in the same Cargo home. Crate checksum matchesa23eb6...; executable SHA206613ac3ddf4d3c8a97b199e6da101bee98427f745cd74bf981161e4b8de89d is identical beforefetch/afterfetch/aftergoldens. No source/expected golden changed, and no inherited-source-failure claim is made.
  • Ordinary Draft CI/advisories successful. Rust-only job116208932523 actually checked outc6ce47c2, parents3855+184d, tree4127900;81terminal summaries total10316passed,0failed,2ignored. This is not the required all-feature matrix.

affected_currentness_dimensions: latest main8b7a9ba4 adds pure-tail/Err-side/Cargo-home/Python-doctor/VSCode changes. Independent source review found no new ProbeShapeFact initializer or material prerequisite for this claim. Local merge-tree is clean (17566e6e); eight implementation/oracle files remain byte-identical. Explicit absolute Cargo home preserves prepared proof. No behind-only restack.
residual_assumptions_and_non_claims: actual newer-main checkout and required Ready-triggered matrix remain unqualified. No full native-Windows claim; no auto-merge.
disposition: no local/source blocker to expected-green normal Ready qualification. REVIEW_INCOMPLETE for merge until required hosted receipts/actual checkout are inspected. Root coordinates merge.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 15, 2026 02:44
@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!

@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

@EffortlessSteven
EffortlessSteven merged commit 250b29b into main Oct 15, 2026
45 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/pilot-5604-source-lines branch October 15, 2026 03:41
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.

RepoSeam drops its source end line, so pilot's change-first ranking misses edits to later lines of multiline match seams

1 participant