Repository navigation
init --agents: skip DETAIL only when missing= is one code value; rows count extra facts (#14298) - #14536
Conversation
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
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
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. View limit details
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…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
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY for head 5679fb2
Inspected:
- The full diff.
gap_line. It counts distinct missing discriminator values and adds(+N more)only whenwith_missingis set. All five callers were checked: thefinish_stoprow and the preview row keepmissing=-.- That nothing parses the row's
missing=except the eval harness. LSP, MCP and JSON read structuredmissing_discriminators. Existing exact-row tests are single-fact. - The guidance line in both
init --agentsblocks and the AGENT_QUICKSTART copy. The block is 39 of 40 lines. - RIPR-SPEC-0009 wording and the traceability entry.
needs_detailandreads_as_sentencecases taken from real producers.
Local evidence:
- xtask
agent_evaltests: 9 pass. - ripr lib
output::human::agent_tests: 66 pass. - Eval compare: no regressions.
cargo fmt --checkis clean.cargo xtask precommitexit 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
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
left a comment
There was a problem hiding this comment.
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_linenow counts distinct discriminator values with a plain loop instead of a map/collect chain. The chain sent ripr's own PR-evidencescoped_checkpast 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
|
Shard 3 failed on a29ee1f in Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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_fieldstill ends withverify=refusedafter the reference test. changed_constant_returncloses, since #14380 (#14325).error_variantreadsextra_gaps: 0, since #14453 folded its duplicate rows.struct_fieldhas 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
|
Done in 2021ec1. The README's Baseline bullets now match
Generated by Claude Code |
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.
|
The classifier prerequisite has landed: #14706 merged as |
|
I measured this PR merged with current main, which includes #14706 (d507d60), at head 43e8afa. I used a freshly built ripr and ran
Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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::agentandcli::commands::init_agents: 89 pass. cargo xtask agent-eval --compareshows 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
|
|
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzT55kRrCq6nHnQYZHf
EffortlessSteven
left a comment
There was a problem hiding this comment.
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::agentandcli::commands::init_agents: 90 pass. - xtask
agent_eval: 9 pass. cargo fmt --checkpasses.
The earlier review stands.
Generated by Claude Code
|
For the existing owner: 43704115541 passed hosted qualification for the current reviewed head |
|
Review-provenance checkpoint for the existing owner at current head 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 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 |
|
Independent exact-head review of It looked at the PR's own diff against current main and at the changes since
This was a read of the code and the diffs. The tests were not rerun as part of it. No blocking findings. It checked:
Non-blocking notes. I'm leaving these for a follow-up because a push now would drop the queued entry:
Separately, Generated by Claude Code |
Summary
init --agentsDETAIL step (explain, then context) cost about 4.9 times as much.init --agentsguidance (crates/ripr/src/cli/commands/init_agents.rs, both blocks) anddocs/AGENT_QUICKSTART.mdnow say to skip DETAIL only when a row'smissing=is one code value (e.g.missing=total == 100), and to follow it for-, a sentence, a clipped…value or(+N more).missing=with(+N more)when a gap has further distinct missing discriminator values, so the skip can't hide a second fact. This is producer-owned ingap_line.cli-agent-looproute models the rule (needs_detail,reads_as_sentence, escaped\|handling). Loop cost fell from 8,731 to 2,619 estimated tokens over the six scenarios on the same base, with the same answers. On current main (with mcp: brief ripr_get_gap text carries the gap's test-author facts (#14327) #14727'smcp-briefroute) it is 2,594, which the baseline records. struct_field no longer closes the loop since fix(classify): a predicate that sets one field of a returned record is not credited by another field's assertion (#14562) #14565 (genuine value until rust: a bare assert! on a bool field of the owner's returned record grades weak, so the struct_field reference test cannot close the loop #14701).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
Proof
cargo test -p xtask --bin xtask agent_eval: 9 passed. The cases come from real producers:if x > 5, field initverbose: flag == "-v" || ..., casts,a == b;(+1 more)and…rows.cargo test -p ripr --lib -- output::human::agent cli::commands::init_agents: 90 passed on a91a861. They includegap_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-baselineafter merging main (mcp: brief ripr_get_gap text carries the gap's test-author facts (#14327) #14727 addedmcp-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:
finding.missingprose 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_linesent 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 localripr check --base origin/maintakes 361s.Source review: REVIEW_READY a91a861
https://claude.ai/code/session_01YVdGzT55kRrCq6nHnQYZHf