Skip to content

perf(review): decide second-stage pool relations without resolving every test (#12940) - #16096

Merged
EffortlessSteven merged 5 commits into
mainfrom
claude/project-thread-xgnffs
Nov 29, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
claude/project-thread-xgnffs

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

  • ripr review-comments on ripr-swarm main 7cf9cd6d, diff 52844de5..7cf9cd6d (the last 4 commits, 53 files, 22 edited tests), default settings, timed out at 600 s with a limited_timeout receipt. The run stalled in the second-stage narrowing that fix(review): stop review-comments running out of memory on large workspaces (#12940) #13919 added: for each of 45,207 caller-file seams it computed the complete relation against every candidate test and only then filtered to the 22 edited tests.
  • This PR makes that narrowing finish. It does not make that diff complete: 4,803 seams remain to evaluate after narrowing, and the run still ends in limited_timeout.
  • Changes:
    • The pool check resolves owner calls for pool tests only. Every other relation reason admits a test on that test's own facts, except the crowded assertion-token ranking, which gives no slot to a test an owner-call reason already admitted. Leaving other tests' owner calls unresolved can only lengthen that ranking, so a pass that did not truncate is exact; a pass that did truncate is answered by the complete relation, as before.
    • A pool with no test in the owner's package is answered without matching (every admission already applies the package prefix).
    • Each owner's pool direct-call answer is kept across that owner's seams for one narrowing pass.
    • imported_enum_variant_value is memoized in the per-index call-identity memos. It reparsed and walked the declaring file on every call and was about two thirds of the stack samples under the pool check.
  • The 0.11 release notes now state the bound: a diff that edits tests related to thousands of seams can reach the timeout, exits 2 with limited_timeout, writes no guidance, and ripr check is the supported route for it.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Proposal: #12940 profile comment (item 3, relation cost)
Spec: n/a (no rule change; RIPR-SPEC-0010 selection is unchanged)
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #12940
Acceptance delta (one sentence): the second-stage narrowing on the 53-file self-host diff finishes in 347 s instead of not finishing inside the 600 s default, with the same kept set as the complete relation on a 5,000-seam sample.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): claude/project-thread-xgnffs
Stack parent or prerequisite PR (if any): none. Merge waits on the coordinator's analysis/** hold for import #16016.
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): n/a
Accepted winner and losing candidate disposition (when decided): n/a

#13900 (trace counters, open, conflicting) is a different claim and is untouched.

Scope

  • analysis/test_grip_evidence pool relation check and its caller, one per-index memo in analysis/classify, a changelog fragment, one release-notes sentence.

Scope Classification

  • One production behavior

Production delta:

  • Same second-stage kept set, computed with less work.

Evidence/support delta:

  • Unit tests (test_grip_evidence::tests::pool_relation), changelog fragment, release-notes bound.

Single acceptance criterion:

  • For every seam and pool, the pool check answers what filtering the complete relation to the pool answers.

Non-goals:

Support-tier Impact

  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim

Claim/proof notes:

Policy Impact

  • none

Proof

Host: 4-core, 15 GB Linux cloud container, release builds, default limits (5,000 files, 600 s), RIPR_REPO_EXPOSURE_LATENCY_TRACE=1. Subject for every row: root at swarm 7cf9cd6d, --base 52844de5 --head 7cf9cd6d.

