Repository navigation
fix(config): linear duplicate detection for ripr.toml path lists (#11560) - #11615
Conversation
) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmojoz8WfVBYKstQAop
|
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 27 minutes. View limit details
|
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the test's fixed 10-second timeout can fail on an overloaded CI runner even when the implementation is linear.
- Confirm the duplicate oracle verifies the existing error wording for generated patterns, but does not directly compare duplicate detection across the other two changed path-list parsers.
- Confirm the test exercises successful parsing of all three large lists, but duplicate rejection is asserted only for generated_file_patterns.
- Confirm the PR states duplicate detection is linear for three path-list fields, while the repository-wide route scan available to this lane does not prove that no sibling parsers retain quadratic membership checks.
- Confirm the test's 10-second elapsed-time bound can be flaky on heavily loaded CI, despite the implementation's algorithmic improvement.
Refuted
- The optimization could preserve accepted values while changing duplicate semantics.; refuted because: Each changed parser still appends the same normalized value to its output vector and rejects on the first repeated membership result; the test confirms the generated-pattern error identifies the duplicate, while the PR states ordering and wording are unchanged.
- The PR claims duplicate detection is linear, but HashSet operations are expected/amortized rather than strict worst-case linear.
- The test could hang indefinitely on the pre-fix quadratic implementation, making red-green validation impractical.; refuted because: The PR body explicitly reports that the pre-fix test did not finish within 15 minutes, so the pre-fix failure is evidenced externally rather than by this review lane.
Evidence gaps
- The PR's pre-fix noncompletion claim is not independently witnessed in the available seeded thread or sensor receipts.
- Model proof intent was rejected by deterministic validation.
|
Review of record, head Angle 1: correctness / edge cases. The three sites ( Angle 2: tests / contract. New test builds 60k entries per list through Findings: none. No open blockers. Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmojoz8WfVBYKstQAop
|
Review of record, head 1a18c14 Angles: behavior preservation, complexity, tests, and exact-head CI.
Generated by Claude Code |
Requested by Steven · project thread
Governing issue or accepted claim: #11560
Acceptance delta (one sentence): A
ripr.tomllisting tens of thousands ofgenerated_file_patterns,handwritten_filesorbun_ub.test_rootsentries parses in linear time instead of stallingripr checkfor tens of seconds.Summary
parse_generated_file_patterns,parse_handwritten_filesandparse_bun_ub_profile(crates/ripr/src/config.rs) detected duplicates withVec::contains/iter().any, which is O(n^2). Black-box on the prebuilt binary,generated_file_patternswith 5k / 20k / 50k entries took 0.5 s / 4.7 s / 28.6 s, and 100k did not finish in 60 s. This switches the three checks to aHashSetat the same semantic owner; error wording, ordering and acceptance are unchanged.Tests
config::tests::large_path_lists_parse_in_linear_time_and_still_reject_duplicates: 60k entries for each of the three lists parse under a 10 s bound, and a duplicate appended at the end is still rejected with the existing wording. Passes with the fix (1.7 s in debug). Against the pre-fixconfig.rsthe same test did not finish inside a 15 minute window (it exercises the quadratic path), so it fails before the fix.cargo fmt --check -p riprclean.cargo xtask precommitnot run here: the shared target dir is serialised across several agents (one-p riprtest build took ~29 min of lock wait), so it is left to hosted CI.Generated by Claude Code