Repository navigation
test(installed): Python first-pr receipt path parity and status separation (#4518) - #11913
Conversation
…ation (#4518) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUdZP8xBvycZVNxUDB
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 58 minutes. View limit details
|
… unix (#4518) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUdZP8xBvycZVNxUDB
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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.
- 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::Commandis 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. - 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 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
- 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.
|
Review of record (Claude Code, COMMENT disposition) — head Scope: full diff (test file +~200, fragment); test-only, no production change.
Findings: none. Generated by Claude Code |
Governing issue or accepted claim: #4518
Acceptance delta (one sentence): The installed Python journey test now pins that
first-prdisplays the same receipt path its printed command writes with--out, names thenot_run/passed/failedstatus step, and that each status is recorded separately without static closure.What changed
crates/ripr/tests/installed_python_typescript_journeys.rs: newpython_first_pr_receipt_path_matches_out_and_statuses_stay_separate(gatedall(feature = "lang-python", unix)) plus a gatedshell_wordshelper returningResult. 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 runsfirst-pr --run-chainfrom a decoy CWD on the flat-layout fixture, asserts fixture construction (gap id, module-form pytest verify,not_runprinted),Receipt path:equals--out, the status step names all three values, writesnot_runat the printed path andpassed/failedat sibling paths (nobound_gap/closed/movement/outcomefields,not_runrecord unchanged), and an unknown status is refused withinvalid --statusandbogusin the refusal and nothing written. Decoy stays untouched.changelog.d/4518-python-first-pr-receipt-status-controls.md.Proof
cargo test -p ripr --features lang-python --test installed_python_typescript_journeys python_first_prpasses.cargo fmt --checkclean.cargo xtask precommitand 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