Skip to content

perf(output): pin agent output byte budgets and cut two repeated blocks - #13674

Merged
EffortlessSteven merged 11 commits into
mainfrom
claude/project-thread-4vccto
Nov 8, 2026
Merged

EffortlessSteven merged 11 commits into
mainfrom
claude/project-thread-4vccto

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven Zimmerman · project thread

Summary

First slice of #13673 (agent-facing token footprint).

  1. Budget test cli_smoke/agent_output_budget.rs: a five-gap diff with same-file tests through default human check (steady-state rerun), --format json and --format github, with the absolute root normalized to <root> so path length doesn't move the number. Ceilings are 3,900 / 88,000 / 3,300 B, about 7-8% above the measured 3,635 / 82,413 / 3,063 B. The test also asserts the Hidden-block shape: rows carry only a Test id: and one shared stub template follows.
  2. check Hidden block: rows that offered a stub printed a full ripr agent stub --root <abs> --seam-id <id> (+ PowerShell variant) each. They now print Test id: <id> and one shared template ... --seam-id TEST_ID. Ambiguous-stub rows are unchanged; this composes with main's identical-row collapse.
  3. agent brief warnings: seams sharing one omission reason share one sentence (seams A at f:l, B at f:l are ...) in both the full and streamed selectors. A single seam keeps the old wording. RIPR-SPEC-0010 documents the grouped form.

Measured on a 5-gap repo: default check 4,022 → 3,805 B; agent brief --json 12,021 → 11,419 B.

