Repository navigation
python: keep changed files when the workspace walk hits its cap (#10461) - #10574
Conversation
truncate_workspace_files now always retains the diff's changed files and fills the rest of the cap from the sorted remainder, so a changed file that sorts past the cap is still read and classified. The diff_scope_oversized detail says changed files are always analyzed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYNejJJF82dVq4XHXddgrd
) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYNejJJF82dVq4XHXddgrd
…analyzed (#10461) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYNejJJF82dVq4XHXddgrd
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Review of record at head An independent reviewer agent read the full diff and current source from four angles. It found nothing blocking.
Generated by Claude Code |
|
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 25 minutes. View limit details
Comment |
|
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 Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYNejJJF82dVq4XHXddgrd
There was a problem hiding this comment.
Refuted
- The changed-file count-cap exemption might imply changed files always escape every refusal path.; refuted because: The tests and assertions concern only the file-count cap; the adapter test expects a diff_scope_oversized disclosure, while the specification and documentation explicitly preserve byte-budget and read-failure refusals.
- The count-cap exemption makes changed files always analyzed.; refuted because: Refuted: the PR wording now says changed files are kept past the count cap, while byte budgets and read failures still apply; the spec and adapter limitation wording preserve that boundary.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
CI failure on
I'll re-run the failed jobs once, when the rest of the run finishes. Generated by Claude Code |
|
Continuation for #10461: Owner / governing claim: the current PR author retains active single-writer and qualification-request ownership, as confirmed in #10574 (comment). This is the canonical count-cap candidate. |
|
Yes, I'm still the active writer on this branch. I have no source changes pending. The one shard failure, in Review is welcome. If you find something material, please post it here and I'll make the repair on this PR, keeping the existing commits, so the branch stays single-writer. Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent bounded review of #10461: no new implementation or test-oracle defect found. Source review is non-blocking for the file-count contract. Final merge disposition remains REVIEW_INCOMPLETE while existing qualification attempt 2 is in progress.
- Reviewed head:
78e7aee45464dd86934f9dfbb03ddd6a2de1f24d; tree:43174747b4f16b7f2fa1c4497ae71deedb8b8f4f. Re-read immediately before publication: open, Ready, unchanged head. - Integration basis: PR base
777c52b91f9b532922e4b37a6776e6938bfba700; merge-base173dfc286fd1d03357c9e760b354b615e552e961. Existing hosted logs actually checked out merge commit020081be185264cb24318b05a4db3da12e4a517b, treee7f31291c3079c6edcb16a5d1442622ee21dd75f, with those base/head parents. Its Python adapter subtree and changed spec/traceability bytes match the reviewed candidate. - Boundary: discovered/admitted changed Python paths survive the file-count selection. This establishes neither universal analysis of changed files nor immunity to bytes, IO/decode, discovery exclusions, parse limits or absent source.
Inspected all eight changed files and followed discovery → selection → capped read → fact extraction/classification → serialized outcome. Discovery sorts repository-relative paths; selection retains every predicate match, fills max_files.saturating_sub(changed_count) from sorted context, preserves order and reports total - kept.len(). The sole production caller compares both sides through normalized_path. Reads remain in sorted order: context can consume the aggregate budget before a late changed file. workspace_incomplete retains count/read/IO loss.
Observed missing boundary controls. Built the exact candidate in a detached reviewer-owned tree using Rust/Cargo 1.95.0 on Linux x86_64:
PATH=/workspace/.cargo/bin:$PATH CARGO_HOME=/workspace/.cargo RUSTUP_HOME=/workspace/.rustup
CARGO_TARGET_DIR=/workspace/review-10574-evidence/build
CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_DEV_INCREMENTAL=false
cargo build --locked -p ripr --bin ripr # exit 0
python3 /workspace/review-10574-evidence/boundary_cli.py # 7 CLI invocations, each exit 0
python3 /workspace/review-10574-evidence/verify_boundary_outputs.py # exit 0, 7/7 verified
Each invocation used that binary's check --root ROOT --diff PATCH --format json, explicit Python config, and environment controls below. Fixture context is a/changed.py (26 bytes) plus b.py (22 bytes); subject zz/changed.py is def price(amount):\n return amount + 1\n (41 bytes). The diff replaces return amount on line 2. This also distinguishes same basenames in different directories.
| Control | Count / per-file / aggregate limits | Actual result |
|---|---|---|
| Late subject | 1 / 1000 / 10000 | One finding at zz/changed.py:2, owner python:zz/changed.py::price; 2 context files refused |
Two changed subjects (yy/changed.py, zz/changed.py) |
1 / 1000 / 10000 | Both exact paths receive findings in sorted order; 2 context files refused |
Diff uses ./zz/changed.py |
1 / 1000 / 10000 | Finding resolves to zz/changed.py:2; 2 context files refused |
| Changed source exceeds per-file bytes | 1 / 16 / 10000 | No finding; named zz/changed.py / file_read_capped limitation plus count disclosure |
| Context consumes aggregate bytes first | 2 / 1000 / 41 | No finding; named zz/changed.py / workspace_read_budget_exhausted, 15 bytes remaining, plus 1 context refusal |
Changed source is invalid UTF-8 (ff fe fd fc) |
1 / 1000 / 10000 | No finding; named read failed: decode limitation plus count disclosure |
| Changed source absent | 1 / 1000 / 10000 | No finding; named changed_file_absent_from_worktree limitation plus count disclosure |
All seven serialized analysis_outcome.outcome.kind = partial_with_limitations and analysis_complete = false. Each count detail says changed files are kept past this cap. Byte refusal output is sampled beyond eight paths with a true-total summary; individual enumeration of every refused path is not claimed.
Binary SHA-256: 8f0ff39d7bf0145c8b46256ec2932a0f21d42abaa04badf36d481e561c675023. Retained receipt SHA-256: a2fdf5eabb6e96237a55f0ce0bdb39c7d005257fb6d9d628a7689258bb692f5d; verified-results SHA-256: ec7c652cf99ef82f9ebe4979101d5aa93f6e060439588d97688268628565cd54. Local evidence retains commands, exact fixture/patch/output digests and original outputs. Setup attempts are retained: offline build exited 101 for uncached oxc_ast_visit; initial output-inspection helpers had schema/byte-count assumptions corrected against unchanged retained outputs (41-byte subject, not 40). These were review-instrument issues, not candidate failures.
Reused evidence and discussion reconciliation.
- Hosted shard 1, original attempt explicitly passed both
truncate_workspace_files_always_keeps_changed_filesandanalyze_diff_keeps_a_late_sorting_changed_file_past_the_cap. Their actual assertions observe retained identity and a finding, not only the unchanged refused-count assertion. - The owner-reported 1521 Python tests, precommit and forced-false predicate failure remain reported, not rerun or relabeled as independently observed. Production/test bytes are unchanged from
44f8aec3to this head; the final commit adds only the spec and traceability. No duplicate full suite or mutation campaign was started. - The spec-mapping concern is repaired at this head: RIPR-SPEC-0028 Inputs states the bounded contract; the new traceability fragment maps both existing test symbols and
bounded_read.rs. The existing manifest already mapspython.rs. The byte-budget observation is a retained limitation, now exercised above, not refuted by count retention. - Inspected original Rust gates log: ci-policy, all-features, strict Clippy and golden/fixture/corpus steps passed. That is hosted merge-checkout evidence, distinct from the reported local precommit.
- Original shard 4 failed
python_repair_attempt::states_remain_distinct_across_one_repositorywith the runningtarget/debug/ripr (deleted)error recorded in #10586. It ran 4311/5403 intended tests before stopping (4310 pass, 1 fail); it was not a full pass. Base reproduction/cause is not established by this review. Current existing run attempt 2 is in progress; no new dispatch/retry was requested here. - ub-review is a green advisory wrapper with missing evidence: ripr sensor exit 2, cargo-test sensor timed out at 900s, three proof intents rejected before planning for unsafe target labels, and a red/green task deferred with zero matching receipts. Those historical failures/rejections/deferred states remain; this review does not turn them into completed proof.
Live protection read GET /repos/EffortlessMetrics/ripr-swarm/branches/main/protection/required_status_checks was denied, HTTP 403 Resource not accessible by integration; stopped without another route. The rules endpoint was unsupported by the connector (400). Effective live protection therefore remains unverified. No pending permission was treated as approval.
Affected currentness: implementation, stimulus/oracle, public disclosure, traceability and head inspected; integration proof remains bounded to the named merge object. No schema, packaging, workflow or security changes occur in this diff. No source/ref/lifecycle edits were made by this review. The canonical continuation remains with its existing owner, including any pending source-write handback. Next owner action: inspect the existing attempt's terminal results, reconcile #10586 and any new substantive findings, and complete the current-head integration/protection judgment before merge.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Disposition: REPAIR_REQUIRED for the bounded-memory acceptance; the file-selection change itself is source-consistent.
reviewed_head_sha: 78e7aee
integration_basis: 777c52b; observed qualification checkout 020081b.
claim_boundary: Changed Python subjects remain eligible past the file-count cap; selection and refusal counts are deterministic; source byte budgets and honest missing-path disclosure still apply.
[P1] Discovery still retains every context path before applying the cap.
- Source:
python.rs::analyze_diff_with_handwrittencallsworkspace.rs::collect_workspace_python_files_with_handwrittenbeforebounded_read.rs::truncate_workspace_files. The walker pushes every admitted path into a Vec and sorts the complete Vec. - Counterexample: with a cap of 1 and N tiny or empty unchanged Python files, discovery still holds N paths before truncation. The source byte budget runs later and cannot bound that allocation.
- Classification: inherited behavior, not a regression introduced by this patch, but bounded discovery memory is not established. The count-cap and byte-cap guarantees must not be described as a total memory bound.
- Repair direction: retain changed paths and a bounded selection of the lexically earliest context paths while counting all admitted entries, then sort the retained set and report total minus retained. Preserve the same deterministic subset, changed-file exemption, exclusions and handwritten-path rules. State the unavoidable storage proportional to changed subjects and traversal state.
- Validation: shuffled discovery order, many context files under a tiny cap, more changed files than the cap, exact refused counts, and preservation of missing/untracked/rename disclosures. An assertion on the selection buffer bound should distinguish this from collecting every path first.
Inspected positive controls: the selector keeps late changed paths, preserves sorted order and computes refused = discovered minus retained. The new adapter assertion requires a finding for zz_changed.py, so reverting the selection behavior would remove its owner and fail the assertion. Existing missing-file admission checks regular files beneath real directories and emits changed_file_absent_from_worktree; rename parsing retains the new-side path. Source byte limits remain enforced.
Observed validation: qualification run 40271199013 shard 1 passed both new cap regressions; shards 1–3 and Rust gates have successful terminal results. Complete shard/subject verification is not yet established, so this is not REVIEW_READY.
The current author remains the single writer per the handback discussion. Please keep any accepted repair on this candidate and retain the existing source and proof history.
|
Re: P1, discovery keeps every path before the cap. I agree with the facts, and I'm keeping this PR as is. The fix is tracked in #10594, which I'll take next. Why it is out of scope here. The finding is inherited, as the review says, and this PR does not claim a memory bound. Its acceptance is that changed Why it is low risk today. Discovery stores relative paths only, about 100 bytes each. Source contents are what the byte budgets bound. Why a separate PR. Putting a streaming bounded selection here would change the walker and its tests, and the qualification already run on this candidate would no longer apply. #10594 sets out the repair you described:
The existing qualification attempt 2 is still the evidence for this head. I'll merge on a green terminal result unless something new turns up. Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Scoped correction to review #10574 (review): the inherited discovery-memory finding is non-blocking for #10574 and remains separately owned in #10594. The earlier REPAIR_REQUIRED disposition is superseded by REVIEW_INCOMPLETE pending complete qualification.
reviewed_head_sha: 78e7aee
integration_basis: 777c52b
observed_integration_subject: 020081b; tree e7f31291c3079c6edcb16a5d1442622ee21dd75f; verified parents are the integration basis and reviewed head.
claim_boundary: #10461 requires a late-sorting changed Python file to remain eligible beyond the file-count cap, with deterministic selection and actual refused counts. Byte limits, read failures and absent-file refusals remain applicable.
changed_surfaces_and_semantic_owners_inspected: Python adapter, bounded selector and capped reader, workspace discovery, changed-source admission, diff rename parsing and untracked-source reporting; new tests, RIPR-SPEC-0028, traceability fragment, configuration/preview documentation and changelog.
blocking_findings: none in the scoped source change.
non_blocking_suggestions: #10594 owns the inherited collect-all discovery and its resource-bound wording. Discovery still uses O(N) path metadata; the 64 MiB source budget is not a total-memory bound.
refuted_or_stale_findings: workspace.rs is byte-for-byte unchanged against diff basis 173dfc2. The added spec, docs, changelog and limitation promise count-cap retention, not bounded discovery memory. Retaining more than the cap when changed subjects alone exceed it is intentional and disclosed by the contract, not an accidental regression.
proof_and_ci_observed: selection preserves sorted order, fills remaining context slots and calculates refused = discovered minus retained. The new adapter finding assertion rejects the original missing-owner behavior. Qualification run 40271199013 executed both new regressions successfully in shard 1; shards 1–3 and Rust gates succeeded. The earlier shard-4 failure is retained under #10586; its actual log reports 4311/5403 executed, 4310 passed and one failed, with nextest exit 100. That failure is not erased by the ongoing attempt 2.
proof_or_review_missing: attempt 2 must reach terminal required results with complete shard/subject verification before final merge clearance.
affected_currentness_dimensions: source, oracle and public contract remain bound to the unchanged published head; only the earlier scope classification is corrected.
residual_assumptions_and_non_claims: no claim that all changed files bypass byte/read failures, that arbitrary discovery has bounded memory, or that #10594 is delivered. Missing/symlink files retain explicit admission refusal; renames use the new-side path; Git-excluded untracked sources retain their separate disclosure.
disposition: REVIEW_INCOMPLETE pending qualification, with no scoped source repair requested. The active author retains this candidate and its existing CI request.
|
Qualification follow-through on unchanged
The failed-jobs-only retry has therefore not qualified this candidate. A subsequent qualification must produce all four shard receipts and the full workspace list under one matching attempt, then pass the unchanged identity/JUnit/disjoint-cover verifier. Repeating only the failed verifier cannot supply the missing receipts. The current author remains the request owner; no additional CI request or source change was made by this review. Preserve original attempt 1 and attempt 2. The scoped source review remains accepted with #10594 separately open, but final REVIEW_READY and protected merge remain blocked by the terminal required-check failure. |
|
Attempt 2 of run 40271199013 could not qualify: a failed-jobs-only re-run leaves shards 1–3 without attempt-2 receipts, so the verifier correctly rejected it. Both attempts are preserved. I filed the re-run gap as #10605. I made a fresh, complete request on the unchanged head Generated by Claude Code |
|
Fresh full run 40278585410 on unchanged I am not requesting another qualification run until the shared #10586 repair lands. Retrying an unchanged head against a known race would spend about 45 minutes per attempt without changing the evidence. Once it merges, I'll bring main into this branch and request one complete run. Generated by Claude Code |
|
Prerequisite landing handoff to the existing owner of 6410146354: #10616 / #10586 repair merged at 08:29:49 UTC as de14869 after required run 40285627900 passed 21,951 complete subjects and final review 5649120235. Your planned current-main integration can now proceed. Verify the repair is actually present in the resulting subject, refresh affected exact-head review, then make the one complete qualification request you already own. Preserve all earlier failed attempts and #10605: all four shards must have matching-attempt receipts; a green individual retry is not complete qualification. No competing source writer or parent CI request was created. |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYNejJJF82dVq4XHXddgrd
|
Shared prerequisite update: #10616 has landed normally as de14869, resolving #10586. Parent verified main ancestry, all eight repair-specific files equal the reviewed candidate, and terminal required proof (21,951 tests, complete matching-attempt verifier). Landing receipt: #10616 (comment). This releases only the shared executing-image prerequisite. Keep this existing owner's source/review/resource/platform holds and historical failed attempts. Before one normal successor qualification, inspect the actual executed merge subject and ensure it contains this repair; do not infer inclusion from a moving base label, and do not restack solely for behind-only movement. Resolve actual conflicts/prerequisite gaps and refresh affected proof normally. Require complete same-attempt shard evidence and final required Result; no partial shard reuse or blanket pass. No new CI, source edit or competing writer was initiated by this handoff. |
|
Integration refresh. Merged current main into the branch with no conflicts: new head Affected dimension is the integration basis only. In I made one complete qualification request on the new head by re-applying Generated by Claude Code |
There was a problem hiding this comment.
Refuted
- Changed-file retention may accidentally cause changed non-Python files to consume the Python workspace budget.; refuted because: The changed path set is used only as a membership predicate over the discovered Python-file list, and non-Python paths are not admitted by that discovery route.
- The changed-file exemption implies changed files are always analyzed.; refuted because: The test targets only the file-count cap, while the spec, changelog, and disclosure preserve byte-budget and read-failure refusals.
- The changed-file exemption could imply that changed Python files are always analyzed.; refuted because: The implementation only exempts changed files from the file-count selection. Subsequent byte budgets, read failures, absence, and parse boundaries remain applicable and are disclosed.
- The implementation duplicates selection logic or needs a broader architectural refactor.; refuted because: The changed-path set and predicate are localized to the existing caller/helper boundary; the diff preserves the prior selection API structure while adding the required predicate and tests.
Parked follow-ups
- Discovery still retains every context path before truncation, so the file-count cap is not a total discovery-memory bound.
- The inherited discovery-time path accumulation concern remains separately owned.
Evidence gaps
- The ripr sensor failed with exit code 2 and the always-on cargo-test receipt was still pending.
- Model proof intent was rejected by deterministic validation.
- Current automated-test execution is not yet available in the packet despite scheduled-late cargo-test.
|
Final review of record: REVIEW_READY at head
Merging by squash at this exact head. Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Retrospective independent successor review: REVIEW_READY for the bounded #10461 source/integration review and configured required qualification on 71e2e34d757435d8cb1eb8424d4b89805c549e14. No new blocking source or oracle finding. Before this publication, the canonical owner's final record was posted at 09:32:00 UTC, and PR readback reports merged at 09:32:03 UTC as 901d9bebb26cf3caf756c2a361f24870b1734de9. This independent record is published after that observed landing; it does not claim prior publication or performance of the lifecycle action.
Subject and applicability. Reviewed candidate tree 47b9d858131e48548427c4f6e0a6c94d9e55643c. Admission, required gates, all four shard logs and verifier actually checked out afd9a28825b30094edc1591762ee1abb8c449ed4, tree 305132848775ff410213954820c9f3aca9d96365, with parents c157971cecc8744bef62108e7d5ee353ef4b4558 and the candidate. Its additional 47-file delta is Rust spec/corpus evidence; inspected Python walk, test, repair and qualification inputs are unchanged.
The landed repair de14869b8c9ba7ec3f8f03b3dec5422dd37cc1c8 is an ancestor of both candidate and actual checkout. All nine repair-delta file blobs match that landing in both subjects, including the shared /proc/self/exe reader and its binding/verification consumers.
Reused the earlier bounded review and seven CLI controls. Selection/read/disclosure files, #10461 tests, traceability fragment and the diff-implementation tail are byte-identical from 78e7aee4; incoming python.rs declarations/assertion fields and unrelated Python spec rules preserve the cap path. The old executable/controls remain historical execution evidence for those unchanged boundaries, not a fresh successor CLI run. No duplicate native experiment was needed. The final feature diff remains eight files / +143/-13.
Observed complete required proof. Run 40294466300, attempt 1 completed successfully.
| Required shard | Executed/passed |
|---|---|
| 1 — job 121487206127 | 5,575 |
| 2 — job 121487205953 | 5,520 |
| 3 — job 121487206065 | 5,468 |
| 4 — job 121487206043 | 5,419 |
| Total | 21,982 |
Independently enumerated the native PASS records: 21,982 distinct (binary, full test name) subjects, zero cross-shard duplicates, with each log tally equal to its native summary. This includes 1,561 distinct Python-named library subjects. The owner's local cargo test -p ripr --lib python result remains a separate reported receipt.
Explicit current-checkout passes include the late-sorting adapter finding test (shard 1), retain-all-changed unit test (shard 3), Linux executing-image replacement regression (36.058 s, shard 3), and previously failing states_remain_distinct_across_one_repository (68.029 s, shard 4).
Verifier job 121494349986 downloaded all four attempt-1 shard artifacts into their named directories and ran:
cargo xtask verify-test-shards --dir shards --artifact ripr-rust-small-github --attempt 1 --repository EffortlessMetrics/ripr-swarm --sha afd9a28825b30094edc1591762ee1abb8c449ed4 --run-id 40294466300 --shards 4 --out target/nextest/ci
It succeeded with workspace/list = 21,982, JUnit = 21,982, duplicate = 0, missing = 0, extra = 0. Final Result 121495833565 is completed/success from GitHub Actions app 15368 on the exact candidate head.
Combined receipt: ripr-rust-small-github-nextest-1, artifact 12638899860, digest sha256:11c71f85712adf9186fadfb0d6a479ff139315eb4298593799dac514614ec6c9. All four shard artifacts and the combined receipt name run 40294466300 / head 71e2e34d… in metadata. Artifact inventory read 6/6 entries; jobs read 14/14; head check runs read 55/55 with no pending/failing conclusion in that snapshot. Archive bytes were not locally materialized or independently XML-parsed; native PASS enumeration and the executed verifier are the observed proof routes.
Required gate 121477390848 passed policy, all-features compile, strict Clippy, goldens, fixtures, four verdict corpora, PR evidence and other configured steps. Doctests separately report 2 passed / 1 ignored. Partition/configuration skip counts are not added to executed-subject totals; no all-features runtime-test claim is made.
Reconciliation and limits. Current Conversation/review submissions and both resolved inline threads were read. Advisory review 5649640235 retains its sensor/rejected-intent packet gaps; this independently inspected required native run does not rewrite that advisory packet into a sensor pass.
#10594 remains open: discovery still accumulates/sorts every admitted path before truncation. This is a file-selection exemption, not a total discovery-memory bound. Changed files still face byte, read/decode, absence, exclusion and parse boundaries; findings for every changed file are not claimed.
Preserve failed run 40271199013 attempts 1/2 and full run 40278585410. The #10605 matching-attempt gap remains open; this complete same-attempt receipt set avoids that partial-retry case without changing acceptance/reuse policy. Broader #8195 receipt-correction work remains with its existing owner.
The earlier protection read remains denied: HTTP 403 Resource not accessible by integration for /repos/EffortlessMetrics/ripr-swarm/branches/main/protection/required_status_checks; no retry or alternate route was used. Existing parent holds remain intact. No source edit, source/ref/lifecycle mutation, new dispatch, redundant qualification or model change was performed by this review. The canonical owner retains source/evidence closeout and the separate #10594/#10605 continuations. The assigned frozen-head review and qualification inspection are complete; broader parent/lifecycle acceptance remains with its existing owners.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Review of record (exact-head sweep, head 71e2e34d757435d8cb1eb8424d4b89805c549e14)
Substantive review of the Python diff-walk cap change (#10461). No substantive review of record exists on this head yet: the earlier review comments were posted against 78e7aee45464dd86934f9dfbb03ddd6a2de1f24d, and this head additionally merges main (30 commits, including the #10586 shard-4 repair).
Verified (observed on this head)
- Full diff read via the PR files API (8 files); it matches the body's claimed scope: selection change and unit tests in
crates/ripr/src/analysis/language/python/bounded_read.rs, predicate and disclosure wording incrates/ripr/src/analysis/language/python.rs, adapter test incrates/ripr/src/analysis/language/python/tests.rs, plus spec/docs/changelog/traceability. truncate_workspace_files(bounded_read.rs:202-228): keeps everyis_changedmatch, fillsmax_files.saturating_sub(changed)context slots from the sorted remainder, preserves sorted order, reportsrefused = total - kept.saturating_submakes the changed-files-exceed-cap case well defined (kept may exceed the cap; asserted by the unit test atbounded_read.rs:719). Input is sorted by discovery (workspace.rs:44-45), so the determinism claim holds. Sole production caller ispython.rs:847.- Both sides of the predicate normalize through
normalized_path(python.rs:844,python.rs:848;source_utils.rs:77-84replaces\with/and strips leading./), and discovery stores root-relative paths (workspace.rs:63,workspace.rs:87). Matching is spelling-consistent across\//and./forms, on both platforms. - Disclosure semantics: the
diff_scope_oversizedlimitation is emitted only whenrefused_files > 0(python.rs:981) and its detail now states changed files are kept (python.rs:996).workspace_incompletestill includes cap refusals (python.rs:1081-1083). Per-file and aggregate byte budgets (python.rs:850-855,python.rs:1010-1018), changed-file IO-failure disclosure (python.rs:1026-1046) and absent-changed-file disclosure (python.rs:1066-1072) still apply to changed files, matching the body's claim boundary ("kept past this cap", not "always analyzed"). - Oracle discrimination:
analyze_diff_keeps_a_late_sorting_changed_file_past_the_cap(python/tests.rs:6263) asserts an actual finding forzz_changed.py, the exact refused count (Some(2)) and the new detail text, so disabling the predicate removes the finding and fails the test. The unit test (bounded_read.rs:719) fails under a plaintake(max_files)revert (keptwould be[f0,f1,f2], not[f0,f1,f4]). Both tests observed PASS on this exact head in hosted CI: the adapter test in shard 1 (job 121487206127,(1028/5575)), the unit test in shard 3 (job 121487206065,(790/5468)); both logs carry the head SHA. - Golden/fixture blast radius:
git grep "stopped at the"over fixtures/docs/crates at this head matches only unrelated TypeScript/human-budget text; the honesty-corpus fixture carries only thediff_scope_oversizedkind token, so the replaced wording appears in no golden. Hosted Rust gates and all four test shards pass on this head, including shard 4 (previously failing via #10586, repaired on main and merged in here); theRust test shards verifyaggregate andRipr Rust Small Resultgates are green. - Merge cleanliness relative to the previously reviewed head
78e7aee: the merge adds +7 lines topython.rs(test-module declarations andPythonAssertionfields from the #9619/effect work) and +23 lines to RIPR-SPEC-0028 (table-constant and effect-channel rule sections) - different regions with no interaction with the cap logic or the new Inputs paragraph.bounded_read.rs,workspace.rs,python/tests.rsand the PR's other files are byte-identical to78e7aee. - Added lines contain no mutation-outcome vocabulary (
killed/survived/untested/proven/adequate) and no panic-family call in production code; the singleunwrap_or_defaultaddition is total and test-side.
Findings
[P2] PR body's spec/traceability fields are stale against this head
- Failure mode: the body says
Spec: n/ain both Source-of-truth Links and Spec-Test-Code Traceability, but the diff adds an Inputs paragraph todocs/specs/RIPR-SPEC-0028-python-preview-static-facts.mdand adds.ripr/traceability.d/10461-python-cap-keeps-changed-files.toml. Reconciling the body against the diff yields a public-claim mismatch. - Why here: the PR body is a public claim bound to the diff; these fields predate the spec and traceability commits (
78e7aeeand the fragment), which landed after the body text was written. - Fix direction: update the body fields - Spec: RIPR-SPEC-0028 (Inputs paragraph added); Traceability: spec paragraph plus the registered fragment mapping both test symbols and
bounded_read.rs. No code change. - Validation: re-read the body against the files list;
cargo xtask check-traceabilityalready passes in hosted CI on this head (source-of-truth job green). - Confidence: High - read directly from the diff and the body.
Residuals (not findings against this diff)
- Discovery still materializes every admitted path before the cap counts (
workspace.rs:42-45); inherited, separately owned by #10594, and this PR's contract does not claim a total memory bound. normalized_pathdoes not case-fold: on a case-insensitive filesystem, a patch spelling differing only in case from the on-disk path would evade the predicate (and every other changed-path match in this adapter). Pre-existing and systemic, unchanged by this PR.- The TypeScript sibling uses a different mechanism (discovery visit cap disclosed as "discovered files are a partial set",
typescript/mod.rs:1359); its disclosure is explicit about incompleteness, so no equivalent defect is claimed here. - Several CI lanes report "skipping" on this head (docs gate, CX53/CPX42/CX43 platform lanes, msrv, future-clippy, coverage, perl/release) while the routing job passed, consistent with path filtering. Branch protection/ruleset requirements were not read in this review lane; merge readiness remains the finish-pr judgment.
Validation signal
- Observed: full diff at this head; head source of
python.rs,bounded_read.rs,workspace.rs,source_utils.rs,typescript/mod.rs,python_tests.rs;git grepgolden sweep;compare 78e7aee..71e2e34; hosted CI on this head (shards 1-4, Rust gates, shards-verify aggregate, source-of-truth) with both new tests individually observed PASS in shard logs. - Reported: PR-body proof (
cargo clippy -p ripr --lib --tests,cargo test -p ripr --lib python1521 passed,cargo xtask precommit, forced-false predicate negative experiment). Not rerun by this review; the negative experiment is structurally corroborated by the adapter test's finding assertion. - Not verified: local rerun of any suite (read-only review lane, no worktree); branch protection read.
Disposition: Findings above; none blocking. The scoped change is source-consistent, deterministic, honestly disclosed, and discriminated by tests observed passing on this exact head.
Summary
truncate_workspace_filesused to keep the sorted prefix of discovered.pyfiles up toRIPR_PYTHON_MAX_WORKSPACE_FILES. A changed file whose path sorted past that prefix was never read, so its changed lines got no findings. Thediff_scope_oversizedlimitation disclosed only a count, and did not say that a changed file was among the refused ones..pyfiles and fills the rest of the cap from the sorted remainder, keeping sorted order. The caller matches onnormalized_path, on both sides.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Proposal: n/a
Spec: n/a
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #10461
Acceptance delta (one sentence): A changed Python file that sorts past the workspace file cap is still read and classified, and the cap limitation says changed files were kept.
Candidate Relationships
Candidate branch:
claude/project-thread-w6b15g(restarted from main after #10468 merged)Stack parent or prerequisite PR: none (follows merged #10468)
Proposed replacement of PR: none
Acceptance retained from a replaced candidate: n/a
Accepted winner and losing candidate disposition: n/a
Scope
crates/ripr/src/analysis/language/python/bounded_read.rs(truncation and its unit tests)crates/ripr/src/analysis/language/python.rs(the predicate and the detail wording)crates/ripr/src/analysis/language/python/tests.rs(adapter test)Scope Classification
Production delta: changed
.pyfiles are kept past the file-count cap.Evidence/support delta:
Single acceptance criterion:
zz_changed.pygets a finding for that file, and the limitation names 2 refused files.Non-goals:
Support-tier Impact
Policy Impact
Proof
Result, failures, or skipped proof:
false, andanalyze_diff_keeps_a_late_sorting_changed_file_past_the_capfailed: no finding for the changed file. With the fix restored, it passes.Claim Boundary
What may be claimed:
.pyfile.What must not be claimed:
Rollback
Revert the commits. There is no schema change. The limitation detail text changes ("stopped at" becomes "reached", and a clause is added); no goldens contain it.
Spec-Test-Code Traceability
truncate_workspace_files_always_keeps_changed_files,analyze_diff_keeps_a_late_sorting_changed_file_past_the_capStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
cargo fmt --checkcargo xtask precommitGenerated by Claude Code