Repository navigation
perf(analysis): compute owner reach once per seam in sort_related_tests_for_seam (Closes #12478) - #12537
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 54 minutes. View limit details
|
|
Triage: wheel/package lanes (plus source-of-truth/spec-digest where present) fail while main itself does not compile with the known E0061 rust_test_stub arity break; none of this diff touches the stub files. No candidate action: rebase past the main fix (#12466) once it lands and re-qualify. |
…12478) sort_related_tests_for_seam now calls credited_related_tests once with the whole related set so the reverse owner-reach walk is not rebuilt per test. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
d0afb79 to
d75cc0a
Compare
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm the build-count regression is not independently red/green-distinguishing against the pre-change implementation because CREDITED_OWNER_REACH_BUILDS was added in this same change.
Parked follow-ups
- Full and compact evidence retain separate credited owner-reach walks for stage scoring; these are pre-existing sibling paths, not regressions from the once-per-seam ranking optimization.
Evidence gaps
- The regression fixture validates the one-build-per-sort invariant and credited oracle strengths, but the packet contains no completed cargo-test receipt.
- The PR's red/green proof depends on a local-only rust_test_stub arity workaround, so hosted execution of this exact head is still unverified.
- Executed test evidence for this candidate is incomplete because the scheduled cargo-test receipt is absent and the ripr sensor failed.
- Execution evidence for the new regression and unchanged oracle behavior is incomplete because cargo-test has no receipt and ripr failed.
- No hosted cargo-test receipt is available; current-head compilation remains unverified because of the inherited rust_test_stub arity break documented in the PR and prior thread.
- Independent execution evidence for the new test is currently unavailable despite the PR reporting targeted local runs with a temporary workaround.
- Model proof intent was rejected by deterministic validation.
- The remaining evidence gap is the absent scheduled cargo-test receipt, not a demonstrated defect in the batching logic.
|
|
…12434's refuse gate Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmmcWPXoomU73ZhfXet
|
Decision (reversible fork): port, don't close. Main's #12434 changed the same gate ( Pushed 7ab1b39: merged main, took main's versions of the three conflicted files, and re-applied the delta on top of #12434's signature ( Not yet proven: I did not compile the ripr lib tests locally (memory floor). Hosted CI on this head is the proof; review of record still needed before merge. Generated by Claude Code |
|
|
There was a problem hiding this comment.
Verification questions
- Confirm the regression compares full and compact propagate state plus selected oracle strengths, but does not exhaustively compare every ranked oracle against the pre-change implementation.
- Confirm the new regression is not independently red/green capable against the pre-change implementation because its build counter was introduced in this same change.
- Confirm the new regression is not independently red/green-distinguishing against the pre-change implementation because its build counter was introduced in the same change.
Evidence gaps
- The new regression checks the once-per-sort build count and representative credited-view strengths, but the exact-head test receipt is missing.
- The claimed once-per-seam owner-reach invariant is exercised by a new build counter test, but no completed cargo-test receipt is available in the packet.
- No completed cargo-test receipt is available for the changed Rust paths, leaving runtime behavior and inherited main compilation unresolved.
- The regression fixture verifies one owner-reach build per sort and representative credited oracle strengths, but its execution is not evidenced by a completed cargo-test receipt.
- Current-head execution evidence is incomplete because the cargo-test receipt is absent and the ripr sensor failed.
- Exact-head compilation and execution are not established by the available evidence.
- Exact-head execution of the new oracle regression and existing #12060 behavior remains unverified.
- Model proof intent was rejected by deterministic validation.
- Execution evidence for the exact candidate head is incomplete.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — head 7ab1b39
Review against current main (merge base da6c9c1; git diff origin/main...head is 5 files: test_grip_evidence.rs, related_tests.rs, its tests, a changelog fragment and a traceability fragment).
Equivalence of the batched call to the per-test calls (read from source):
credited_related_testsis a 1:1.mapover its input, so the returned views are in input order andviews.len() == related.len(). Its per-test logic reads only the owner reach (a function of context and owner_fn, identical for every call), the test and its reason, so a view does not depend on which other tests share the slice. Building the owner reach once and indexing by position therefore gives the same view as a one-element call.- The refuse gate still applies to each test: the batched call keeps
refuse_other_function_oracleand theis_proximity_only() || AssertionTargetAffinityplusassertion_pins_other_functioncheck inside the per-test closure.refuse && !related.is_empty()only skips work when nothing would be credited. Withrefusefalse or no owner_fn, every view is a borrowed original, as before. - Release-mode fallback:
views.get(i)falls back to the uncredited test on a length mismatch, which would silently skip the refusal; thedebug_assert!that guards it is compiled out in release. Not reachable today given the 1:1 map, so non-blocking, but a plainassert_eq!or zipping the two would remove the silent path.
Executed on a detached worktree of this exact head:
cargo clippy -p ripr --lib --all-targets -- -D warnings: exit 0.cargo test -p ripr --lib: 18036 passed, 1 failed. The failure iscli::interrupt::tests::isolated_child_signal_before_checkpoint_is_rejected, which fails under the full-suite load on this host, passes when run alone, and also failed the same way on #12811, whose diff does not touch it. Not attributed to this PR.- The new
match_arm_owner_reach_is_computed_once_for_many_related_testspasses: exactly one owner-reach build per sort over 200 sorts of 50 related tests, with the #12060 credited view held (other-functionNone, owner+otherStrong, extrasNone) and full/compact propagate agreeing. The counter is#[cfg(test)]-gated like MASK_BUILD_COUNT, so there is no unused static in a normal build. The test asserts the build count, not wall time, so it is not timing-flaky.
Not run: the Rust verdict-corpus and goldens on this head (the diff changes no output by construction, but I did not execute them), and the hosted Ripr Rust Small Result. Owner reads that Result green on this exact head before merging.
Generated by Claude Code
Keeps #12478's single owner-reach walk for the whole related set and adds the claims view to it: the walk runs when the other-function refusal or an established claims pin needs a view. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmnX7Tz1GG4u42hJwLN
Governing issue or accepted claim: #12478
Acceptance delta (one sentence): match-arm ranking builds owner reach once per seam instead of once per related test, with unchanged credited-view oracles.
Closes #12478
Summary
sort_related_tests_for_seamnow callscredited_related_testsonce with the whole related set of a match-arm seam, so the reverseowner_reachwalk (and its lazy unbounded closure) is built once per seam instead of once per related test.Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk fortrusted same-repo
riprwork. Confirm the change belongs here:dependency, or repo-ops development for
ripr-swarmsurface
Source-of-truth Links
Proposal: none
Spec: RIPR-SPEC-0094 (credited-view / other-function oracle refusal)
ADR: none
Plan item: none
Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
cursor/owner-reach-once-per-seam-8f08atd0afb792a41b34de5d12e1fbb1e11b174cb6b7beStack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): not decided
#12464 is a different claim (#12434, predicate-boundary oracle refusal) and deferred this optimization; this PR does not take that work.
Scope
Repo-seam ranking (
sort_related_tests_for_seam) batched the #12060 credited-view filter socredited_related_testssees the whole related set on a match-arm seam.Scope Classification
This PR is scoped by:
Production delta:
sort_related_tests_for_seamcallscredited_related_testsonce with every related test of a match-arm seam, then ranks from those credited views.credited_related_testsstill owns the MatchArm-only reverse walk; callers must not pass a one-element slice per test.Evidence/support delta:
match_arm_owner_reach_is_computed_once_for_many_related_testscounts owner-reach builds (must equal sort count, not related-test count) and pinsreduce_over=None,consume_and_reduce=Strong.Single acceptance criterion:
exposedfor the arm thatchecknow reads weakly_exposed (#11552 follow-up) #12060 answers.Non-goals:
app/test_stub.rsE0061 main break (fix(agent-stub): repair main build break from rust_test_stub arity (#12322 x #12357) #12466 / fix(ci): qualify the main Rust build repair with base-owned user-text judgment #12496).credited_related_testsfiltering rules.Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
Policy Impact
Ledger or exception notes:
Proof
Measurement (debug, unoptimized libtest, same 50-related-test match-arm fixture, 200 ranking repeats after one warmup):
About 50× fewer reverse walks and about 4.5× faster on this debug microbench. Not a release-mode benchmark.
Result, failures, or skipped proof:
rust_test_stub(..., None)fourth argument so the inherited fix(agent-stub): repair main build break from rust_test_stub arity (#12322 x #12357) #12466 E0061 would compile. That workaround is not in this candidate.cargo xtask precommitcurrently fails compilingcrates/ripr/src/app/test_stub.rs:1160E0061 on current main (fix(agent-stub): repair main build break from rust_test_stub arity (#12322 x #12357) #12466 / fix(ci): qualify the main Rust build repair with base-owned user-text judgment #12496). Not this change.Claim Boundary
exposedfor the arm thatchecknow reads weakly_exposed (#11552 follow-up) #12060 oracles and the proximity honesty corpus stay the same on this fixture.Rollback
Revert the commit. Ranking returns to one
credited_related_testscall per related test. No schema, cache generation, or public JSON change.Spec-Test-Code Traceability
match_arm_owner_reach_is_computed_once_for_many_related_tests; existingproximity_test_pinning_another_function_cannot_grade_a_match_arm_upcrates/ripr/src/analysis/test_grip_evidence/related_tests.rs(sort_related_tests_for_seam);credited_related_testsintest_grip_evidence.rsStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a (no workflow or lane change)
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code or tests.Gates
Local
precommitcould not compile the crate because of inherited E0061 inapp/test_stub.rs(#12466). Targeted tests above ran against a local-only compile workaround that is not on this branch.cargo fmt --check(changed files)cargo check --workspace --all-targets(blocked by fix(agent-stub): repair main build break from rust_test_stub arity (#12322 x #12357) #12466 E0061)Opened on behalf of cloud agent bc-e2219029 (bc-e2219029-842a-518c-8c07-28fd1a228f08).