Skip to content

test(installed): Python first-pr receipt path parity and status separation (#4518) - #11913

Merged
EffortlessSteven merged 4 commits into
mainfrom
claude/issue-4518-slice2
Nov 1, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
claude/issue-4518-slice2

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #4518

Acceptance delta (one sentence): The installed Python journey test now pins that first-pr displays the same receipt path its printed command writes with --out, names the not_run/passed/failed status step, and that each status is recorded separately without static closure.

What changed

  • crates/ripr/tests/installed_python_typescript_journeys.rs: new python_first_pr_receipt_path_matches_out_and_statuses_stay_separate (gated all(feature = "lang-python", unix)) plus a gated shell_words helper returning Result. The helper supports whitespace-separated words, single-quoted spans and the '\'' embedded-quote escape that the product emits; any other backslash or an unterminated quote is an error. The test runs first-pr --run-chain from a decoy CWD on the flat-layout fixture, asserts fixture construction (gap id, module-form pytest verify, not_run printed), Receipt path: equals --out, the status step names all three values, writes not_run at the printed path and passed/failed at sibling paths (no bound_gap/closed/movement/outcome fields, not_run record unchanged), and an unknown status is refused with invalid --status and bogus in the refusal and nothing written. Decoy stays untouched.
  • changelog.d/4518-python-first-pr-receipt-status-controls.md.
  • No product change.

Proof

  • cargo test -p ripr --features lang-python --test installed_python_typescript_journeys python_first_pr passes.
  • cargo fmt --check clean.
  • Not run: cargo xtask precommit and a lang-python-only (no TypeScript) compile, because the shared disk filled during the build.

Not claimed

Native Windows (test is unix-gated because Bash wrapper quoting differs on Windows hosts), exact-candidate installed run (#4510/#2769), wrong-interpreter control, interrupted-write control, historical bare-form compatibility, pilot/GitHub command display.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YVdGzUdZP8xBvycZVNxUDB

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

@coderabbitai

coderabbitai Bot commented Oct 31, 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 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 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: 13250d5f-9300-40fe-9d29-6780c881cf99
Commits

Reviewing files that changed from the base of the PR and between 714aed0 and b5cf09a.

Files selected for processing: 2
  • changelog.d/4518-python-first-pr-receipt-status-controls.md
  • crates/ripr/tests/installed_python_typescript_journeys.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 21:53
@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!

@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 review (fresh-context reviewer, head dc62566): REVIEW_INCOMPLETE

Inspected:

  • Head re-fetched before writing: dc62566 (base 7ddbd2f). Three commits: f2fe096 (21:44:44Z, feature), d37932e (21:53:24Z, "harden shell_words and gate first-pr receipt test to unix"), dc62566 (00:03:35Z, merge of main into the branch).
  • Changed files (REST pulls/11913/files): changelog.d/4518-python-first-pr-receipt-status-controls.md (+2/-0, added) and crates/ripr/tests/installed_python_typescript_journeys.rs (+199/-0, modified; additions only). This is a test-only diff: no product code changes.
  • Governing issue #4518 ("test(0.11): complete the literal installed Python repair journey", open). Its One-PR outcome asks for one deterministic flat-layout Python installed journey and failure controls, and its fixture section requires the fixture to discriminate bare pytest (import/environment failure) from python -m pytest (success). The added test asserts the module form, pins the exact gap id gap:python:pricing/core.py:bulk_discount_rate:predicate_boundary:predicate:units>=20, and runs the product-emitted command from the selected root rather than a hand-built one.
  • Discriminators: python_first_pr_receipt_path_matches_out_and_statuses_stay_separate asserts fixture construction first (the receipt file does not exist before the command runs), then that the "Receipt path:" display equals the --out parsed out of the printed receipt command, that the "Receipt status:" step names not_run, passed and failed, that the printed --status is not_run, and that the gap and the module-form pytest verify are the expected ones. It then runs the printed command at the printed path and at sibling paths and asserts each record's verify_status, that the records carry none of bound_gap, closed, movement or outcome, and that a later write does not rewrite the not_run record. The negative control is real: an unknown status is refused, the refusal names "invalid --status" and the offending value, and nothing is written. The parity assertion compares two independent product surfaces (the display line and the emitted command), so a change to one without the other fails the test. These are genuine discriminators, not self-confirming.
  • Conventions: the changelog fragment is present and well formed ( plus one bullet carrying the #4518 reference), matching the fragment shape the changelog policy gate requires.
  • Hosted evidence at head dc62566: merge-ready run 41255086224 and CI run 41255086192.

Blocking:

  • The required check "Ripr Rust Small Result" is RED at this head (job 124698798911), for two causes that I checked for candidate attribution and that are both inherited from the base rather than produced by this diff.
    1. The Rust gates job (124696726968) fails at check-policy-all -> check-process-policy with "crates/ripr/src/output/first_pr/run_chain.rs allowlist entry for use std::process::Command is orphaned: max_count=1 but pattern not found in any tracked file". That orphan was introduced on main by #11924's merge (ad8b265), which this PR's base already contains; the repair is open as #11975. This diff touches no product code and no policy file.
    2. The Rust-only feature lane (job 124696436347) fails the same three pre-existing tests I attributed to main on the other candidates in this set: lsp::backend::list_actionable_items_tests::list_actionable_items_names_gaps_the_actionable_profile_hides (crates/ripr/src/lsp/backend.rs:12892), check_worktree_drill_in_commands_reach_the_uncommitted_finding and selector_location_misses_explain_syntax_and_preserve_retry_scope (12885 passed / 1 failed and 619 passed / 2 failed). None is a candidate test and none touches the file this diff changes.
  • The four Rust test shards are SKIPPED at this head (job 124698799627), so the full nextest suite is unobserved at dc62566.
  • The deliverable of this PR has never been executed by any hosted lane. The only new behavior is the test python_first_pr_receipt_path_matches_out_and_statuses_stay_separate, gated on #[cfg(all(feature = "lang-python", unix))]. The one Rust lane that completed at this head runs "cargo test -p ripr --locked --no-default-features --features lang-rust --no-fail-fast", so lang-python is off and the test is compiled out; its name appears nowhere in that lane's log. The shard lanes, which use default features (["lang-rust", "lang-typescript", "lang-python"]) and would run it, were skipped here and were cancelled at every earlier head of this branch (runs 41245721600, 41248993277 and 41252142741 are all completed/cancelled, and the CI runs at those heads either skipped or ran only the feature lane). So for a test-only PR whose entire change is that one test, there is no hosted observation of the change at any head. The PR body's local proof ("cargo test -p ripr --features lang-python --test installed_python_typescript_journeys python_first_pr") has no hosted counterpart I can verify.

Non-blocking:

  • The shell_words helper is a test-side re-implementation of the product's own shell quoting. It supports whitespace-separated words, single-quoted spans and the ''' escape, and it errors on any other backslash escape or an unterminated quote rather than mis-parsing silently, which is the right failure direction. Double quotes are not treated as quote delimiters, so a double-quoted path would be read as one ordinary word. That is safe today because the test is unix-gated and the unix emitter uses single quotes, and the PR body lists native Windows as not claimed, but it remains a second parser of the product's output that can drift from the emitter.
  • The parity assertion compares the "Receipt path:" display with the --out that the test's own parser read out of the printed command, so it establishes "the display agrees with what our parser read", not "the display agrees with the path the product actually wrote". If the emitter changed its quoting form, this test would fail on a parse difference rather than on a behavioral difference.
  • The issue asks the fixture to discriminate bare pytest from python -m pytest. The test pins the module form by asserting the verify command starts with "python -m pytest ", but it does not run the bare form to demonstrate the contrast the issue describes.
  • The status-separation assertions check for the absence of specific forbidden keys (bound_gap, closed, movement, outcome) rather than an exact record schema, so a newly added unexpected key would pass unnoticed.
  • The PR body is honest about its gaps: it lists cargo xtask precommit and a lang-python-only compile as not run locally because the shared disk filled during the build, and its "Not claimed" list matches what the test does not cover. No product change is claimed, and none is present.

Not run:

  • This review host has no Rust toolchain: rustc, cargo and rustup are all absent from PATH. Nothing was built, compiled, formatted, linted or tested locally. cargo fmt --check, cargo clippy, cargo xtask precommit and every local cargo xtask gate were NOT run by this review.
  • The new test was not executed by this review and, as recorded above, has not been executed by any hosted lane at any head of this branch.
  • The hosted Rust gates job and the four Rust test shards were skipped at this head, so the full workspace suite is unobserved at dc62566.
  • The hosted Rust-only feature lane excludes lang-python, so the lang-python installed-journey suite as a whole, not only the new test, is unobserved at this head.
  • No runtime or mutation execution was performed. Every exposure statement here is static, and no claim is made about runtime mutation outcomes or test-suite sufficiency.
  • No repository file was modified and no HEAD-moving git command was run.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head dc6256648e1c0b8a4ccb7e238749318fb565519f. Not an approval.

Copy link
Copy Markdown
Member Author

Review of record (Claude Code, COMMENT disposition) — head b5cf09acbedc460918b51598a8a593532bd0f7d2

Scope: full diff (test file +~200, fragment); test-only, no production change.

  • Stimulus: installed Python first-pr --run-chain; the printed Receipt after verify command is parsed with a strict POSIX single-quote splitter (unsupported escapes/unterminated quotes are errors, not guesses), then the exact printed command is run from the root.
  • Oracle: Receipt path: equals the command's --out; status step names not_run|passed|failed; not_run is written at the printed path, passed/failed go to separate paths and carry no bound_gap/closed/movement/outcome field; the not_run record is not rewritten; unknown status is refused with reason and writes nothing; decoy untouched. Discriminating negatives are present, and preconditions (file absent before write, gap id, module-form pytest) are asserted before downstream claims.
  • Gated lang-python + unix, matching the platform of the shell grammar.
  • Fragment 4518-python-first-pr-receipt-status-controls.md references test(0.11): complete the literal installed Python repair journey #4518.
  • CI: Ripr Rust Small Result completed/success on this exact SHA; mergeable clean; no unresolved threads.

Findings: none.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit eb65dcb into main Nov 1, 2026
56 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/issue-4518-slice2 branch November 1, 2026 09:30
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