Skip to content

init --agents: skip DETAIL only when missing= is one code value; rows count extra facts (#14298) - #14536

Merged
EffortlessSteven merged 16 commits into
mainfrom
claude/project-thread-j0817y
Nov 16, 2026
Merged

EffortlessSteven merged 16 commits into
mainfrom
claude/project-thread-j0817y

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Source-of-truth Links

Spec: docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md
Governing issue or accepted claim: #14298
Acceptance delta (one sentence): The init --agents loop skips the explain/context step only for gap rows whose missing= is one complete code value, rows mark further missing facts with (+N more), and the agent eval baseline records the lower loop cost with every keyed answer still reached.

Scope Classification

  • One public contract (init --agents guidance and the agent gap row's missing= field)

Proof

  • cargo test -p xtask --bin xtask agent_eval: 9 passed. The cases come from real producers:

    • code: guard if x > 5, field init verbose: flag == "-v" || ..., casts, a == b;
    • prose: "non-zero discount", "a discount", "Syntax-first analysis ...";
    • plus the (+1 more) and … rows.
  • cargo test -p ripr --lib -- output::human::agent cli::commands::init_agents: 90 passed on a91a861. They include gap_row_counts_missing_facts_beyond_the_first, which covers two values, a repeated value with two reasons and a single value.

  • Baseline written on a91a861's tree with --write-baseline after merging main (mcp: brief ripr_get_gap text carries the gap's test-author facts (#14327) #14727 added mcp-brief; the merge kept that route and this PR's loop figures). A rerun from the clean commit changed only the version string.

  • cargo xtask precommit (CARGO_BUILD_JOBS=1, debuginfo off): exit 0 on c6243bd.

  • Independent subagent reviews of both rounds:

    • round 1 suggested treating guard values as code, which is applied;
    • round 2 suggested counting distinct values, which is applied, and flagged that finding.missing prose lines aren't counted. That is intentional: they are generic labels, and the spec says the count covers discriminator values.
  • PR-evidence timeout on 5679fb2: a map/collect chain in gap_line sent ripr's self-check past its budget (perf(check): one filter/map/collect chain in a loop sends ripr's self-check past the 3600s PR-evidence ceiling #13884). It is now a loop, and a local ripr check --base origin/main takes 361s.

Source review: REVIEW_READY a91a861

https://claude.ai/code/session_01YVdGzT55kRrCq6nHnQYZHf

The agent eval showed the FIND step already carries every keyed answer, and
the explain/context steps the loop prescribed cost about 4.9 times as much.
The loop route now follows DETAIL only for rows without an exact check, and
the baseline moves from about 8,700 to 2,619 estimated loop tokens with the
same answers. The README now says bytes are measured after root
normalization.

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

coderabbitai Bot commented Nov 12, 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 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 146 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: 89c62aaa-dd1b-4bb6-9f94-3d80b8b24dcd
Commits

Reviewing files that changed from the base of the PR and between fc00142 and a91a861.

Files selected for processing: 10

  • .ripr/traceability.toml
  • benchmarks/agent_eval/README.md
  • benchmarks/agent_eval/baseline.json
  • changelog.d/14298-agent-detail-optional.md
  • crates/ripr/src/cli/commands/init_agents.rs
  • crates/ripr/src/output/human/agent.rs
  • crates/ripr/src/output/human/agent_tests.rs
  • docs/AGENT_QUICKSTART.md
  • docs/specs/RIPR-SPEC-0009-defaults-first-adoption.md
  • xtask/src/reports/agent_eval.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 12, 2026 23:01

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

Inspected: the full diff; both init --agents guidance blocks and the quickstart copy (kept equal by the existing unit test, block at 39 of 40 lines); needs_detail and reads_as_sentence against the real missing= producers in analysis/classify (code values such as left == right, variants, if <cond> guards, field inits) and the prose producers in decision.rs, boundary_pairing.rs, operand_pin.rs, mask_pin.rs and ripr-contract; escaped | handling against the agent renderer's field(); the eval compare before the rebaseline (no regressions) and the rewritten baseline on the merged tree. An independent subagent review reported no blocking findings; its guard-value suggestion is applied.


Generated by Claude Code

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request optimizes the ripr init --agents loop by skipping the DETAIL step (ripr explain and ripr context) when a gap row's missing= field contains code rather than prose or -. This change significantly reduces estimated token usage by approximately 70% across agent-eval scenarios. Feedback on the implementation highlights a limitation in the reads_as_sentence heuristic, which incorrectly classifies prose starting with single-letter words (such as 'a' or 'i') as code. It is recommended to refine this heuristic to allow common English single-letter words and to add corresponding test cases to ensure robust classification.

Comment thread xtask/src/reports/agent_eval.rs Resolved
Comment thread xtask/src/reports/agent_eval.rs Resolved
@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 3 potential issues.

Devin Review

Comment thread benchmarks/agent_eval/README.md Resolved
…value

A gap with several missing discriminator facts showed only the first in
missing=, so the new DETAIL skip could hide the rest. The row now ends
missing= with (+N more) and the loop guidance follows DETAIL for that and
for clipped values. The adoption spec states the rule.

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

@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 5679fb2

Inspected:

  • The full diff.
  • gap_line. It counts distinct missing discriminator values and adds (+N more) only when with_missing is set. All five callers were checked: the finish_stop row and the preview row keep missing=-.
  • That nothing parses the row's missing= except the eval harness. LSP, MCP and JSON read structured missing_discriminators. Existing exact-row tests are single-fact.
  • The guidance line in both init --agents blocks and the AGENT_QUICKSTART copy. The block is 39 of 40 lines.
  • RIPR-SPEC-0009 wording and the traceability entry.
  • needs_detail and reads_as_sentence cases taken from real producers.

Local evidence:

  • xtask agent_eval tests: 9 pass.
  • ripr lib output::human::agent_tests: 66 pass.
  • Eval compare: no regressions.
  • cargo fmt --check is clean.
  • cargo xtask precommit exit 0 on c6243bd. The rerun on this head was interrupted twice by container restarts during the covered_by lib build, so hosted gates supply that dimension.

Two independent subagent reviews' points are applied. All bot threads are answered and resolved.


Generated by Claude Code

@EffortlessSteven EffortlessSteven changed the title init --agents: skip DETAIL when missing= already names the exact check (#14298) init --agents: skip DETAIL only when missing= is one code value; rows count extra facts (#14298) Nov 13, 2026
A map/collect chain in gap_line sent ripr's own PR-evidence check past
its one-hour budget; the same logic as a loop analyzes in about 5 min.

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

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

Changes since the previous readiness review on 5679fb2:

  • A merge of current main. It touches only traceability, and that merged cleanly.
  • gap_line now counts distinct discriminator values with a plain loop instead of a map/collect chain. The chain sent ripr's own PR-evidence scoped_check past 3600s on the hosted gates, and past 900s locally on that file alone. That is #13884; the reproduction is posted there.

Behavior is unchanged. ripr lib output::human::agent_tests passes (66), including gap_row_counts_missing_facts_beyond_the_first, and cargo fmt --check is clean. A local ripr check --base origin/main --format agent on the merged tree finishes in 361s with exit 0. The rest of the earlier source review stands.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Shard 3 failed on a29ee1f in xtask::developer_provisioning::cloud_provisioning_handles_pin_updates_and_failure_boundaries. The failing step is TAP subtest 39, "Given a deadline and TERM-resistant descendants, nativeRun returns after the owned group is terminal", and it failed on both of nextest's attempts. That is a process-timing check in the provisioning script. This PR doesn't touch provisioning: its diff is the agent row renderer, init guidance, docs and the eval harness. The same test at the same head passes locally (60.7s). Once the gates job on this run finishes, I'll request one fresh qualification run.


Generated by Claude Code

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Enqueued by campaign heartbeat at 2026-11-13T07:56Z: exact head a29ee1f has SOURCE_REVIEW_READY at that head, all required checks green (latest run 04:58Z), zero unresolved review threads, mergeable CLEAN, base main f5f65dd. Queue position 97 at enqueue.

@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
VERDICT: APPROVE a29ee1f — no blocking findings on this head.

Inspected the complete diff at this head: the distinct-value loop in gap_line, needs_detail and reads_as_sentence in xtask/src/reports/agent_eval.rs, both init --agents blocks, docs/AGENT_QUICKSTART.md, RIPR-SPEC-0009, the traceability entry and the rebaselined eval baseline.

The skip rule is conservative. A row whose missing= is a dash, prose, a clipped value or (+N more) keeps the explain/context step, and an unknown selector does too, so a misread costs an extra DETAIL pair rather than hiding a fact. Escaped \| is restored before the field split. The (+N more) count is over distinct values, so a second reason for the same value adds nothing. The renderer test covers two values, a repeated value and one value; the eval test pins code, prose, clipped and counted rows.

Baseline arithmetic matches the claim: 8,731 loop tokens before the rule, 2,523 after the #14453 fold, with all six keyed answers reached. On this head the shard-3 run at 03:50Z failed one control, xtask::developer_provisioning cloud_provisioning_handles_pin_updates_and_failure_boundaries (descendant liveness in tools/provision-dev.test.cjs, outside this diff); the later run at 04:58Z is green, so current required checks pass.

Limits: I did not rerun the 66 library tests, the 9 xtask tests or the eval; that evidence rests on the source review at this head. reads_as_sentence models the guidance for token accounting, and the shipped instruction is prose that a model applies, so its judgment can differ either way.

No review thread is open on this PR.

@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
VERDICT: APPROVE a29ee1f

Inspected the complete diff at this head: the distinct-value loop in gap_line, needs_detail and reads_as_sentence in xtask/src/reports/agent_eval.rs, both init --agents blocks, docs/AGENT_QUICKSTART.md, RIPR-SPEC-0009, the traceability entry and the rebaselined eval baseline.

The skip rule is conservative. A row whose missing= is a dash, prose, a clipped value or (+N more) keeps the explain/context step, and an unknown selector does too, so a misread costs an extra DETAIL pair rather than hiding a fact. Escaped \| is restored before the field split. The (+N more) count is over distinct values, so a second reason for the same value adds nothing. The renderer test covers two values, a repeated value and one value; the eval test pins code, prose, clipped and counted rows.

Baseline arithmetic matches the claim: 8,731 loop tokens before the rule, 2,523 after the #14453 fold, with all six keyed answers reached. On this head the shard-3 run at 03:50Z failed one control, xtask::developer_provisioning cloud_provisioning_handles_pin_updates_and_failure_boundaries (descendant liveness in tools/provision-dev.test.cjs, outside this diff); the later run at 04:58Z is green, so current required checks pass.

Limits: I did not rerun the 66 library tests, the 9 xtask tests or the eval; that evidence rests on the source review at this head. reads_as_sentence models the guidance for token accounting, and the shipped instruction is prose that a model applies, so its judgment can differ either way.

No review thread is open on this PR.

@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 2021ec1

The only change since 4209da9 is a README-only reconcile in benchmarks/agent_eval/README.md. The Baseline section's current-tense claims now match the checked-in baseline.json at this head:

  • Only struct_field still ends with verify=refused after the reference test.
  • changed_constant_return closes, since #14380 (#14325).
  • error_variant reads extra_gaps: 0, since #14453 folded its duplicate rows.
  • struct_field has one extra gap.

I checked these against the eval report generated on the 4209da9 tree. No code or baseline changed, and the earlier review and proof stand.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Done in 2021ec1. The README's Baseline bullets now match baseline.json at this head:


Generated by Claude Code

EffortlessSteven added a commit that referenced this pull request Nov 15, 2026
The previous repair made an APPROVE-led explanation neutral, which still
scored the house marker line as non-positive and, through the negative scan,
vetoed heads that quote it. The Orchestrator's ruling is the leading token:

- APPROVE plus an optional 7-40 hex head SHA, then end-of-line or a separator
  (em dash, en dash, hyphen, comma, semicolon, colon, full stop), then
  commentary is positive. The house form
  `VERDICT: APPROVE <sha> — no blocking findings on this head.` is positive.
- `APPROVE / BLOCK` refuses because `/` is not a separator.
- Every value that is not APPROVE-led keeps the closed grammar's negative
  reading, so BLOCK, ABSTAIN, MAYBE, empty and mixed values still do not
  attest.

Self-test and the admission suite add the house form, the quoted-narration
case and the contradiction controls. Queue sweep at this head: 43 entries,
0 refusals under both main's script and this one, so no queued head is newly
refused; #14536 and #14650 now carry later ready markers at their current
heads, so their older blocks are stale.

Copy link
Copy Markdown
Member Author

The classifier prerequisite has landed: #14706 merged as d507d607deee586d1af7616ce5b8a8cd2fd807c8. The owner's replay reports struct_field.reference_test_closes_loop=true after the actual changed-field assertion; the old false remains accurate for this PR’s already-tested 2021ec1d subject, not for the new composition. Existing owner: before refreshing the baseline, measure a fresh executable on the selected candidate+main tree and record closure, extra gaps, keyed answers and token totals separately. Preserve the sibling-field negative; don't infer zero noise from closure. Check measured inclusive_range deltas separately because #14529 also landed, and keep the #14702 brief refresh with its existing owner rather than sweeping unrelated deltas into this PR. No CI request or queue change.

Copy link
Copy Markdown
Member Author

I measured this PR merged with current main, which includes #14706 (d507d60), at head 43e8afa. I used a freshly built ripr and ran cargo xtask agent-eval --compare against the checked-in baseline. It reported no change, so I did not refresh the baseline. Here are the results separately:

inclusive_range and the #14702 brief refresh are outside this PR. That scenario lands with the harder-scenarios follow-up, and the brief belongs to its owner.


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 43e8afa

The only change since 2021ec1 is a merge of current main, which includes #14706. It auto-merged in agent.rs and agent_tests.rs with no conflict markers.

Checked on this tree with a freshly built ripr:

  • ripr lib output::human::agent and cli::commands::init_agents: 89 pass.
  • cargo xtask agent-eval --compare shows no change against the checked-in baseline, so the baseline stays as it is. The measured values are in the PR conversation.

The earlier review stands.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 43e8afa8), so GitHub creates no test-merge ref and no qualification run can start. 1. Merge main into the branch and resolve the conflicts. 2. Remove and re-apply merge-ready to request admission and qualification only. 3. After qualification is green, enqueue the PR through the native queue route; re-applying the label does not enqueue it.

Keeps the mcp-brief route from #14727 and the rebaselined loop figures.

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

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

The changes since 43e8afa are a merge of current main (fc00142, including #14727) and a version-string update to the baseline.

The merge overlapped only in benchmarks/agent_eval/README.md and baseline.json. The README keeps this PR's loop and extra-gap notes and adds the mcp-brief note with figures from this tree: 35,267 tokens, against 51,875 on mcp. The baseline was rewritten with --write-baseline from a binary built on this tree, so it now holds the mcp-brief rows. Loop cost is 2,594 and every route reaches its answers; struct_field reads as before.

Checked on this tree:

  • ripr lib output::human::agent and cli::commands::init_agents: 90 pass.
  • xtask agent_eval: 9 pass.
  • cargo fmt --check passes.

The earlier review stands.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

For the existing owner: 43704115541 passed hosted qualification for the current reviewed head a91a86152316ddff43534c890a664a80e4db9b41; GitHub reports it mergeable, but I couldn't verify a current native-queue receipt. Please check queue status before any new request, then carry the bounded routing change through the protected route if still eligible. Keep the full struct_field closure question with #14713/#14726; the recorded false case should not be treated as fixed by this PR. No CI retry or queue action taken here.

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 15, 2026

Copy link
Copy Markdown
Member Author

Review-provenance checkpoint for the existing owner at current head a91a86152316ddff43534c890a664a80e4db9b41: the native queue receipt is now present (2026-11-15 23:37:33Z), and qualification run 43704115541 is green. These are separate from independent source review.

I checked all published review submissions, PR conversation comments and inline review threads. The only published current-head readiness receipt is the owning Claude session's 10:26:35Z review describing its merge/rebaseline and local tests. The later independently identifiable substantive reviews cover predecessor ca835d6ab38341d420df3c7f7c4aea94d75c88f1, before the baseline correction and subsequent merges. I could not establish an independent exact-head receipt for a91a8615 from the available evidence; this is a provenance gap, not a claim that no unpublished review occurred or a new code defect.

The missing handoff is a link to an existing independent receipt covering this exact head, or independent review of this successor before merge. The corrected false struct_field closure and separate closure/noise acceptance remain intact. Existing owner custody is unchanged; no queue removal/re-entry, CI rerun, formal approval or competing implementation was performed.

Copy link
Copy Markdown
Member Author

Independent exact-head review of a91a86152316ddff43534c890a664a80e4db9b41, run by a fresh subagent that did not write this candidate.

It looked at the PR's own diff against current main and at the changes since ca835d6a:

  • the baseline correction;
  • the fc001420 merge resolution in benchmarks/agent_eval/README.md and baseline.json.

This was a read of the code and the diffs. The tests were not rerun as part of it.

No blocking findings. It checked:

  • gap_line's (+N more) count. The suffix is added only when with_missing, and it comes after clip. A clipped row with more values ends … (+N more), and DETAIL is still followed for it.
  • needs_detail matching. It uses an exact |id=<selector> suffix and handles escaped \|. An unknown selector or empty args fall back to following DETAIL.
  • The merge resolution. There are no conflict markers. The README figures match baseline.json: mcp-brief 35,267, mcp 51,875, loop 2,594. Per scenario, struct_field is reference_test_closes_loop: false with extra_gaps: 1, error_variant is extra_gaps: 0, and changed_constant_return closes.
  • Wording. The DETAIL text is the same in both init_agents.rs blocks, AGENT_QUICKSTART.md and SPEC-0009, and none of the old text is left.
  • Test grip. Each of these regressions would trip an assertion:
    • dropping the count;
    • an off-by-one;
    • counting repeated values;
    • removing the more) check or the … check.

Non-blocking notes. I'm leaving these for a follow-up because a push now would drop the queued entry:

  • reads_as_sentence is a heuristic. A one-word or snake_case prose missing= would read as code. The only producer that could emit one is the finding.missing.first() fallback, and the cases found there are multi-word.
  • The README's intermediate figure (2,619, same-base before/after) sits next to the 2,594 recorded on current main. Both are labelled, but one number would read more cleanly.
  • No unit test asserts that route_cli_agent_loop applies needs_detail. Only the baseline numbers cover that.

Separately, struct_field's false closure is still tracked under #14713 and #14726. This PR records it and does not claim to fix it.


Generated by Claude Code

Merged via the queue into main with commit 3cb4211 Nov 16, 2026
21 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-j0817y branch November 16, 2026 06:40
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