Skip to content

python: keep changed files when the workspace walk hits its cap (#10461) - #10574

Merged
EffortlessSteven merged 5 commits into
mainfrom
claude/project-thread-w6b15g
Oct 26, 2026
Merged

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

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

  • truncate_workspace_files used to keep the sorted prefix of discovered .py files up to RIPR_PYTHON_MAX_WORKSPACE_FILES. A changed file whose path sorted past that prefix was never read, so its changed lines got no findings. The diff_scope_oversized limitation disclosed only a count, and did not say that a changed file was among the refused ones.
  • The function now always keeps the diff's changed .py files and fills the rest of the cap from the sorted remainder, keeping sorted order. The caller matches on normalized_path, on both sides.
  • The limitation detail now says "changed .py files are kept past this cap". The byte budgets and read failures still apply to changed files, and they are still disclosed by their own limitations.

Swarm / Source Boundary

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

Source-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)
  • docs, changelog fragment

Scope Classification

  • One production behavior

Production delta: changed .py files are kept past the file-count cap.

Evidence/support delta:

  • a unit test and an adapter test.

Single acceptance criterion:

  • With a cap of 1 and three files, a diff touching zz_changed.py gets a finding for that file, and the limitation names 2 refused files.

Non-goals:

  • Exempting changed files from the byte budgets.
  • Changing repo mode.

Support-tier Impact

  • none

Policy Impact

  • none

Proof

cargo clippy -p ripr --lib --tests          # clean
cargo test -p ripr --lib python             # 1521 passed
cargo xtask precommit                       # rc=0

Result, failures, or skipped proof:

  • Negative experiment. I forced the predicate to false, and analyze_diff_keeps_a_late_sorting_changed_file_past_the_cap failed: no finding for the changed file. With the fix restored, it passes.
  • Full workspace tests. Left to hosted CI.

Claim Boundary

What may be claimed:

  • The file-count cap never refuses a changed .py file.

What must not be claimed:

  • That changed files are always analyzed. Byte caps, read failures and absent files still apply, and each is disclosed.

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

  • Spec: n/a
  • Tests: truncate_workspace_files_always_keeps_changed_files, analyze_diff_keeps_a_late_sorting_changed_file_past_the_cap
  • Code: as above
  • Golden outputs: unchanged
  • Metrics: n/a
  • ADR/learning: n/a

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

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.

Gates

  • cargo fmt --check
  • cargo xtask precommit

Generated by Claude Code

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
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Member Author

Review of record at head 44f8aec3

An independent reviewer agent read the full diff and current source from four angles. It found nothing blocking.

  • Correctness.
    • Both sides of the match go through normalized_path, which handles \ and a leading ./. A changed file that is not .py never matches a discovered path. Deleted files are dropped by the diff parser.
    • total - kept stays correct, including when the changed files alone exceed the cap. That case is covered by a unit test.
    • The byte budgets still apply, so a late changed file can still be refused by the 64 MiB budget. That refusal is disclosed by its own limitation.
    • workspace_incomplete stays true whenever context was refused.
  • Disclosure. The count is always disclosed. The reviewer flagged that my first wording, "changed files are always analyzed", overclaimed, because byte caps, read failures and absent files still apply.
    • Resolution, commit 44f8aec3: the detail now reads "reached the N-file cap ... changed .py files are kept past this cap". I reworded the changelog and docs the same way.
  • Tests.
    • The adapter test discriminates. Without the fix, zz_changed.py has no owners, so it produces no finding. I confirmed this by forcing the predicate to false: the test fails.
    • The affected_items == Some(2) assertion would also hold under the old code. It stays as a disclosure check, not a regression check.
  • Consumers.
    • The function has one production caller.
    • The existing count-cap test matches only part of the detail text, so the new wording still passes it.
    • No golden contains the detail string.

Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 26, 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 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 192 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: 0b5d4f14-bb15-4da5-bc9e-8db148738a66
Commits

Reviewing files that changed from the base of the PR and between 428a0a2 and 71e2e34.

Files selected for processing: 8
  • .ripr/traceability.d/10461-python-cap-keeps-changed-files.toml
  • changelog.d/10461-python-cap-keeps-changed-files.md
  • crates/ripr/src/analysis/language/python.rs
  • crates/ripr/src/analysis/language/python/bounded_read.rs
  • crates/ripr/src/analysis/language/python/tests.rs
  • docs/CONFIGURATION.md
  • docs/LANGUAGE_ADAPTER_PREVIEW.md
  • docs/specs/RIPR-SPEC-0028-python-preview-static-facts.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 26, 2026 04:45
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@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 2 potential issues.

Devin Review

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYNejJJF82dVq4XHXddgrd

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

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.

Copy link
Copy Markdown
Member Author

CI failure on 78e7aee4. Rust tests shard 4 of 4 failed in python_repair_attempt::states_remain_distinct_across_one_repository. As far as I can tell, this failure did not come from this PR.

I'll re-run the failed jobs once, when the rest of the run finishes.


Generated by Claude Code

EffortlessSteven commented Oct 26, 2026 •

Copy link
Copy Markdown
Member Author

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.
Candidate: #10574, head 78e7aee45464dd86934f9dfbb03ddd6a2de1f24d, tree 43174747b4f16b7f2fa1c4497ae71deedb8b8f4f. Verified qualification checkout 020081be185264cb24318b05a4db3da12e4a517b, tree e7f31291c3079c6edcb16a5d1442622ee21dd75f, parents 777c52b91f9b532922e4b37a6776e6938bfba700 and the candidate head.
Review: #10574 (review) is published and read back. It supersedes the earlier REPAIR_REQUIRED scope classification: no scoped source defect blocks #10574. Discovery's O(N) path collection predates this change; the added contract promises count-cap retention and preserves byte/read limits, not bounded discovery memory. Disposition is REVIEW_INCOMPLETE because required qualification is not accepted.
Validation: https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/40271199013 attempt 2 ended in failure. Shards 1–3 retain their earlier successful evidence; the retried shard 4 passed 5,403 tests, including the earlier failure. Verifier 121422420219 rejected the incomplete attempt-2 receipts, and required Result 121423326284 failed. Exact evidence and recovery are recorded in #10574 (comment). No additional CI request was made.
Residual: #10594 is separately owned follow-up, not a prerequisite for #10461, and must remain open after this PR lands. #10586 preserves the earlier failed test and its distinct source-repair investigation.
Next: the active author owns the next qualification request. Produce all four shard receipts and the full workspace list in one matching attempt, inspect the terminal identity/JUnit/disjoint-cover result, and publish/read back final exact-head REVIEW_READY before protected merge. Repeating only the verifier cannot recover missing shard receipts. No source takeover or merge was performed. Landing this PR does not complete bounded-discovery-memory work.

Copy link
Copy Markdown
Member Author

Yes, I'm still the active writer on this branch. I have no source changes pending.

The one shard failure, in python_repair_attempt, was not caused by this diff; it is tracked in #10586. I have re-run the failed jobs once at 78e7aee4.

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

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-base 173dfc286fd1d03357c9e760b354b615e552e961. Existing hosted logs actually checked out merge commit 020081be185264cb24318b05a4db3da12e4a517b, tree e7f31291c3079c6edcb16a5d1442622ee21dd75f, 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_files and analyze_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 44f8aec3 to 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 maps python.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_repository with the running target/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 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.

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_handwritten calls workspace.rs::collect_workspace_python_files_with_handwritten before bounded_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.

Copy link
Copy Markdown
Member Author

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 .py files survive the file-count selection. RIPR-SPEC-0028, the docs and the changelog describe only that count rule and the byte budgets. None of them call the count cap a total memory bound.

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:

  • a bounded heap of the earliest context paths, plus the changed paths;
  • a count of all admitted paths;
  • validation with shuffled order, a tiny cap, more changed files than the cap, and exact refused counts.

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

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.

EffortlessSteven commented Oct 26, 2026 •

Copy link
Copy Markdown
Member Author

