Skip to content

feat(cli): accept --json on ripr repair and ripr continue (#11584, partial) - #13718

Merged
EffortlessSteven merged 4 commits into
mainfrom
claude/issue-11584-repair-json
Nov 8, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
claude/issue-11584-repair-json

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven Zimmerman · project thread

Governing issue or accepted claim: #11584

Acceptance delta (one sentence): ripr repair and ripr continue accept --json and print their existing typed documents (partial: slice-1 option (b) split; the cli_refusal envelope, check refusal block and bare-repair exit 3 are not in this PR).

What changed

  • repair --json: a start prints the existing agent packet with repair_attempt.attempt_id on stdout (no human card appended); a repeated start prints the existing attempt's status document (same producer as status --attempt ID --json).
  • continue --json: prints the existing after-phase document; an already-complete attempt prints the status JSON.
  • Facade refusals keep exit codes and stderr prose with empty stdout. Argv usage errors stay prose-only, so the ux(check): check --json emits zero bytes on stdout for every failure except two scope guards - exit 2, prose on stderr, nothing to parse #6834 ruling and check_json_argv_usage_errors_stay_prose_only are untouched. No cli_refusal envelope.
  • Catalog rows cmd:repair / cmd:continue now report accepts_json_flag: --json; help text, overview, docs/COMMAND_HIERARCHY.md, changelog fragment updated. The "add --json to print it here" hint is now accurate for the facade (no text change needed).
  • Reuses existing producers (drive_before_phase_deferring_stdout, run_agent_repair_with_identity, render_agent_attempt_status_json); no forked renderer.

Proof

  • cargo fmt --check, cargo check -p ripr: pass.
  • cargo test -p ripr --test task_first_facade -j1: 105 passed (new: repair_json_prints_the_packet_with_the_attempt_id, continue_json_prints_its_after_phase_document, repair_and_continue_json_keep_refusals_and_usage_errors_prose_only; help-json assertion updated). cli_help_json_flags and cli_help_hierarchy pass.
  • cargo xtask check-command-catalog, check-output-contracts, check-static-language, check-doc-index: pass.
  • Gap: cargo test -p ripr --lib (new parse unit tests in task_first.rs) was OOM-killed by rustc locally; not run. cargo xtask precommit not run. Hosted CI is the evidence for those.

Design credit: #11632 (not pushed to, not revived; ported from scratch on current main).


Generated by Claude Code

repair start prints the agent packet with repair_attempt.attempt_id on
stdout; a repeated start and an already-complete continue print the
attempt status document; continue prints its after-phase document.
Refusals and argv usage errors keep their exit codes, stderr prose and
empty stdout. Catalog rows now report accepts_json_flag "--json".

Partial acceptance for #11584; the cli_refusal envelope stays held (#6834).
Builds on the design in #11632.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg
@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 8, 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 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 152 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: 484f50eb-e75a-49af-abbe-c0a9706e7899
Commits

Reviewing files that changed from the base of the PR and between ef8d7f1 and c430b61.

Files selected for processing: 9

  • .ripr/traceability.toml
  • changelog.d/repair-continue-json-11584.md
  • crates/ripr/src/cli/command_metadata.rs
  • crates/ripr/src/cli/commands/task_first.rs
  • crates/ripr/src/cli/help/overview.rs
  • crates/ripr/tests/task_first_facade.rs
  • docs/COMMAND_HIERARCHY.md
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0011-llm-work-loop.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.

Independent source review at 5d9f762: the repair --json path and the plumbing are sound, but one claim is wrong. continue --json can print a refusal or failure JSON document on stdout after an attempt is selected, while the changelog, docs, help text and catalog all say refusals keep empty stdout.

Finding 1 (should fix before merge): the "refusals keep empty stdout" claim is false for continue --json after-phase refusals.

  • run_facade_continue now passes json: options.json into run_agent_repair_with_identity for the Proceed arm. The advanced after phase deliberately prints a document on stdout on refusal paths when json is set.
  • In agent.rs, a typed refusal prints repair_after_refusal via render_repair_after_refusal_json (exit 3). A cage-terminal failure prints repair_after_failure. A post-verify tail failure prints the bare verify document.
  • The resolve shared workflow artifacts error path under json prints a document too.
  • Without --json, the same refusals leave stdout empty.
  • The changelog entry, docs/COMMAND_HIERARCHY.md and CONTINUE_HELP all say refusals keep exit codes, stderr prose and empty stdout. That is false for these paths.
  • The cmd:continue catalog row still declares EXIT_TYPED_REFUSAL_EMPTY_STDOUT, so it now contradicts the implemented behavior (for example edit_cage_violation with exit 2 and attempt_stale).
  • The new refusal test only covers pre-attempt refusals: no attempt (exit 3, empty stdout), no_eligible_seam, and argv usage errors. It never reaches the after-phase refusal paths, so it does not catch this.
  • Fix by either:
    • (a) making the facade hold or drop the after-phase refusal document so stdout stays empty, matching the catalog, or
    • (b) accepting the documents, changing cmd:continue to a stdout-document refusal contract (the existing JSON_OPTIONAL_STDOUT and STDOUT_DOCUMENT variants are the precedent), correcting the changelog, docs and help text, and adding a test that drives a typed after-phase refusal under --json.
  • Either way, add that test.

Verified

  • No forked JSON.
    • repair --json passes json into the existing facade_before_options / AgentRepairOptions.json, so it reuses the advanced agent repair --phase before --json producer. Stdout is the packet with the additive repair_attempt.attempt_id.
    • The facade prints before_stdout as returned and skips the card.
    • The resume and already-complete paths use build_agent_attempt_status / render_agent_attempt_status_json, the same projection as ripr status --attempt --json.
    • The tests assert byte equality with status --attempt --json.
  • stdout carries only JSON on success.
    • Progress narration, wrote lines and the resume note all go to stderr (eprintln!).
    • The advanced after phase under --json prints one document.
    • The held-stdout design (#7032) is preserved: nothing prints before the attempt exists, and repair --json returns before the card step.
  • repair refusals. BeforePhaseError::Refused becomes CommandError::Decision with no stdout. An unknown, unanchored or no-eligible gap, and the status-build error on resume (Decision), all leave stdout empty. The test confirms no_eligible_seam exits 3 with empty stdout.
  • continue selection-arm refusals. EndedUnsuccessfully, EndedUnconfirmed, BaselineBlocked and NoneAvailable ignore json and keep stderr prose, exit 3 and empty stdout.
  • --json=1. It is rejected by exact-match arms in both parsers. The unit test in task_first.rs covers both parsers; the previous continue --json rejection case was correctly replaced with --json=1. Usage errors are unchanged, with exit 2, prose and empty stdout, and the CLI-level test uses a bogus flag next to --json.
  • Catalog and docs.
    • The accepts_json_flag change to JsonFlag::Json is consistent with cli_help_json_flags.rs, which cross-checks catalog against help-parsed flags.
    • The help text now lists --json, and the help_surfaces_stay_task_first assertion is updated.
    • cli_help_hierarchy.rs uses a substring match that still holds.
  • Discrimination. The tests would fail if --json were ignored: from_slice on the human summary fails, the repair_attempt.attempt_id pointer is asserted, and byte-equality with status --json is asserted. A negative control without --json is included. The weakest assertion is continue --json's is_object() plus attempt-id substring; asserting a schema/kind field would be tighter.
  • #6834 (decision posted 2026-11-08). The PR leaves the cli_refusal envelope out on purpose. Argv usage errors stay prose-only and the tests pin that. No mismatch. The only wrinkle is Finding 1: after-phase refusal documents are an existing envelope and are not cli_refusal, but their presence contradicts the empty-stdout claim.

Not verified: no cargo build or test run (disk and memory constraints), and I did not read the hosted CI results. I read the producers on the local checkout (main) rather than materializing the PR head, so I relied on the diff showing that only task_first.rs and the catalog, help and docs changed.


Generated by Claude Code

Under continue --json a typed after-phase refusal or failure prints its
document (repair_after_refusal, repair_after_failure, or the verify
document) on stdout beside the stderr prose and the same exit code. The
cmd:continue catalog row now declares the json_optional refusal stdout
contract; selection-arm refusals still leave stdout empty. Help, docs and
the changelog fragment say exactly which refusals print a document, and a
new test drives a diverged-head refusal with and without --json.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg
…t comments

Review nits on #13718: continue help and COMMAND_HIERARCHY now say
operational errors before the verify step keep stdout empty; the
RefusalStdout::JsonOptional doc lists continue; a test comment no
longer cites the empty-stdout constant for a selection refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

@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

Source review of head 45183da.

Inspected: full diff; run_facade_continue in task_first.rs routing Proceed into agent::run_agent_repair_with_identity with json: options.json; typed after-phase refusal sites in agent.rs (all set selected_attempt before refusal.typed), the --json refusal render at agent.rs ~1618-1631 and the pending verify / repair_after_failure render; selection arms (ended, unconfirmed, baseline blocked, none, ambiguous, unanchored) which never read options.json; cmd:continue on EXIT_TYPED_REFUSAL_JSON_OPTIONAL_STDOUT in required_exit_contract, the METADATA row and the conformance table; CONTINUE_HELP, docs/COMMAND_HIERARCHY.md, docs/EXIT_CODES.md and the changelog fragment.

Test grip: continue_json_prints_the_typed_after_refusal_document fails on empty stdout (JSON parse) and on an exit-code change, asserts kind == repair_after_refusal, the attempt id and the stderr prose, and asserts its fixture setup.

Last commit names operational errors before the verify step in help and docs and corrects two comments.

Local proof on the prior head: fmt, cargo check, task_first_facade (106), cli_help_json_flags (3), check-command-catalog, check-output-contracts, check-static-language. Lib unit tests run in hosted CI.

Cross-PR note: #13720 changes argv usage errors under --json; whichever of #13718 / #13720 lands second updates the --bogus-flag-11584 empty-stdout assertions.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 8, 2026 13:07
@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!

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 potential issues.

Devin Review

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

ripr static exposure check

Commit c430b614f237 · run · advisory, static evidence only (not a mutation run).

#ripr agent static-advisory base=ef8d7f17c7ff022bcd107e77448eaf0b96bf54fa findings=55 gaps=3 propagation_unknown=3 static_unknown=19 weakly_exposed=33
weakly_exposed|crates/ripr/src/cli/command_metadata.rs:1946|exit: EXIT_TYPED_REFUSAL_JSON_OPTIONAL_STDOUT,|missing=exit: EXIT_TYPED_REFUSAL_JSON_OPTIONAL_STDOUT,|test=t1|id=probe:crates_ripr_src_cli_command_metadata.rs:field_construction:3faf9c61
weakly_exposed|crates/ripr/src/cli/commands/task_first.rs:28|Usage: ripr repair [<item>] [--root PATH] [--base REF] [--json] [--quiet]|missing=Usage: ripr repair [<item>] [--root PATH] [--base REF] [--json] [--quiet]|test=t2|id=probe:crates_ripr_src_cli_commands_task_first.rs:field_construction:0330b641
weakly_exposed|crates/ripr/src/cli/commands/task_first.rs:78|Usage: ripr continue [--attempt ID] [--root PATH] [--json] [--quiet]|missing=Usage: ripr continue [--attempt ID] [--root PATH] [--json] [--quiet]|test=t3|id=probe:crates_ripr_src_cli_commands_task_first.rs:field_construction:eecd04b8
t1=crates/ripr/src/cli/command_metadata.rs:3271 agent_verify_row_cannot_claim_stdout_document_on_refusal mock_expectation `expect_single_violation(&rows, "contradicts the implemented mapping")` miss=missing_exact_assertion
t2=crates/ripr/src/cli/commands/task_first.rs:1313 continue_parse_handles_identity_and_help relational_check `if parse_continue_args(&argv)? != ContinueFacadeCommand::Help { return Err(forma…` miss=weak_assertion
t3=crates/ripr/tests/task_first_facade.rs:4856 continue_on_unsuccessful_terminal_attempts_refuses_without_completion mock_expectation `assert_exit( &repeated, 3, &format!("continue on a {state} attempt must refuse")…` miss=missing_exact_assertion
limits=propagation_unknown:3,static_unknown:19,weakly_exposed:30
next=ripr explain --root /home/runner/work/ripr-swarm/ripr-swarm/head --base ef8d7f17c7ff022bcd107e77448eaf0b96bf54fa --committed --mode draft --format agent probe:crates_ripr_src_cli_command_metadata.rs:field_construction:3faf9c61

Took 73s.

…0011

OUTPUT_SCHEMA.md documented the `repair_attempt` block as exclusive to
`ripr agent repair --phase before --json` and its version table listed only
the advanced repair routes. Name `ripr repair --json` and
`ripr continue --json` in the version table and the before/after sections,
including the repeated-start and already-complete `agent_attempt_status`
variants and the refusals that keep stdout empty (#11584).

Add the JSON routes as an RIPR-SPEC-0011 amendment and register the four
new task_first_facade integration tests in the spec's test mapping and
.ripr/traceability.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

@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

Source review of head c430b61.

The code and tests are unchanged since the 45183da review (same task_first.rs / agent.rs paths, catalog contract, and discriminating continue_json_prints_the_typed_after_refusal_document). The latest commit is docs and traceability only: docs/OUTPUT_SCHEMA.md names ripr repair --json / ripr continue --json in the version table, the repair_attempt contract and the after-phase stdout section; RIPR-SPEC-0011 gains the #11584 amendment; the four new task_first_facade tests (all present in the file) are registered in the spec Test Mapping and .ripr/traceability.toml. The doc text matches the help, COMMAND_HIERARCHY.md and the code paths reviewed earlier.

Local proof: fmt, check-traceability, check-spec-format, check-doc-index, check-output-contracts, check-doc-artifacts on this head; Rust tests ran on the prior head and hosted CI covers lib tests.

Both bot review threads have replies naming the commit and are resolved.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit e07e7a0 into main Nov 8, 2026
79 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/issue-11584-repair-json branch November 8, 2026 14:28
EffortlessSteven pushed a commit that referenced this pull request Nov 8, 2026
After merging main (#13718), `ripr repair --json --bogus` and
`ripr continue --json --bogus` already route through
`suggest::unknown_argument` and its `note_unknown_argument` helper, so
the run boundary writes the standalone `cli_refusal` document on stdout
(exit 2 and stderr prose unchanged, #6834 decision). Update the #13718
test to assert that document (code, token, next, minimal shape) with a
no-`--json` negative control, rename it to
repair_and_continue_json_keep_refusals_prose_and_usage_errors_cli_refusal
and update its traceability and RIPR-SPEC-0011 registrations. Repair
refusals and continue selection refusals still keep stdout empty.

Help text, COMMAND_HIERARCHY, OUTPUT_SCHEMA, the RIPR-SPEC-0011
amendment and the changelog fragment now say unknown flags (and stray
continue positionals) print the cli_refusal document while other argv
usage errors keep stdout empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg
EffortlessSteven pushed a commit that referenced this pull request Nov 8, 2026
#13718 added --json to `ripr repair` and `ripr continue` help while
#13731 landed the generated-reference freshness test, so
cli_reference_doc fails on main. Regenerated with
RIPR_BLESS_CLI_REFERENCE=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg
EffortlessSteven pushed a commit that referenced this pull request Nov 8, 2026
main's docs/CLI_REFERENCE.md went stale when #13718 and #13731 merged
independently; regenerated on this branch's merged tree with
RIPR_BLESS_CLI_REFERENCE=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg
EffortlessSteven pushed a commit that referenced this pull request Nov 8, 2026
main's docs/CLI_REFERENCE.md went stale when #13718 and #13731 merged
independently; regenerated on this branch's merged tree with
RIPR_BLESS_CLI_REFERENCE=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg
EffortlessSteven pushed a commit that referenced this pull request Nov 8, 2026
Main went stale when #13718 added --json after #13731's generated
reference; cli_reference_matches_the_binary failed on the PR's hosted lane.
Bytes are from RIPR_BLESS_CLI_REFERENCE=1 cargo test -p ripr --test cli_reference_doc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLWwPp2QsskapES8KVk
EffortlessSteven added a commit that referenced this pull request Nov 8, 2026
#13718 added --json to `ripr repair`/`ripr continue` help while #13731 landed the generated-reference freshness test; cli_reference_doc failed on main. Regenerated with RIPR_BLESS_CLI_REFERENCE=1. The fixture SPEC line duplicates #13773 and merges to nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg
EffortlessSteven pushed a commit that referenced this pull request Nov 8, 2026
#13718 added --json to ripr repair and ripr continue without
regenerating docs/CLI_REFERENCE.md, so cli_reference_matches_the_binary
fails on main. Ported here so this PR's Rust-only feature lane is green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG
EffortlessSteven added a commit that referenced this pull request Nov 8, 2026
…ontext (#13516) (#13722)

* perf(agent): verify from the compact check report without full JSON context (#13516)

`ripr check --format agent` now ends with a `verify=complete|...` or
`verify=refused|...|reason=` record projected from the producer-owned
analysis outcome, the full summary counts and the worktree/no-scope
disclosures, placed last so truncation cannot leave a leading success marker.
The generated `ripr init --agents` loop and quickstart verify and finish from
that same Agent report instead of `--format json-compact`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* fix(agent): changelog fragment and partial-scope/no-scope verify tests (#13516)

Move the changelog entry to a changelog.d fragment, add the partial_scope
refusal test, and assert a NoScope outcome with no_scope_provided names both
reasons.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* fix(agent): refuse verify on excluded source; app-owned completion verdict (#13516)

- Refuse `verify=complete` when untracked or gitignored routed source was
  excluded from the diff (`untracked_source_excluded`,
  `ignored_source_excluded`); a working-tree read leaves
  `unanalyzed_working_tree` false while listing those paths.
- Move the complete/refused predicate and typed reasons to
  `CheckOutput::verification` (app/check_verification.rs); the Agent
  renderer only formats it. Direct predicate tests added.
- Agent test fixture derives `summary` with the producer's
  `summarize_findings`, so the positive control and header/verify counts
  agree; the top-gap test asserts the verify line last.
- Docs: reason vocabulary in AGENT_QUICKSTART, OUTPUT_SCHEMA, SPEC-0147,
  changelog fragment; header vs verify counts under suppression policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* fix(agent): verify refuses untracked enabled-language source only (#13516)

Gitignored source no longer refuses `verify=`: `git status --ignored`
collects every routed file under node_modules/, .venv/, dist/ or nested
worktrees, which made `verify=complete` unreachable in ordinary repos.
Ignored files are excluded on purpose, are almost never the agent's edit,
and the human/GitHub/JSON notes keep disclosing them. The
`ignored_source_excluded` reason is removed.

Untracked source still refuses (`untracked_source_excluded`), since an
agent's new file stays untracked until `git add -N`, but only for paths
routing to a language enabled for the run. The enabled set is the one the
producer already records on the outcome
(`check_findings_inputs.languages`); an unknown set fails closed and
refuses on any untracked routed path. The disclosure lists themselves are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* fix(fixtures): port main SPEC class fix for module_reach_control_qualified

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* docs(cli): rebless CLI reference after merging main

main's docs/CLI_REFERENCE.md went stale when #13718 and #13731 merged
independently; regenerated on this branch's merged tree with
RIPR_BLESS_CLI_REFERENCE=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Nov 8, 2026
…ks (#13674)

* test(cli): pin agent-facing output byte budgets on a 5-gap diff (#13673)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

* perf(output): collapse repeated stub commands and brief omission sentences (#13673)

The check Hidden block printed a full 'ripr agent stub --root <abs> --seam-id'
command (plus a PowerShell variant) under every row; it now prints each row's
Test id and one command template. Agent brief warnings repeated the same
~170-byte omission sentence per seam; seams sharing a reason now share one
sentence ('seams A at f:l, B at f:l are ...'), in both the full and streamed
selectors. A single seam keeps its existing wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

* test(cli): measure output budgets with the root path normalized

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

* test(cli): tighten agent output byte ceilings after the cuts (#13673)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

* docs+test: specify grouped brief warnings, add changelog, pin output shape (#13673)

RIPR-SPEC-0010 now defines one warning per shared omission reason. The budget
fixture hides a row that can start a test, and the test asserts that hidden
rows carry only their test id with one shared stub template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

* docs(cli): regenerate CLI reference for repair/continue --json

#13718 added --json to ripr repair and ripr continue without
regenerating docs/CLI_REFERENCE.md, so cli_reference_matches_the_binary
fails on main. Ported here so this PR's Rust-only feature lane is green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

* docs(cli): regenerate CLI reference for ripr completions

#13667 added `ripr completions` without regenerating
docs/CLI_REFERENCE.md, so cli_reference_matches_the_binary fails on main
59ad478. Regenerated with RIPR_BLESS_CLI_REFERENCE=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Nov 8, 2026
…rors (#11584) (#13720)

* wip: cli refusal envelope (unverified)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* Add cli_refusal schema, tests, docs and verification registrations

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* Update usage-error tests for cli_refusal; register xtask contract

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* Assert the refusal block on real check refusals and its absence on completed runs; pin explicit-JSON usage-error documents

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* Fail closed: selector_miss next is always null; pin with a hostile selector

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* Schemas: require the refusal block on refusal documents and forbid it on completed runs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* fix(schema): admit partial-scope check runs; scope cli_refusal docs

The #11584 check.schema.json conditional required the refusal block on any
document whose analysis_scope object carried run_status. A completed bounded
partial-scope run (RIPR-PROP-0019) writes analysis_scope with run_status
limited_partial_scope and findings but no refusal block, so the rule rejected
it. Key the refusal arm on a run_status other than limited_partial_scope, fix
the rule description, and register a real partial-scope check capture as an
edge fixture plus a test that exercises both arms in both directions.

Docs (OUTPUT_SCHEMA, EXIT_CODES, RIPR-SPEC-0241, changelog fragment) now name
the argv classes that write cli_refusal under a JSON request and list the
ones that keep empty stdout (missing value, malformed value, conflicting
flags, values rejected outside the shared unknown-value builder).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* cli: cover json-terse and context stray positionals in cli_refusal (#11584)

- JSON-request detection now asks the format owner: OutputFormat gains an
  exhaustive is_json_request(), and usage_refusal parses --format through
  OutputFormat::parse_cli_name instead of a hand-kept name list, so
  json-terse (and check-findings-json) are JSON requests; SARIF and the
  Shields projections stay outside.
- `ripr context --json <positional>` notes an unknown_argument refusal with
  the existing prose and `next` = `ripr context --help`.
- RIPR-SPEC-0241 acceptance example, required evidence and traceability now
  match the amendment and the renamed test; specs index summary updated.
- check-partial-scope fixture uses repo-relative fixture paths instead of
  captured absolute local paths (check-local-context).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* repair/continue --json: unknown flags write the cli_refusal document

After merging main (#13718), `ripr repair --json --bogus` and
`ripr continue --json --bogus` already route through
`suggest::unknown_argument` and its `note_unknown_argument` helper, so
the run boundary writes the standalone `cli_refusal` document on stdout
(exit 2 and stderr prose unchanged, #6834 decision). Update the #13718
test to assert that document (code, token, next, minimal shape) with a
no-`--json` negative control, rename it to
repair_and_continue_json_keep_refusals_prose_and_usage_errors_cli_refusal
and update its traceability and RIPR-SPEC-0011 registrations. Repair
refusals and continue selection refusals still keep stdout empty.

Help text, COMMAND_HIERARCHY, OUTPUT_SCHEMA, the RIPR-SPEC-0011
amendment and the changelog fragment now say unknown flags (and stray
continue positionals) print the cli_refusal document while other argv
usage errors keep stdout empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* fix(fixtures): port main SPEC class fix for module_reach_control_qualified

Same one-line fix as #13773/#13778: main's precommit fails
check-fixture-contracts after #13668 and #13613 merged independently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* docs(cli): rebless CLI reference after merging main

main's docs/CLI_REFERENCE.md went stale when #13718 and #13731 merged
independently; regenerated on this branch's merged tree with
RIPR_BLESS_CLI_REFERENCE=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

* fix(schema): keep #11584 refusal block additive in check schemas

The schema-compatibility check (#1720) rejects newly required keys and an
added allOf without a schema_version bump. Bumping check 0.2 would ripple
through every check golden, so keep `status`/`error` optional and drop
the refusal/partial-scope conditional. The producer still writes the block
on every refusal; the xtask test now pins that on the producer-captured
fixtures, and the schema still rejects a malformed block. OUTPUT_SCHEMA
records that the pairing becomes a schema rule at the next bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLSoFodhRSfKyLdQTcg

---------

Co-authored-by: Claude <noreply@anthropic.com>
EffortlessSteven added a commit that referenced this pull request Nov 8, 2026
…oses #7330) (#12679)

* fix(human): do not claim reach when reach stage is weak (Closes #7330)

Guard partial_path_hint and the unestablished-assertion arm so generic
weak reach (for example weak_token_substring) never prints "reaches this
change" in the digest hint.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>

* test(goldens): weak-reach digest hint goldens + changelog fragment (#7330)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG

* fix(human): guard every weak reach hint

* fix(human): require reach for guard refusal hint

* test(goldens): re-bless f64 trait-shadow fixtures for #7330 wording

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLWwPp2QsskapES8KVk

* docs(spec): bind RIPR-SPEC-0122 digest hint to established reach (#7330)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLWwPp2QsskapES8KVk

* docs(cli): regenerate CLI reference for repair/continue --json

Main went stale when #13718 added --json after #13731's generated
reference; cli_reference_matches_the_binary failed on the PR's hosted lane.
Bytes are from RIPR_BLESS_CLI_REFERENCE=1 cargo test -p ripr --test cli_reference_doc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNUoLWwPp2QsskapES8KVk

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Steven Zimmerman, CPA <steven@effortlessmetrics.com>
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