Why pinned wording changed: the goal is token efficiency (#13673); repeated per-row sentences and commands are the cost. No consumer parses these strings (checked review_comments, first_useful_action, MCP, LSP, schemas).

Governing issue or accepted claim: #13673
Acceptance delta (one sentence): Agent-facing check output is byte-budgeted by a test and the Hidden-block stub commands and brief omission sentences are stated once instead of per row.

Evidence

  • cargo xtask precommit pass (before the latest main merge).
  • Focused lib tests (agent_brief, triage, output::human, review_comments, first_useful_action) pass, including the streamed-vs-full equivalence test over 97 mixed-class seams.
  • agent_stub_compiles, check_dead_end_routes, printed_command_paste, cli_smoke pass, except pilot_accepts_python_project_without_ripr_config, which fails locally with "git diff failed" (sandbox git environment, unrelated).
  • Independent fresh-context review: no blocking findings; its budget path-length risk was fixed by root normalization. Devin and Graphite findings answered on their threads.

Follow-ups in #13673: JSON fact dedupe (json-terse activation aliases, prepared); brief verification hoist after #13426.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UNUoLW1d2oqthhETQ8w8yG

@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 self-assigned this Nov 8, 2026
@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 31 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: 04e91a36-cc02-492a-bb13-6d9bd96eb31e
Commits

Reviewing files that changed from the base of the PR and between 66784c9 and fd7b52f.

Files selected for processing: 8

  • changelog.d/13673-agent-output-repeats.md
  • crates/ripr/src/app/agent_brief.rs
  • crates/ripr/src/app/agent_brief/bounded.rs
  • crates/ripr/src/output/human/triage.rs
  • crates/ripr/tests/cli_smoke.rs
  • crates/ripr/tests/cli_smoke/agent_output_budget.rs
  • docs/CLI_REFERENCE.md
  • docs/specs/RIPR-SPEC-0010-agent-working-set-brief.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

…ences (#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
@EffortlessSteven EffortlessSteven changed the title test(cli): pin agent-facing output byte budgets on a 5-gap diff perf(output): pin agent output byte budgets and cut two repeated blocks Nov 8, 2026
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 8, 2026 13:11
@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 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member Author

SOURCE_REVIEW_READY

Head: eb95c21adf08883005eb9b7537ff972b1702114e (conflict-free merge of main into reviewed be9f8e51a33109b50533c2bac70e90d87642a166).

Independent fresh-context review (subagent, no stake, read-only) inspected: warning consumers (review_comments, first_useful_action, MCP, LSP, schemas: no parser of these sentences; single-seam fixtures unchanged), full vs streamed brief selector equivalence (both feed grouped_omission_warnings in ordinal order; existing 97-seam mixed-class streamed test passes), Hidden-block stub template (TEST_ID is bare under shell_arg and the PowerShell variant; ambiguous branch untouched; no golden has a Hidden SeamStub row), plural grammar, and budget robustness. One non-blocking finding (budget depended on checkout path length) was fixed by normalizing the root to <root> before measuring.

Local proof: cargo xtask precommit pass; focused lib tests 692 pass; agent_stub_compiles, check_dead_end_routes, printed_command_paste, cli_smoke pass except an unrelated sandbox git-environment failure in pilot_accepts_python_project_without_ripr_config. Hosted qualification pending.


Generated by Claude Code

@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 3 potential issues.

Devin Review

Comment thread crates/ripr/src/app/agent_brief.rs Resolved
Comment thread crates/ripr/src/output/human/triage.rs Resolved
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

ripr static exposure check

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

#ripr agent static-advisory base=66784c9c200670145175d513e1fc4680ef63b787 findings=52 gaps=0 infection_unknown=1 static_unknown=20 weakly_exposed=31
open=a static limit leaves reach unconfirmed, but a related test asserts too weakly to notice the change; not a confirmed gap, and tests may still help
weakly_exposed|crates/ripr/src/output/human/triage.rs:626|let mut stub_template: Option<String> = None;|missing=-|test=t1|id=probe:crates_ripr_src_output_human_triage.rs:return_value:2fefb3a8
weakly_exposed|crates/ripr/src/output/human/triage.rs:664|row.push_str(&format!(" Test id: {seam_id}\n"))|missing=-|test=t1|id=probe:crates_ripr_src_output_human_triage.rs:call_deletion:57c83113
weakly_exposed|crates/ripr/src/output/human/triage.rs:665|Some(navigation.stub_seam_command("TEST_ID"))|missing=-|test=t1|id=probe:crates_ripr_src_output_human_triage.rs:return_value:3e82cc96
weakly_exposed|crates/ripr/src/output/human/triage.rs:684|out.push_str(" Write a test for a listed row, replacing TEST_ID with its Test id…|missing=-|test=t1|id=probe:crates_ripr_src_output_human_triage.rs:call_deletion:18ef6275
weakly_exposed|crates/ripr/src/output/human/triage.rs:685|out.push_str(&format!(" {command}\n"))|missing=-|test=t1|id=probe:crates_ripr_src_output_human_triage.rs:call_deletion:f51e6e2d
t1=crates/ripr/src/output/human/triage.rs:2782 scope_missing_names_the_probed_base_candidate_when_base_is_head relational_check `if !out.contains("pass `--base base-candidate`") { return Err(format!( "safe nex…` miss=weak_assertion
+1 more open findings not shown; `--format json` lists all
limits=infection_unknown:1,static_unknown:20,weakly_exposed:31
next=ripr explain --root /home/runner/work/ripr-swarm/ripr-swarm/head --base 66784c9c200670145175d513e1fc4680ef63b787 --committed --mode draft --format agent probe:crates_ripr_src_output_human_triage.rs:return_value:2fefb3a8

Took 339s.

…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

Copy link
Copy Markdown
Member Author

SOURCE_REVIEW_READY

Head 7134902e473eccb190b2751d53082c7fc9071665. Production code is unchanged from the independently reviewed be9f8e51; this head adds the RIPR-SPEC-0010 grouped-warning wording, a changelog fragment and output-shape assertions in the budget test, answering all three Devin threads (resolved). Local: budget test, check-changelog-fragments, check-spec-format, check-traceability, check-local-context, check-user-text, fmt pass.


Generated by Claude Code

@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 for head 7134902

Independent fresh-context review covered warning consumers (review_comments, first_useful_action, MCP, LSP, schemas), full vs streamed brief selector equivalence, the Hidden-block TEST_ID template under shell_arg and PowerShell, plural grammar and budget robustness. The path-length finding was repaired by root normalization. Devin's three findings (spec wording, changelog, shape assertions) were repaired in this head and their threads resolved. Local focused tests, precommit and policy checks pass.


Generated by Claude Code

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 7134902e), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

…-4vccto

# Conflicts:
#	crates/ripr/src/output/human/triage.rs

@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 for head 006c9f8

This head merges main into the reviewed 7134902. The only conflict was in triage.rs, where main added a collapse for identical consecutive Hidden rows. The resolution keeps both changes: rows are built into the per-row buffer, which now carries the Test id line instead of the full stub command, and the shared TEST_ID template is emitted once after the rows. Local: budget test (shape assertions plus 3,635 / 82,413 / 3,063 B against 3,900 / 88,000 / 3,300) and 420 focused lib tests (triage, output::human, agent_brief) pass.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

The Rust gates run on 006c9f8 failed at check-fixture-contracts. The failure is in fixtures/module_reach_control_qualified, whose SPEC.md declared weakly_exposed while check.json said exposed. That was a main-side break introduced by #13668, and this PR doesn't touch that fixture. Main fixed it in #13773. 9ab6297 merges current main to pick up that fix, with no conflicts and no changes to this PR's files.


Generated by Claude Code

@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 for head 9ab6297

This head is a conflict-free merge of current main into the reviewed 006c9f8. It brings in the #13773 fixture SPEC fix and leaves this PR's own files unchanged.


Generated by Claude Code

#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

Copy link
Copy Markdown
Member Author

The Rust-only feature lane on 9ab6297 failed cli_reference_matches_the_binary: docs/CLI_REFERENCE.md was stale. That's a main-side break, not this PR. #13718 added --json to ripr repair and ripr continue without regenerating the reference, and I found no open fix PR. I reproduced it locally on 9ab6297, regenerated the page with RIPR_BLESS_CLI_REFERENCE=1 cargo test -p ripr --test cli_reference_doc (2 passed), and pushed the result as 94bc6a3. The change is limited to docs/CLI_REFERENCE.md.


Generated by Claude Code

@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 for head 94bc6a3

Since the reviewed 9ab6297, the only change is docs/CLI_REFERENCE.md, which was regenerated from the binary by the repository's bless command to repair the main-side break from #13718. The local cli_reference_doc test passes. The earlier source and oracle review of the Hidden template, grouped brief warnings and budget test carries over unchanged.


Generated by Claude Code

#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

Copy link
Copy Markdown
Member Author

The Rust-only feature lane on 94bc6a3 failed cli_reference_matches_the_binary again. This time the cause is a different main-side break: #13667 added ripr completions without regenerating docs/CLI_REFERENCE.md, so main 59ad478 is stale even after #13778. I merged main in (0d7ad52), regenerated the page with the bless command (2 passed locally), and pushed it as fd7b52f. The change is limited to docs/CLI_REFERENCE.md: the new completions row and section.


Generated by Claude Code

@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 for head fd7b52f

Since 94bc6a3, this head adds a merge of main (59ad478, no conflicts) and a docs/CLI_REFERENCE.md regeneration for the ripr completions command from #13667, produced by the repository's bless command. The local cli_reference_doc test passes. The earlier source and oracle review of the Hidden template, grouped brief warnings and budget test carries over unchanged.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

FYI: #13812 reblesses docs/CLI_REFERENCE.md on main for ripr completions (#13667). Its hunk is byte-for-byte the same as the one this PR carries. Once #13812 lands and you merge main in, your copy becomes a no-op, so you can drop it or let it merge away. Any help text that this PR itself changes still needs its own rebless.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 5d5951b into main Nov 8, 2026
73 of 74 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-4vccto branch November 8, 2026 18:18
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