Repository navigation
fix(#16519): name the commit a dirty test file needs before a repair start - #16647
Conversation
The before phase's exact surface check refuses a seam start over the selected external test file and over dirty paths the packet's edit-cage policy does not allow (test files outside the surface, symlinks, oversized or unreadable files). The dirty-premise preflight defers those files, so `ripr check` and `ripr pilot` printed a start (pilot JSON `no_known_block`) that then refused with exit 2. `seam_start_surface_refusals` asks that exact check with the before phase's own calls in the same order, and `seam_start_refused_files` folds its files into the premise both surfaces read. The commit step then clears both refusals and reads "commit your change" when it names a test file. A dirty symlink fails closed as `path_commit_unsafe`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzTog4paRbkjGfRRp4y
|
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 19 minutes. View limit details
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Exact head cc85fde98cbbcaa1cd21993f95bf41899eadcd5c (the candidate rebased onto main 5d5d57d, which includes #16638).
Inspected:
- The full diff.
- The semantic owner:
seam_start_surface_refusalsmakes the before phase's own calls in its order, compared againstcli/commands/agent.rs(held external test file, then the policy from the packet, then the default store, thentrusted_head_surface_violations). - The Portable packet context leaves
allowed_edit_surfaceunchanged. - Consumers: check
seam_route(hazards over the union viapath_commit_refusal), pilotseam_start_premise(hazards over the union), and agent status (unchanged, with its recheck fail-closed). The editor is out of scope, tracked as #16645. - Docs: OUTPUT_SCHEMA, RIPR-SPEC-0318 and the changelog.
Proof on this head:
check_repair_agree(70),lsp_lifecycle(81) andcheck_agent_repair_route_agreepass.cargo clippy -p ripr --lib --tests -D warningsis clean.cargo xtask precommitexited 0 on the same commit before the rebase. The cherry-pick applied cleanly.- Negative experiment: with the surface fold disabled, the three new tests do not pass.
- Lib unit tests were not run locally, because the lib test build is OOM-killed in this container. Hosted qualification covers them.
An independent subagent review found nothing blocking. Its two findings are addressed in this head: a check half in the symlink test that could pass vacuously was replaced (see #16646), and stale doc comments were fixed.
Generated by Claude Code
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Exact candidate |
🤖 Generated with Claude Code
https://claude.ai/code/session_01YVdGzTog4paRbkjGfRRp4y
Governing issue or accepted claim: #16519
Acceptance delta (one sentence): When the selected test file, another test file outside the repair's edit surface, or an oversized or unreadable file differs from HEAD,
ripr checkandripr pilotname that file's commit before the repair start (pilot JSONcommit_required, notno_known_block), and the printed start begins after that commit; a dirty symlink gets no start and no commit.Source review: REVIEW_READY cc85fde
What was wrong (reproduced on main 97ac119)
The dirty-premise preflight deliberately defers test-surface dirt, symlinks, and oversized or unreadable files to the before phase's exact surface check. Check and pilot asked only the preflight, so they printed a start. Pilot JSON reported
no_known_block, and the start then exited 2 with one of two errors:tests/t.rshas uncommitted changes";A clean control started (exit 0).
What changed
app/repair_attempt:seam_start_surface_refusalsasks that exact check, making the before phase's own calls in its order:held_external_test_start_file, thentrusted_head_surface_violationsoveredit_cage_policy_from_packet_in, with the default store. No second validator.seam_start_refused_files= premise ∪ surface files. An error in either check offers no start.ripr check(seam_start_uncommitted_files) andripr pilot(seam_start_premise) read that union. The existing path-commit hazard check (Shared commit prerequisite can drop staged-only edits of a premise file (check, pilot, editor) #16518, Printed commit step fails during a pending merge because Git refuses path-limited commits #16440) runs over the whole union, so a symlink fails closed aspath_commit_unsafe.commit_step_subject: a commit naming a test file reads "commit your change" instead of "commit your production change". Production-only text is byte-identical.The status half of #16519 had already landed in #16503: status never offers
withheld_repair_command, and the premise warning is checked before the no-target fallback.Proof
check_repair_agree::pilot_json_withholds_a_repair_start_its_premise_refusesnow covers a dirty selected test file, a dirty test file outside the surface, and an oversized file. Each one readscommit_requiredwith the exact files. Its start refuses, the printed commit runs, and then the start begins. Everyno_known_blockcase (the committed control) runs its start.check_names_the_commit_a_dirty_test_file_needs_before_the_start: for both test-file kinds, check names the commit as a change, and the JSON route isblocked_uncommittedwith no command. The start refuses, then begins after the printed commit.a_dirty_tracked_symlink_gets_no_runnable_start(unix): pilot givespath_commit_unsafe, no commit, and the withheld start refuses. The check half is not asserted because of A tracked symlink outside the diff turns an unrelated check finding into static_unknown #16646.pilot_names_the_commit_step_before_a_repair_start_that_would_refuse: the old "dirty test file adds no commit step" expectation encoded this bug. It now runs refuse, commit, begin.cargo xtask precommitexit 0 on the candidate before rebasing onto current main.cargo clippy -p ripr --lib --tests -D warningsclean.check_repair_agree(69),check_agent_repair_route_agreeandlsp_lifecyclepass.Review
An independent subagent review found nothing blocking. It confirmed:
allowed_edit_surfaceunchanged, and the store and path spelling match;Fixed from it: a vacuous check half in the symlink test, and stale doc comments. Follow-ups filed: the editor still reads only the preflight (#16645), and a tracked symlink degrades check classification (#16646).
Generated by Claude Code