Skip to content

fix(#16519): name the commit a dirty test file needs before a repair start - #16647

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-9g17ji
Nov 29, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-9g17ji

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

🤖 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 check and ripr pilot name that file's commit before the repair start (pilot JSON commit_required, not no_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:

  • "The test file tests/t.rs has uncommitted changes";
  • "Uncommitted: tests/other.rs".

A clean control started (exit 0).

What changed

  • app/repair_attempt:
    • seam_start_surface_refusals asks that exact check, making the before phase's own calls in its order: held_external_test_start_file, then trusted_head_surface_violations over edit_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) and ripr 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 as path_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.
  • Docs: OUTPUT_SCHEMA (check route and pilot premise states), RIPR-SPEC-0318, and a changelog fragment.

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_refuses now covers a dirty selected test file, a dirty test file outside the surface, and an oversized file. Each one reads commit_required with the exact files. Its start refuses, the printed commit runs, and then the start begins. Every no_known_block case (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 is blocked_uncommitted with no command. The start refuses, then begins after the printed commit.
  • a_dirty_tracked_symlink_gets_no_runnable_start (unix): pilot gives path_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.
  • Negative experiment: with the surface fold disabled, all three new tests fail.
  • Local:
    • cargo xtask precommit exit 0 on the candidate before rebasing onto current main.
    • cargo clippy -p ripr --lib --tests -D warnings clean.
    • check_repair_agree (69), check_agent_repair_route_agree and lsp_lifecycle pass.
    • Lib unit tests (including the pilot spawn-count test) were not run locally, because the lib test build is OOM-killed in this container. That is left to hosted CI.

Review

An independent subagent review found nothing blocking. It confirmed:

  • parity with the before phase: the Portable packet context leaves allowed_edit_surface unchanged, and the store and path spelling match;
  • hazards are computed over the union;
  • fail-closed handling.

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

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
@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 Nov 29, 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 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 137 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: 2d913212-08ef-4d56-bdd5-14d80344ed17
Commits

Reviewing files that changed from the base of the PR and between 5d5d57d and cc85fde.

Files selected for processing: 11

  • changelog.d/16519-test-file-dirt-commit-step.md
  • crates/ripr/src/app.rs
  • crates/ripr/src/app/navigation.rs
  • crates/ripr/src/app/repair_attempt/mod.rs
  • crates/ripr/src/app/task_first.rs
  • crates/ripr/src/output/human/triage.rs
  • crates/ripr/src/output/pilot/render/complete.rs
  • crates/ripr/src/output/pilot/tests.rs
  • crates/ripr/tests/check_repair_agree.rs
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0318-pilot-dirty-target-next-steps.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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_refusals makes the before phase's own calls in its order, compared against cli/commands/agent.rs (held external test file, then the policy from the packet, then the default store, then trusted_head_surface_violations).
  • The Portable packet context leaves allowed_edit_surface unchanged.
  • Consumers: check seam_route (hazards over the union via path_commit_refusal), pilot seam_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) and check_agent_repair_route_agree pass.
  • cargo clippy -p ripr --lib --tests -D warnings is clean.
  • cargo xtask precommit exited 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

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 29, 2026 20:36
@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

Exact candidate cc85fde98cbbcaa1cd21993f95bf41899eadcd5c now has green required qualification. I checked the raw named tests: shard 1 passed the Pilot refusal/commit/begin and tracked-symlink controls; shard 2 passed the Check dirty-test refusal/commit/begin control. This is candidate qualification, not a merge-group receipt. Once the exact-head independent review gate is satisfied, please carry it through the protected queue. The editor (#16645) and direct dirty-premise CLI advice (#16518/#2769) are separate and are not established by this result.

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 561d1b9 Nov 29, 2026
20 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-9g17ji branch November 29, 2026 22:17
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