Repository navigation
perf(check): cut repeated per-probe work on big TypeScript and Rust diffs - #4607
Conversation
…d Rust diffs Python source facts looked up each fact's line by scanning the file from the start, so extraction was quadratic in file size. An IndexedSource keeps the newline offsets and answers by binary search. TypeScript related-test selection walked the filesystem for package.json twice per (owner, test) pair. OwnerPackageScope resolves the owner's package once and each test directory once per owner. Rust classification reparsed the whole owner file per probe for the derived tuple admission even when the file cannot contain the canonical parameters; the names are now checked first. Per-(test, owner) value facts are memoized on the run-scoped candidate index, and test-name token matching no longer allocates two strings per (test, token). Output is unchanged: check JSON is byte-identical on 12 real commits of tokio, vite, django and ripr-swarm. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
|
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 reachedNext included review available in 1 minute. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (11)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
|
Overlap note from the crash-hunt lane:
Generated by Claude Code |
…-repos-b2bq5q # Conflicts: # CHANGELOG.md
…-repos-b2bq5q # Conflicts: # CHANGELOG.md
…hrough OwnerPackageScope #4580 owns the Python line-start index (SourceText), so this PR no longer carries IndexedSource. Main's new same-module entry reach used the removed same_package_root call; it now shares the owner's package scope with the other candidate passes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
and #4635) #4593 added a computed-title path calling the free line_for_offset, which #4635 made test-only in favour of SourceText::line_for_offset. Each merged green alone; together main does not compile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
…-repos-b2bq5q # Conflicts: # CHANGELOG.md # crates/ripr/src/analysis/language/typescript/tests_extract.rs
…-repos-b2bq5q # Conflicts: # CHANGELOG.md
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Conflict in typescript/related_tests.rs: main's OwnerPackageScope (#4607) filtered owner-call candidates by package; #4552 exempts import-anchored owner-call arms, so that filter stays off them. The constructor arm's cross-package check now uses OwnerPackageScope since same_package_root is test-only on main. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqbiiuYkC94scgE9rZ5K8W
Requested by Steven · project thread
Summary
Before:
ripr checkon a vite commit took 8.0 s and on a ripr commit 11.3 s (warm, main 6048b5a plus its build fix, 4 vCPU Linux).After: the same checks take 4.0 s and 7.8 s. On all 12 measured commits the JSON and stderr are byte-identical.
Three hot spots, each found by stack sampling a real run, each fixed without changing any verdict:
same_package_rootper (owner, test), which walks the directory tree looking forpackage.jsontwice.OwnerPackageScoperesolves the owner once and each test directory once per owner. All three candidate passes (direct, same-module entry from fix(typescript): relate tests that reach a private helper through a same-module export or factory product #4526, heuristic) share it.canonical_owner_rolesrequires; without them the answer was alreadyfalse.value_facts_for_testdepends only on (test, owner) but ran for every probe.TestValueFactsmemoizes it on the run-scopedRelatedTestCandidateIndex, keyed by the test's and owner's slots in that index. A test or owner that is not an element of the bound index is computed fresh and never cached. Test-name token matching also stops allocating two strings per (test, token).The Python line index (~79% of Django runs) was dropped from this PR: #4580 owns it (overlap ruling from the open-PR drain).
Ported fix for red main. Main at 6048b5a does not compile: #4593's computed-title path calls the free
line_for_offset, which #4635 made test-only.cargo fmt --checkalso fails ontypescript/mod.rs. This PR carries the same two-line fix as #4739 (passSourceTexttotitle_argument, reorder themodline). Both hunks no-op once #4739 lands.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Governing issue or accepted claim: 0.11 release hunt, "check speed on big repos" (project thread above); continues #4498.
Acceptance delta (one sentence): check is materially faster on large TypeScript and Rust repositories with byte-identical output.
Candidate Relationships
Candidate branch:
claude/check-perf-big-repos-b2bq5q. Builds on #4498 (merged). #4580 owns the Python line index. #4739 owns the main build and fmt repair; this PR ports it.Scope
Scope classification: one production behavior (check latency), no output change.
Non-goals: no caches that outlive a run, no parallelism, no change to any relation, verdict or JSON field.
Support-tier Impact
Policy Impact
#[allow(clippy::too_many_arguments, reason = ...)]on the memo-taking activation entry point)Proof
New equivalence tests, each checked against its old code path. The memo and word-match tests were also shown to fail under a mutation of the new code:
owner_package_scope_matches_same_package_root_for_every_pair(nested packages, no-package dirs, absolute and relative paths, cached second round)test_value_facts_memo_matches_fresh_facts_for_every_test_and_owner(fails when the owner is dropped from the key)test_name_has_word_matches_the_padded_substring_rule(every name up to 6 chars overa b _ é; fails with a non-overlapping search)The positive end-to-end derived-tuple admission stays covered by
tests/match_arm_tuple_derived_local.rs.Review: an independent read-only review pass found no behavior findings (one CHANGELOG nit, fixed). CodeRabbit is rate-limited and Gemini is out of quota, so both reviews are missing, not clean.
Claim Boundary
May claim: faster
ripr checkon the measured shapes with identical output. Must not claim a general speedup for every repository; the timings come from one machine with a warm cache.Rollback
Revert the squash commit. No data, schema or cache format changes.
Static Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code or tests.Gates
cargo fmt --check(via precommit)cargo xtask precommitriprandxtask, run directly🤖 Generated with Claude Code
https://claude.ai/code/session_015fB1dGecsPvXwSxSuqCNQQ
Generated by Claude Code