Qualification follow-through on unchanged 78e7aee45464dd86934f9dfbb03ddd6a2de1f24d: run 40271199013 attempt 2 is now terminal failure.

  • Shard 4 job 121417134533 passed all 5,403 selected tests; python_repair_attempt::states_remain_distinct_across_one_repository also passed. Its checkout was 020081be185264cb24318b05a4db3da12e4a517b.
  • Verifier job 121422420219 selected pattern ripr-rust-small-github-nextest-shard-*-2 and downloaded exactly one artifact, ripr-rust-small-github-nextest-shard-4-2 (12629949121). The earlier successful shards still have attempt-1 artifacts. The single artifact was extracted directly into shards, while verify-test-shards reads named per-shard subdirectories.
  • The verifier consequently reported all four partition lists/statuses/contexts/JUnit files and the full workspace list missing, listed zero subjects, and exited 1. Required Result job 121423326284 failed with the sharded-test dependency red. This is an honest missing-evidence rejection, not a new Python source failure.

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.

Copy link
Copy Markdown
Member Author

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 78e7aee4 by re-applying merge-ready, which started run 40278585410. That run produces all four shard receipts under one attempt. I'll inspect its verifier result before the final review and merge.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Fresh full run 40278585410 on unchanged 78e7aee4 failed in shard 4 (job 121435657726). Of 4,358 tests run, one failed: python_repair_attempt::states_remain_distinct_across_one_repository, again with could not read the running driver binary target/debug/ripr (deleted). That is the inherited executable-lifetime race owned by #10586, not this PR's source.

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

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member Author

Integration refresh. Merged current main into the branch with no conflicts: new head 71e2e34d7. The #10586 repair (de14869b) is in this subject: crates/ripr/src/app/running_binary.rs reads /proc/self/exe.

Affected dimension is the integration basis only. In python.rs and RIPR-SPEC-0028, main's incoming changes are new modules and assertion fields plus spec text for other rules, and none of them touch the walk-cap path or the #10461 rule. This PR's source, tests and oracle are unchanged, and the earlier source review stands. Local check on the merged head: cargo test -p ripr --lib python ran 1561 passed, 0 failed.

I made one complete qualification request on the new head by re-applying merge-ready: run 40294466300. The earlier failed attempts and #10605 are preserved.


Generated by Claude Code

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

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.

Copy link
Copy Markdown
Member Author

Final review of record: REVIEW_READY at head 71e2e34d757435d8cb1eb8424d4b89805c549e14

Merging by squash at this exact head.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 901d9be into main Oct 26, 2026
56 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-w6b15g branch October 26, 2026 09:32

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

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 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 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 in crates/ripr/src/analysis/language/python.rs, adapter test in crates/ripr/src/analysis/language/python/tests.rs, plus spec/docs/changelog/traceability.
  • truncate_workspace_files (bounded_read.rs:202-228): keeps every is_changed match, fills max_files.saturating_sub(changed) context slots from the sorted remainder, preserves sorted order, reports refused = total - kept. saturating_sub makes the changed-files-exceed-cap case well defined (kept may exceed the cap; asserted by the unit test at bounded_read.rs:719). Input is sorted by discovery (workspace.rs:44-45), so the determinism claim holds. Sole production caller is python.rs:847.
  • Both sides of the predicate normalize through normalized_path (python.rs:844, python.rs:848; source_utils.rs:77-84 replaces \ 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_oversized limitation is emitted only when refused_files > 0 (python.rs:981) and its detail now states changed files are kept (python.rs:996). workspace_incomplete still 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 for zz_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 plain take(max_files) revert (kept would 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 the diff_scope_oversized kind 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); the Rust test shards verify aggregate and Ripr Rust Small Result gates are green.
  • Merge cleanliness relative to the previously reviewed head 78e7aee: the merge adds +7 lines to python.rs (test-module declarations and PythonAssertion fields 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.rs and the PR's other files are byte-identical to 78e7aee.
  • Added lines contain no mutation-outcome vocabulary (killed/survived/untested/proven/adequate) and no panic-family call in production code; the single unwrap_or_default addition 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/a in both Source-of-truth Links and Spec-Test-Code Traceability, but the diff adds an Inputs paragraph to docs/specs/RIPR-SPEC-0028-python-preview-static-facts.md and 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 (78e7aee and 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-traceability already 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_path does 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 grep golden 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 python 1521 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.

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