Binary Narrowing Result Wall CPU user Peak RSS
main 7cf9cd6d did not finish exit 2, limited_timeout, 178 seams evaluated 667 s 2,282 s 3.24 GB
this change (pre-rebase source c055046c) pool_22_rest_45207_kept_4803, 347 s exit 2, limited_timeout, 352+ seams evaluated 616 s 1,698 s 2.56 GB
  • Equivalence on the real workload: a temporary build compared the new pool check with the complete relation on every 8th seam of the same run. 5,000 seams compared (to seam 40,009 of 45,207 when sampling was last printed), 0 disagreements, including seams that took the truncation fallback (7,355 of 40,009) and 96 seams the complete relation keeps. The temporary comparison code is not in this PR.
  • ripr check --mode draft --format json --committed on the same diff: exit 0, 121 s, 1.63 GB, 46 findings.
  • Unchanged case: the fix(review): stop review-comments running out of memory on large workspaces (#12940) #13919 reproducer (3d3f19d7..a9bf95a6) on main 7cf9cd6d: exit 0, 57 s, 0.97 GB, second_stage_narrowed_pool_1_rest_2932_kept_41, receipt complete. Not re-run on this head.
cargo xtask precommit                                   # exit 0 (selected no Clippy subjects on the committed tree)
cargo clippy -p ripr --all-targets -- -D warnings       # see first comment
cargo clippy -p xtask --all-targets -- -D warnings      # see first comment

Result, failures, or skipped proof:

  • The new unit tests have not been executed. The ripr lib-test binary does not build in this 15 GB container (rustc is killed at 13.8 GB, twice). They type-check under Clippy. Hosted qualification is their first execution.
  • The fixture does not force the assertion-ranking truncation, so the fallback branch is covered by the real-workload comparison above and not by a unit test.
  • The post-rebase head was not replayed; the rebase conflict was one adjacent mod line in call_identity.rs.
  • First cut of this change (owner-call fast path plus a membership pre-check) still timed out: about 40% of seams fell through to the complete relation. Second and third cuts (single pool-first pass, per-owner memo) also timed out; the stage timing that followed is what found the enum-variant lookup.

Claim Boundary

  • May claim: the second-stage narrowing no longer consumes the whole default budget on this diff shape.
  • Must not claim yet: that review-comments completes on a large-workspace diff that edits tests related to thousands of seams, or any memory or time bound.

Rollback

  • Revert the squash commit. No schema, config or data change.

Spec-Test-Code Traceability

  • Spec: n/a
  • Tests: analysis::test_grip_evidence::tests::pool_relation::{pool_check_matches_the_complete_relation_for_every_seam_and_pool, owner_call_scope_resolves_only_pool_tests}
  • Code: analysis/test_grip_evidence/related_tests.rs, analysis/test_grip_evidence.rs, analysis/classify/{call_identity,owner_pin}.rs

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

CI Economics

n/a

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.

Generated by Claude Code

…ery test (#12940)

review-comments on a 53-file ripr-swarm diff that edited 22 tests timed out
at the 600 s default inside the second-stage narrowing. For each of 45,207
caller-file seams the narrowing computed the complete relation against
every candidate test and only then filtered to the 22 edited tests.

- Resolve owner calls for pool tests only. Every other reason admits a test
  on that test's own facts, except the crowded assertion-token ranking,
  which gives no slot to a test an owner-call reason admitted. The pool pass
  is therefore exact unless that ranking truncates, and a truncating pass
  is answered by the complete relation.
- Answer a pool with no test in the owner's package without matching.
- Keep each owner's pool direct-call answer across its seams.
- Memoize the imported enum-variant receiver lookup per index. It reparsed
  and walked the declaring file on every call and was about two thirds of
  the samples under the pool check.

The narrowing now finishes in 347 s on that diff (pool 22, rest 45,207,
kept 4,803). The run still ends in limited_timeout, because evaluating the
kept seams does not fit the remaining budget.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmv8ne82Ko6vufDhTN
@EffortlessSteven EffortlessSteven self-assigned this Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 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 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 137 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 5d5d8644-bc78-4488-9c52-c6e0c247fb8e
Commits

Reviewing files that changed from the base of the PR and between dd8cc26 and 2a7d40f.

Files selected for processing: 8

  • changelog.d/12940-pool-first-relation-check.md
  • crates/ripr/src/analysis/classify/call_identity.rs
  • crates/ripr/src/analysis/classify/owner_pin.rs
  • crates/ripr/src/analysis/test_grip_evidence.rs
  • crates/ripr/src/analysis/test_grip_evidence/related_tests.rs
  • crates/ripr/src/analysis/test_grip_evidence/tests.rs
  • crates/ripr/src/analysis/test_grip_evidence/tests/pool_relation.rs
  • docs/releases/0.11.0-release-notes.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request optimizes the performance of the test relation check in ripr by introducing a 'pool-first' evaluation strategy. It caches enum variant lookups via CallIdentityMemos and caches per-owner direct-call answers using a new PoolDirectCalls struct. By resolving owner calls only for tests within the target pool first, it avoids redundant parsing and analysis of unrelated tests. Unit tests have been added to verify the correctness of this optimized pool relation logic. No review comments were provided, so I have no additional feedback.

#12940)

The first run of these tests (reduced feature set, 15 GB container) showed
the fixture produced no helper_owner_call relation: a helper in a test file
is not credited. Use the in-file helper shape the existing helper tests
use, and check the direct and helper scoped walks separately.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmv8ne82Ko6vufDhTN

Copy link
Copy Markdown
Member Author

Proof update on head 2eb30258 (supersedes the "unit tests have not been executed" line in the body).

  • cargo clippy -p ripr --all-targets -- -D warnings and cargo clippy -p xtask --all-targets -- -D warnings: exit 0 on 9e5cbc0e (the Rust in that commit; 2eb30258 changes one test file and was formatted, not re-linted).
  • The lib-test binary builds in this container only as CARGO_BUILD_JOBS=1 cargo test -p ripr --lib --no-default-features --features lang-python,lang-rust <filter>. With that:
    • test_grip_evidence::tests::pool_relation: first run failed, 0 of 2. My fixture realized no helper_owner_call relation (a helper in a test file is not credited). 2eb30258 uses the in-file helper shape the existing helper tests use. Rerun: 3 passed.
    • analysis::test_grip_evidence: 726 passed. app::agent_brief: 61 passed. analysis::classify::related_tests: 381 passed. All on 9e5cbc0e.
    • analysis::classify::owner_pin: 4 failed, all in tests::json_construction (literal_json_admission_preserves_binding_and_operand_refusals and three siblings). The printed refusal is Syntax(MacroBinding("json")) on a serde_json fixture. Whether they fail on base is not established: the base test build was memory-killed twice here. This diff's only change under classify is the imported_enum_variant_value memo, which that refusal path does not call. Hosted qualification settles it.
  • Still not covered by a unit test: the assertion-ranking truncation fallback (covered by the 5,000-seam real-workload comparison only), and a replay on the post-rebase head.

CodeRabbit was rate-limited and Gemini posted a summary with no findings; neither is a review of this diff.


Generated by Claude Code

@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 found 1 potential issue.

Devin Review

…anking truncates (#12940)

The pool-relation fixture indexed 7 tests, below the crowded limit's floor
of 64, so the ranking never truncated and a pool-first pass that always
claimed exactness passed every committed test. The new fixture indexes 81
tests: the complete relation admits the pool test by assertion affinity
(forty owner callers take no ranking slot), the pool-first pass ranks all
81 and cuts it, and only the fallback gives the complete answer.

related_tests_in becomes pub(super) so the test can read the pool-first
pass's own exactness flag.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmv8ne82Ko6vufDhTN

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

SOURCE_REVIEW_READY

Independent source and oracle review of head 71eb688, by a session that did not write this change.

Inspected: the complete diff against base e7eff2a (8 files), and the delta 2eb3025..71eb688.

Exactness of the pool-first check, read in related_tests_in:

  • Every admission goes through insert_related_candidate: the first reason wins and the package-prefix predicate is the one the new early return uses, so a pool with no test in the owner's package cannot relate.
  • Owner-call stages (direct, helper, target-affinity) decide each test on that test's own facts, so resolving them for pool tests only leaves every pool test's candidacy and reason unchanged.
  • match_assertion_target_affinity is the one cross-test step. It skips existing candidates before counting, so the pool-first ranked set is a superset of the complete one; a pass that does not truncate admits the same pool tests, and a pass that truncates is answered by RelationScope::Pool.
  • The later proximity stages, the three retains and the dedupe are per-test.
  • OwnerContext derives only from the owner function, so keying PoolDirectCalls by that function's address is sound within one pass; the cache holds the pre-retain direct answer and does not store a cancelled walk.
  • The enum_variant_value memo reads only index sources and releases its lock before computing.

Stimulus and oracle grip: the 7-test fixture realizes six relation reasons and compares the pool check with the complete relation for every seam, 9 pools and both reason filters, requiring both answers to occur. The earlier head never reached the truncation fallback (the crowded limit has a floor of 64). pool_check_falls_back_to_the_complete_relation_when_the_ranking_truncates now does: 81 tests under a limit of 64, where the complete relation admits the pool test by assertion affinity, the pool-first pass alone reports inexact with no related test, and relates_to_pool_test returns true. A pass that always reported exact fails its second and third assertions.

Not run by this reviewer: any test or build on this head. The author reports the pool_relation filter 4 of 4 and all-targets Clippy exit 0 locally.

Missing evidence: hosted qualification has not run on this head, and the four owner_pin json_construction tests that failed in the author's reduced-feature run are unsettled until it does. The 5,000-seam comparison used temporary code that is not in the PR. Observation, unchanged by this PR: the seams_kept_by_scope doc says a cancelled lookup keeps its seam, while a cancel inside the lookup returns false.


Generated by Claude Code

EffortlessSteven commented Nov 22, 2026 •

Copy link
Copy Markdown
Member Author

Exact restack preflight: 71eb688e is still the PR head, and it conflicts with main 31ce919e. A three-way replay of every changed file used 20 hash-verified input blobs. The only text conflict is the adjacent declarations in crates/ripr/src/analysis/test_grip_evidence/tests.rs; keep both mod pool_relation; and main’s mod predicate_boundary_pairing;. The other hunks compose cleanly, including #15670’s full/compact pairing. #15696’s widened-repair implementation is untouched. A private composed patch applied to the exact main preimage, byte-matched the expected output, and passed the whitespace check. No Rust/runtime evidence was produced by this preflight.

On the owner’s refreshed head, run all-targets/all-features Clippy and the focused pool_relation (including forced truncation), cancellation, exact predicate boundary, and widened repair/cap controls. Carry the reporting limit: 347 s measured the narrowing step on the prior candidate, not the whole 53-file run. The whole default command still hit 600 s, returned limited_timeout and wrote no guidance, so keep ripr check as fallback; frozen-artifact replay and any new headline metric need their own receipts.

Current-base preflight (c796fca5, PR still 71eb688e): three additional overlapping files compose textually, but the old optimization’s package-only early return would discard #16049’s legitimate cross-package direct test. Remove that shortcut while retaining the landed per-call-site path/owner check and the private-owner refusal from #16097. A private exact-base patch (SHA-256 77345a47fe7c7f63ddd11b7e0450006d1f5b412be41d73b57e8c7e4a505f8c2a) verifies clean application and output blob equality; no Rust execution. It adds pool_check_preserves_cross_package_direct_call_identity: the sole outside-package test must equal the complete-scan result for a real dependency, while wrong qualifier, private owner, and undeclared dependency stay empty. A dev dependency may legitimately be visible to test targets, so do not apply a blanket exclusion. Recheck focused pool/reference parity, check_repair_agree pilot controls, crate_private_owner, same-test boundary pairing and all-feature Clippy on the refreshed head. Remeasure the composed artifact before claiming any performance gain.

Refreshed after #16155 (0e4ad2db): the only newly overlapping candidate path is analysis/classify/owner_pin.rs; a verified three-way replay is clean. Against this main its candidate diff adds only the 13-line enum-variant memo wrapper, leaving the landed macro/glob logic intact. The updated eight-file private patch applies and byte-matches on the new base (SHA-256 67c2c7a12afc8822479bb8eddb7fd9b05e0f605b75a58d9f170759be5009720d). Keep the previous cross-package controls and run the #16155 macro identity tests together with pool parity on the refreshed source; no Rust or performance run here.

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

REVIEW_READY for head 71eb688

Independent native-Windows review of perf(review): decide second-stage pool relations without resolving every test (#12940) at 71eb688.

Source review (verified against source)

  • The problem is measured, not speculative: ripr review-comments on a 53-file, 22-edited-test diff timed out at 600 s in the second-stage narrowing, computing the complete relation for each of 45,207 caller-file seams against every candidate test before filtering to the 22 edited tests.

  • The exactness argument is the load-bearing part and it holds: every relation reason admits a test on that test's own facts, except the crowded assertion-token ranking, which gives no slot to a test an owner-call reason already admitted. The pool pass therefore resolves owner calls for pool tests only; a non-truncated pass is exact (unresolved other tests can only lengthen the ranking), and a truncated pass falls back to the complete relation — the same answer as before, at the old cost, never a different answer.

  • The memoization is honestly bounded: PoolDirectCalls keys per-owner answers by the owner's index address for one narrowing pass only, with the doc comment stating the lifetime constraint explicitly; a pool with no test in the owner's package is answered without matching since every admission already applies the package prefix.

  • The framing is the product-contract kind: this PR makes the narrowing finish, does not claim the diff completes (4,803 seams remain and the run still ends limited_timeout), and the 0.11 release notes now state that bound — exit 2, no guidance written, ripr check the supported route.

  • imported_enum_variant_value memoized in the per-index call-identity memos addresses the measured hotspot (about two thirds of stack samples under the pool check).

  • Native proof (native Windows, worktree wt-16096 at head 71eb688): cargo test -p ripr --lib pool_relation (exit 0) - including the exactness pins pool_check_matches_the_complete_relation_for_every_seam_and_pool and the owner-call scope tests direct_owner_call_scope_resolves_only_pool_tests / helper_owner_call_scope_resolves_only_pool_tests; cargo test -p ripr --lib related_tests (exit 0) - the existing relation suites stay green; cargo xtask goldens check drifts only on the known pre-existing native-Windows fixture python_parent_collected_test_shadow (merge-base control reproduces it; #16425); cargo xtask check-evidence-promotion-honesty (exit 0); cargo xtask check-traceability (exit 0).

Residuals

The residual 4,803-seam evaluation on diffs that edit tests related to thousands of seams remains a documented bounded limitation, disclosed in the release notes rather than silently slow.

…tcut (#12940)

main now credits a direct call from a test in another package when it
settles on a unique free owner (#15278). The pool shortcut that answered
'unrelated' when no pool test sat in the owner's package would have dropped
that test, so it now applies only to owners that cannot be credited that
way. OwnerContext::cross_package_direct_owner is the one condition both the
direct-call walk and the shortcut read.

pool_check_preserves_cross_package_direct_call_identity builds a two-package
workspace through the production index and requires the pool check to equal
the complete relation for the outside-package caller, a call spelled through
another crate, and a test with no call.

Conflict: tests.rs module list (kept both declarations). The release note
now says the timeout names the ripr check command, which #16106 landed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmmv8ne82Ko6vufDhTN

Copy link
Copy Markdown
Member Author

Restack onto current main, head 2a7d40f88 (merge of main dd8cc2650; earlier reviews were on 71eb688e and do not cover this head).

What changed since 71eb688e

  • Merge conflict: the module list in test_grip_evidence/tests.rs; both declarations kept.
  • Source repair for an interaction the 22 Nov preflight comment identified correctly. Main now credits a direct call from a test in another package when it settles on a unique free owner (repair: check reports a gap (weak/unknown) that repair, stub and pilot call "no gap" or "strongly gripped" #15278). The pool shortcut "no pool test in the owner's package, so unrelated" would have dropped that test. It now applies only when OwnerContext::cross_package_direct_owner() is None; the direct-call walk reads the same method, so the two cannot drift.
  • New test pool_check_preserves_cross_package_direct_call_identity: a two-package workspace built through the production index (facts::build_index, because the credit reads manifest dependency names). It first requires the owner's package to be wscore/ and the complete relation to credit exactly the app test by DirectOwnerCall, then requires the pool check to equal the complete relation for that test, a call spelled through another crate, and a test with no call. With the old unconditional shortcut the first pool answers false against an expected true.
  • Release note wording: the timeout now names the ripr check command (fix(review): name recovery routes when review-comments times out in canonical_analysis (#12940) #16106 landed).

Proof on this head (15 GB container)

  • cargo test -p ripr --lib --no-default-features --features lang-python,lang-rust pool_relation: 5 passed, 0 failed. Two earlier attempts failed on my own test code (a private field access, then a hand-assembled index that could not realize the cross-package credit); neither was a production failure.
  • cargo clippy -p ripr --all-targets -- -D warnings: exit 0. cargo fmt --check: clean.
  • Replay, release binary from the merge commit 5994aa08f (the head adds only a changelog edit), review-comments on 52844de5..7cf9cd6d: narrowing second_stage_narrowed_pool_22_rest_45207_kept_4803 in 370 s (347 s on the earlier head); exit 2 at 626 s wall, limited_timeout, 178 seams evaluated, peak 2.33 GB. The same 4,803 seams are kept, which is the expected sign that the bounded shortcut did not change the narrowing answer on this workload. The error now names the ripr check command.

Not established

  • cargo xtask precommit did not finish locally: it was stopped by the session's background time limit with no failure in its log. cargo clippy -p xtask and cargo xtask verdict-corpus check-all were not run on this head. Hosted qualification has to carry these.
  • The "did not finish before" baseline was measured on main 7cf9cd6d, not re-measured on current main.
  • The four owner_pin json_construction tests from the earlier note remain unsettled locally.
  • No mutation run of the new test; the failure under the old shortcut is by construction.

Reporting limit. 347 s and 370 s are the narrowing step only. The whole command still reaches the 600 s default and writes no review guidance. The remaining cost is tracked in #16521 (ranking memos) and #16523 (owners named new related to about 7,000 tests each).


Generated by Claude Code

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

SOURCE_REVIEW_READY

Independent source review of exact head 2a7d40f against base dd8cc26 (8 files, +719/-35). I am not the author of this PR. This covers source and oracle by reading; I did not build or run this head, and hosted qualification has not run on it.

Read in full: the production diff in related_tests.rs, test_grip_evidence.rs, call_identity.rs, owner_pin.rs; related_tests_in and OwnerContext::resolve at the head; match_direct_owner_call; insert_related_candidate; imported_enum_variant_value_uncached; the call site seams_kept_by_scope; tests/pool_relation.rs; the changelog and release-note lines.

Claims checked

  1. Pool-first equals the complete relation unless the crowded ranking truncates. Holds by construction. With owner calls resolved for pool tests only, every pool test enters each matcher with the same facts as in the complete walk, because each owner-call matcher, the visibility record and both later retain passes read one test at a time. The only cross-test step is match_assertion_target_affinity. Tests whose owner calls were skipped are absent from candidates, so they can only add entries to the ranking; tests the complete walk drops again (inaccessible, renamed-import, local-binding) are in the ranking on both routes. So the pool-first ranking is a superset of the complete one, a pass that did not truncate implies the complete one did not, and a truncated pass is answered by RelationScope::Pool. The crowded fixture exercises exactly that fallback.
  2. The package shortcut is sound. Every candidate insert in the file goes through insert_related_candidate, which refuses a test outside the prefix. The single place the guard is lifted is the cross-package branch of match_direct_owner_call, and it reads owner.cross_package_direct_owner(), the same method the shortcut tests. A pool with no test under the prefix therefore cannot relate unless that method is Some.
  3. PoolDirectCalls may key on the owner function. Every OwnerContext field is derived from the owner function and the context, never from the seam, and match_direct_owner_call takes no seam. One instance serves one pool, one overlay and one pass (seams_kept_by_scope creates it locally). An owner with no function is not kept. A walk cut short by cancellation is not kept, since the checkpoint is read after the walk.
  4. The enum-variant memo is a pure function of its key. The uncached body reads only the three names and indexed sources, and the memo lives beside sole_type_declarer with the same lifetime and the same clear path.

Oracle grip. pool_check_preserves_cross_package_direct_call_identity asserts the fixture first (owner package wscore/, pool test outside it, complete relation equal to exactly one DirectOwnerCall), then anchors the expected answer to that unscoped relation, so an unconditional shortcut fails it even though the reference helper shares the shortcut.

Non-blocking suggestion. complete_answer uses RelationScope::Pool, which now carries the package shortcut too. In the every-seam-and-pool test the reference and the subject therefore share that rule. Deriving the reference from RelationScope::All filtered to the pool and the counted reasons would keep the shortcut out of its own oracle. The cross-package test already has the independent anchor, so this does not hold the head.

Missing evidence, recorded as missing: hosted qualification on this head; cargo xtask precommit, cargo clippy -p xtask and verdict-corpus check-all (the author reports them not run); CodeRabbit is neutral, which is absent review, not a clean one. No mutation run of the new test.

Public claim. The changelog and release-note lines state the narrowing time and that the run still ends in the typed timeout receipt; that matches the author's replay and does not claim completion.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Reading correction for the replay numbers on this PR (no source change, head still 2a7d40f88).

review_evidence_window status=evaluated_N is cumulative across both stages. The first stage evaluates 178 seams before narrowing starts. So:

  • "178 seams evaluated" on the restacked head (and on main 7cf9cd6d) means the first stage only. After narrowing finished at 370 s, the first second-stage window (24 seams) was still running when the 600 s budget ended: 170 s wall, 547 s summed worker time, no second-stage window completed.
  • "352+" on the pre-rebase source c055046c was 178 first-stage plus 174 second-stage seams.

What this PR establishes is unchanged: narrowing now finishes (347 s and 370 s) and keeps the same 4,803 seams, and the run still ends limited_timeout. What it does not establish is any second-stage throughput on current main; the restacked replay completed fewer second-stage seams than the pre-rebase one, and I have not isolated why (different base, single runs). The remaining cost is tracked in #16523 and #16521.


Generated by Claude Code

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

REVIEW_READY

Final published-head pass on exact head 2a7d40f, by a session that did not author this PR. The source and oracle review is 6100379631 on the same head; the head has not moved, so that inspection stands and this pass covers what it recorded as missing.

Hosted evidence read on this head

  • Rust gates: success. Its log shows verdict-corpus: 4 corpora checked, which covers the corpus check the author could not run locally.
  • Rust tests shard 1 of 2: 17,169 run, 17,169 passed. Shard 2 of 2: 17,218 run, 17,218 passed. Shards verify: success. All five pool_relation tests appear as PASS across the two shards, including pool_check_preserves_cross_package_direct_call_identity and the truncation fallback test, so the new oracle ran in the hosted suite.
  • Ripr Rust Small Result, vscode surface, candidate admission: success.
  • Skipped by routing, not run: the docs gate, the self-hosted Small variants and the vscode e2e job.

Review state

  • Unresolved review threads: 0 (read through the review-threads endpoint).
  • CodeRabbit is neutral because of its rate limit. That is absent review from that provider, not a clean one.
  • Conversation since the source review: the author's reading correction for the cumulative evaluated_N counter (comment 7247243187). No source change.
  • Mergeable against base dd8cc26, state clean.

Public claim. The changelog states the narrowing time from two replays and that the diff still ends in the typed timeout receipt. The "did not finish before" side was measured on an earlier main and not re-measured on current main; the author records that limit on the PR. The claim does not say the command completes.

Carried forward, not holding this head: the reference helper in pool_relation.rs shares the package shortcut with its subject in one test; the author has taken that into #16523. No mutation run of the new test was made; its failure under the old shortcut follows from the independent anchor in the test.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 56a4871 Nov 29, 2026
19 checks passed
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