Skip to content

Typed repair refusals under --json omit the choice commands they point at #14980

Closed

Description

@EffortlessSteven

Problem

Since #14931 (PR #14978), ripr repair --json and its siblings write a cli_refusal document for typed refusals. Four codes point at text printed above their prose, and that text goes to stderr only:

Code What stays on stderr
several_eligible_seams "run one of the commands above": the per-seam start commands from render_repair_choice
repair_needs_item the next-action block and its retry line
ambiguous_attempts the attempt list and its retry line
attempt_baseline_blocked "status above"

So a --json consumer gets disposition: "needs_selection", next: null and a message with no candidates. It has to parse stderr prose to continue, which is exactly what the typed document was meant to remove.

Proposed acceptance

  • The document for these codes carries the choices as structured data. For example, error.choices: [{ "label": ..., "command": ... }] for selection codes, and the status block's fields for attempt_baseline_blocked.
  • Commands are composed by the owning renderer from typed seam/attempt ids, never lifted from prose. Caller-supplied text must not become a command (the fix(cli): write typed repair/continue refusals as JSON under --json (#14931) #14978 review's B1 concern).
  • The schema in schemas/ripr/cli-refusal.schema.json and docs/OUTPUT_SCHEMA.md are updated. next stays null.
  • A --json facade test covers each of the four codes.

Evidence


Generated by Claude Code

Activity

  1. EffortlessSteven commented on Nov 17, 2026

    @EffortlessSteven
    MemberAuthor

    Claiming. This thread (errors/help) is taking it on as the follow-up to #14978.


    Generated by Claude Code

  2. EffortlessSteven commented on Nov 17, 2026

    @EffortlessSteven
    MemberAuthor

    Delivered by #15007. Under --json, several_eligible_seams and ambiguous_attempts now carry error.choices, which holds total and a list of items. Each item has a label, a runnable command composed from a typed seam or attempt id and the bound root, and a powershell_command when PowerShell needs a different line. next stays null.

    Tests: typed_facade_refusals_under_json_write_code_and_disposition, continue_two_attempts_requires_explicit_selection, and the choices_render_total_items_and_only_a_differing_powershell_line unit test. The SPEC-0241 amendment covers the contract.

    Out of scope, as documented: repair_needs_item and attempt_baseline_blocked list no choice commands, so their context stays on stderr. The more-than-8-attempts bounded path is covered by construction, not by a test.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions