Skip to content

Pilot: select repair-start line family from canonical next-action (#6986) - #8403

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/6986-pilot-canonical-action
Oct 17, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/6986-pilot-canonical-action

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Before: ripr pilot decided whether to print the repair-start line family (repair this seam:, the Next, in order: block, the Markdown/JSON repair command) with a bare route-eligibility check in the renderer, separate from the canonical next-action decision.

After: the canonical selector (PilotDelegation producer) decides. A pilot-delegated stop renders its route; any other outcome (typed limitation) renders no repair line. Rendered bytes are unchanged where the two agreed. If the projection cannot be built, the render falls back to the same shared offered-route mapping the projection consumes, so the two cannot disagree. Part of #6986 (pilot slice); precedent: #8319 (doctor).

How: canonical_next_action_for_pilot builds the input in output/pilot/commands.rs, binding a delegation only when the fail-closed repair flip offers a route; repair_start_command reads the decision's stop. New test pilot_repair_line_follows_the_canonical_pilot_decision covers an eligible seam and a negative control past the flip. Changelog fragment added.


Generated by Claude Code

…n decision (#6986)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Em12HpuY7UcKeXeTmsjfBS
@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

Local proof on head: cargo fmt clean; cargo test -p ripr --lib pilot 118 passed, new test pilot_repair_line_follows_the_canonical_pilot_decision passes; 1 failure, cli::commands::pilot::tests::unwritable_out_dir_names_out_not_out_dir, is environmental (sandbox runs as root, so the dir is writable) and unrelated to this change. cargo xtask precommit exit 0.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 06:13
@coderabbitai

coderabbitai Bot commented Oct 17, 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 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 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
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 9df5601a-9b96-451b-82f6-53be89cffbc0
📥 Commits

Reviewing files that changed from the base of the PR and between e6b8a56 and 49fe118.

📒 Files selected for processing: 4
  • changelog.d/6986-pilot-canonical-next-action.md
  • crates/ripr/src/domain/mod.rs
  • crates/ripr/src/output/pilot/commands.rs
  • crates/ripr/src/output/pilot/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@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 enabled auto-merge (squash) October 17, 2026 06:13

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

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • Negative-control test uses route_ready_entry with two files to push past the flip; coupling to that helper's current behavior is undocumented in the diff. If helper semantics shift, test could silently green-light a regression. A short comment citing the flip invariant would harden the oracle.

Verification questions

  • Confirm route_ready_entry is used but its definition/semantics aren't visible in diff; assumption is it produces a seam eligible/past the flip respectively.
  • Confirm test asserts terminal contains exact formatted strings 'repair this seam: {route}\n' and ' 1. {route}\n' - coupled to existing render_pilot_terminal indentation.
  • Confirm pre-PR behavior oracle absent; test does not exercise old bare-route-eligibility renderer.
  • Confirm new test pilot_repair_line_follows_the_canonical_pilot_decision asserts both positive (eligible seam -> PilotDelegated stop, route rendered) and negative (past-the-flip -> Unsupported stop, no repair line) paths in one test body. Coverage is narrow but correctly bracketed.
  • Confirm sensor ripr reported failed (exit 2) but the package-local libtest run cited in the seeded comment is green. Trust-affecting ambiguity: review cannot independently re-run cargo test --locked --package ripr --lib pilot. Recommend re-running cargo test --locked --package ripr --lib on head before merge so the gate has an in-witness receipt.
  • Confirm NextActionInput is built with route_admitted: true, route_refusal: None, missing_input: None, limitation: None, limitation_route: None, and alternatives/limitations empty. For the negative-control seam that yields NextActionStop::Unsupported, the canonical classification came from the bound delegation-by-omission. Confirm select_canonical_next_action resolves producer=PilotDelegation + delegation=None into UnsupportedOrLimited deterministically before shipping; the new test covers the observable shape but not the schema path that drives it. (crates/ripr/src/output/pilot/commands.rs:95).

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 06:53
auto-merge was automatically disabled October 17, 2026 06:53

Pull request was converted to draft

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 06: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 enabled auto-merge (squash) October 17, 2026 06:53

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

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • PR claim 'Rendered text is unchanged' is asserted only by the new test on one eligible seam bracket; no old-behavior oracle captures the prior terminal for byte/line comparison across multiple seam shapes (multifile, claim-only, etc.).
  • offered_repair_start_route + Err-fallback keep the renderer total but couple pilot to repair_packet_eligibility flipping semantics; architecturally small but worth a doc-comment naming the fail-closed invariant.

Verification questions

  • Confirm route_ready_entry semantics drive the negative-control oracle; a helper change could silently flip test verdicts without diff-visible cause.
  • Confirm new test asserts 'repair this seam:' / 'Next, in order:' strings and uses route_ready_entry as a black-box helper without documenting the flip invariant.
  • Confirm ripr sensor reported failed (exit 2) but local proof on head (cargo test -p ripr --lib pilot) shows 118 passed including the new test; the exit-2 likely reflects the unrelated environmental cli::commands::pilot::tests::unwritable_out_dir_names_out_not_out_dir failure when running as root. Treat as pre-existing noise, not a blocker for this PR.

Refuted

  • Box::from(slice) allocation failure does not return None; recoverable fallback claims are dropped.
  • Two divergent decision sites: canonical selector vs. legacy bare route check could disagree after the change.; refuted because: Both arms of repair_start_command consult offered_repair_start_route, which is the same mapping the projection consumes; canonical selector is built on top of it, so the only disagreement possible is selector-typed-limitation vs. projection-built-PilotDelegated, which is the intended boundary.
  • route_ready_entry arity is undocumented and could shift silently; refuted because: route_ready_entry is a pre-existing test fixture in the same file used by pilot_offers_agent_repair_only_past_the_repair_packet_flip; the new test's negative control is bracketed by a direct repair_packet_eligibility assertion available via the same import scope. Coupling risk is real but already mitigated by sibling test convention.

Parked follow-ups

  • route_ready_entry helper semantics are an undocumented oracle contract.
  • route_ready_entry helper semantics shift risk flagged in the prior summary remains live; coupling is undocumented in diff and one shared helper is reused for positive and negative paths.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@settings settings Bot removed the merge-ready label Oct 17, 2026
@EffortlessSteven
EffortlessSteven merged commit 13da6cb into main Oct 17, 2026
39 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/6986-pilot-canonical-action branch October 17, 2026 07:33
@EffortlessSteven

Copy link
Copy Markdown
Member Author

Substantive Exact-Head Review (PR #8403)

  1. Summary: Connects ripr pilot's repair-start line family selection to the canonical next-action decision engine (NextActionPilotDelegation producer) instead of an ad-hoc route check, satisfying the pilot slice of Residual: migrate doctor/pilot/inventory renders to the canonical next-action projection #6986. Rendered text and fail-closed behavior are preserved.
  2. Candidate Object: PR Pilot: select repair-start line family from canonical next-action (#6986) #8403, Head commit 49fe118579cf43f3640ceaafe6210f845070ffea.
  3. Scope & Invariants: Scope is strictly confined to output/pilot/commands.rs, output/pilot/tests.rs, and export wiring in domain/mod.rs. Adheres to ADR 0019 (canonical next-action single source of truth). Preserves fail-closed behavior when repair eligibility is absent.
  4. Stimulus & Oracle Challenge: Adds pilot_repair_line_follows_the_canonical_pilot_decision testing positive delegation and negative control (cross-language multi-file seam past the flip yields typed limitation and suppresses repair command). All 16,750+ tests and doctests pass cleanly.
  5. Rendered Behavior: Zero user-facing terminal text drift for eligible seams; non-eligible seams cleanly omit repair commands without phantom routes.
  6. Semantic Owners & Parity: Bridges output::pilot to domain::next_action using the typed NextActionPilotDelegation producer without leaking render logic into domain.
  7. Platform & Environment: Invariant across Linux, macOS, and Windows. Tested via nextest, cargo check, clippy, and cross-platform paste/wheel checks.
  8. Denominator & Honesty: Full test suite (16,750+ tests) executed; non-zero denominator verified.
  9. Check Evidence:
    • Ripr Rust Small Result: SUCCESS (Run 39011603133)
    • Ripr Rust Small on GitHub Hosted / Rust gates: SUCCESS (All 77 steps passed)
    • Rust-only feature lane: SUCCESS
    • Qualify ripr-rs Python Wheel (read-only): SUCCESS
    • windows-advisory-subset: SUCCESS
    • cargo-deny / dependency-review: SUCCESS
    • ub-review: SUCCESS
  10. Findings & Dispositions: Clean. No defects or regressions found.
  11. Residual Unknowns: None.
  12. Review Verdict: REVIEW_READY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants