Repository navigation
test(agent): pin whole-journey byte budget (#13673) - #13898
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review (head 6b5f604)
1 blocking finding: the PR body is missing the required Governing issue or accepted claim: and Acceptance delta markers (and most other template sections), and the repo's own pre-merge description check fails on it. The test code has no blocking defect; one medium test-claim mismatch on Windows and three low notes below.
Evidence basis: read the full 3-file diff (changelog.d/13673-agent-journey-budget.md, crates/ripr/tests/cli_smoke.rs +3, crates/ripr/tests/cli_smoke/agent_journey_budget.rs +211), the surrounding head sources cited below, the PR body, gh pr checks output, and the one existing review on this exact head (coderabbitai[bot], 2026-11-08T22:30:33Z, treated as leads, not as review-of-record). Nothing was executed locally; every claim below is source-read at this head SHA except where explicitly marked as pending or hypothesis.
Verified
- The
verify=last-line contract is real at head:crates/ripr/src/output/human/agent.rs:21— "The last line is alwaysverify=complete|...orverify=refused|...|reason=" — andrender()pushes it after every bounded section (agent.rs:68). The new assertion (agent_journey_budget.rs:173-177) checks exactly that contract. - The
|id=parse matches the renderer's shape: agent.rs:12 "Shape (one record per line,|-separated fields, no legend)" and agent.rs:16 example ending|id=probe:.... Probe selectors are accepted by bothexplain(positional) andcontext --atper existing head tests (crates/ripr/tests/cli_smoke.rs:3398and3438-3453at head). - The cold == steady claim is supported by source: the legend marker only exists for the human format —
crates/ripr/src/cli/commands/check.rs:2206let legend_marker = matches!(format, OutputFormat::Human)— and agent.rs:1 calls the agent format "legend-free". The test would still discriminate a legend regression: the ~ten-line legend (check.rs:2203) added to agent output would push the cold receipt past its 1400-byte ceiling. --quietsuppresses the progress stream and artifact-ignore notes, not the report (check.rs:1667-1671), so the receipts measure stdout as documented.- Module registration matches sibling convention:
#[cfg(feature = "lang-rust")]with the alphabetical slot beforeagent_output_budget(crates/ripr/tests/cli_smoke.rs:14-18at head). The changelog entry matches convention:<!-- section: Internal / CI -->is an existing section and the filename follows<issue>-<slug>.md. - Helper signatures match usage:
run_command(cli_smoke.rs:266 at head) andunique_external_workspace(cli_smoke.rs:828 at head,Result<PathBuf, String>, converts intoBox<dyn Error>). The fixture construction is copied from the provenagent_output_budget.rssibling, and@@ -1,5 +1,5 @@is a valid hunk for the 5-line BASE. - Semantic owner check: this PR adds evidence only, no production delta, no parallel validator — the budget pins existing renderer contracts owned by
output::human::agentandagent::loop_commands. That fits the repo's spec -> test ordering for the #13673 claim.
Findings
-
PR body (blocking, merge gate): required markers absent. The body says "Extends #13674 single-surface budgets ... under #13673" and "Refs #13673", but neither the literal
Governing issue or accepted claim:norAcceptance deltaappears anywhere in it. The repo's own pre-merge description check fails on exactly this — review 5819957339: "Failed pre-merge checks: Description check: Complete the empty or unchecked template sections", enumerating the boundary option, candidate relationships (#13674, draft #13873), scope classification, the proof command block, rollback, traceability, static-language boxes, and CI economics. Fix: complete the body template, including those two markers verbatim, before requesting merge convergence. -
crates/ripr/tests/cli_smoke/agent_journey_budget.rs:65-66 (medium): the
<root>normalization silently does nothing on Windows. The test replaces the lossy project path —let root = project.to_string_lossy().into_owned(); ... .replace(&root, "<root>")— butunique_external_workspacecanonicalizes (workspace_root().canonicalize(), cli_smoke.rs:829-830 at head), which yields a verbatim\\?\D:\...spelling on Windows, while ripr prints the bound root folded:root_path_display->root_path_text_for_hostdoestext.replace('\\', "/")plus the verbatim fold (crates/ripr/src/agent/loop_commands.rs:73-84). Everynext=navigation line (bound viabound_root, loop_commands.rs:63; rendered byrender_next_action_plain_at_root,crates/ripr/src/output/next_action.rs:110-114) and the context packet's command template (crates/ripr/src/app/context.rs:294-295) therefore carry aC:/...form that never matches the replaced needle. Consequences: the module doc claim at agent_journey_budget.rs:7-8 "Bytes are UTF-8 stdout bytes with the root replaced by<root>" and the body's "Bytes are UTF-8 stdout bytes with root normalized to " are both false on Windows, and the receipts become checkout-path-length dependent there — exactly the dependency the sibling says budgets must avoid (agent_output_budget.rs:61-62: "Measure with the absolute root replaced by a fixed token, so the budget does not depend on how long the checkout path is"). The 1169 -> 1400 headroom probably still absorbs a runner path, so this likely passes the gate — but the test cannot notice its own normalization failing, which is the failure mode a byte budget exists to police. Fix: build the needle with the existingprinted_pathhelper (cli_smoke.rs:814 at head) instead of rawto_string_lossy(), or replace both spellings with the same placeholder. -
crates/ripr/tests/cli_smoke/agent_journey_budget.rs:189-198 (low): the dup metric is wider than its label. The comment says "exact lines repeated across steps", but the loop also counts repeats inside a single output and counts every extra occurrence (
dup_bytes += line.len() + 1). The error direction is safe — it overcounts, tightening the budget — so this is a naming/measurement mismatch, not a hole. Fix: dedupe within each step first, or rename the metric to repeated line occurrences. -
crates/ripr/tests/cli_smoke/agent_journey_budget.rs:183 (low): receipt label contradicts its own comment.
receipt("check cold (with legend)", &cold, 1_400)labels a surface that, per the comment three lines up (179-182) and check.rs:2206, prints no legend in agent format. Rename tocheck coldso future receipt readers are not sent hunting a legend that never prints. -
crates/ripr/tests/cli_smoke/agent_journey_budget.rs:173 (low):
unwrap_or_default()turns empty stdout into a misleading message. Ifverifywere empty, the assertion would blame the missingverify=record rather than the empty output. The exit-status assert inrun(lines 58-64) makes this unlikely; asserting the output is nonempty first keeps the failure message honest. -
Observation (hypothesis, not established by execution): the recorded inherited Windows failure may share finding 2's root cause. The body records: "agent_output_budget::agent_facing_outputs_stay_inside_their_byte_budgets fails on clean origin/main ab93e28 on Windows (check default human 4055 B over 3900 B ceiling)". The sibling uses the same verbatim-needle replace (
agent_output_budget.rs:63-64), and human-format output embeds the folded root inNext:/drill-in lines with Windows console quoting (render_next_action_human_at_root, next_action.rs:97-108; head helperhost_quoted, cli_smoke.rs:3186 at head). Missed replacements leave checkout-path text in the counted bytes, a plausible chunk of the 155-byte overage. Worth checking under whichever owner picks up that failure before the ceiling moves — raising it to absorb unnormalized path bytes would bake the defect in. Recording it here as a lead for that owner; the PR correctly declines to fix it in scope.
Residuals
- The gate matrix for this head was still pending/in-progress at review time (
gh pr checks: windows-gate-run, ub-review, Python package source contract, and build and inspect Linux x64 wheel all pending; the Rust test lanes skipped on the draft). No check outcome is claimed from this review, and the new test was not executed locally. - The ceilings/receipts (1169/1169/577/4984/1169, journey total 7899, dup 2168 vs 3000) come from the body's 2026-11-08 Windows measurement; I did not independently reproduce the byte counts.
6b5f604 to
2f6cd74
Compare
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Sibling-failure quantification for its owner (read-only analysis, no code touched here): the failing \�gent_output_budget\ human output (4055 B vs 3900 ceiling on Windows) embeds the folded \H:/...\ root 7 times at 66 chars each. Normalizing those 7 occurrences to <root>\ saves 420 B, landing at 3635 B - inside the ceiling with headroom. The 155-byte overage is fully explained by unnormalized checkout-path text (same defect class repaired in this PR's new test via |
|
SOURCE_REVIEW_READY (self-review COMMENT with explicit disposition; not a counted approval) Head reviewed: 2f6cd74 (rebased onto origin/main 7d73d7b). Scope: test-only (new cli_smoke agent_journey_budget.rs, 3-line module registration, changelog entry). No src/ change. Verified at this head: normalize_root replaces both raw canonical and printed_path spellings (CodeRabbit + prior finding 2 repaired); dup metric counts cross-step repeats only (finding 3); receipt label and empty-stdout guard fixed (findings 4-5); module docs + PR body state the scripted-sequence boundary (no agent/token-saving claim). Local proof: cargo fmt --check pass; cargo test -p ripr --test cli_smoke agent_journey 2 passed on Windows (cold 1336/1400, steady 1336/1400, explain 527/800, context 4862/6000, verify 1336/1400, dup 1449/3000). CodeRabbit thread resolved; no other open threads; no REQUEST_CHANGES. Residuals (not blocking): check-step headroom is 64 B after main movement since ab93e28 (includes #13443 staged-evidence rows) - the budget doing its job; inherited agent_output_budget 4055/3900 Windows failure is recorded with path-noise quantification (420 B over 7 unnormalized occurrences) and owned separately - ceiling must not be raised. Hosted Small Result qualification still to run on this head. Disposition: READY for merge-ready qualification; merge subject to green required checks and final integration judgment. |
|
SOURCE_REVIEW_READY |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Head 2f6cd74 on base 7d73d7b. Test-only scope, no src change. All prior exact-head findings repaired and locally proven green. CodeRabbit thread resolved, no change requests, no other open threads. Ready for Small Result qualification; merge subject to green checks and final integration judgment.
ripr static exposure checkCommit Took 40s. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Head 934a991 on base 7d73d7b. Test-only scope, no src change. Repairs all prior findings: both-spelling normalization with host-independent fold test, cross-step dup metric, scripted-sequence claims, nonempty verify guard, gaps=4 header plus four distinct IDs pinned on cold/steady/verify. Local proof green: fmt pass, 3 journey tests pass, receipts inside ceilings. All review threads resolved, no change requests. Ready for Small Result qualification; merge subject to green checks and final integration judgment.
There was a problem hiding this comment.
Parked follow-ups
- The known agent_output_budget sibling failure should remain a parked follow-up rather than broadening this test-only PR.
- The local normalization helper is sufficient for this PR, while sharing it with the sibling test remains separate follow-up work.
Evidence gaps
- No completed cargo-test receipt for the reviewed head is available; scheduling is not execution evidence, so the local Windows byte receipts remain author-reported rather than independently reproduced by this lane.
- Model proof intent was rejected by deterministic validation.
- The exact-HEAD focused runtime outcome is not evidenced by the supplied sensor receipts.
- The claimed byte-budget behavior lacks completed exact-head runtime evidence in this packet.
934a991 to
4b5cf1e
Compare
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Head 4b5cf1e on base 28b102c. Test-only scope, no src change. Rebased past the inherited main-health failure that refused the prior Small run (duplicate owner_opt_outs in human.rs at the merge subject; my diff never touches that file; main fix 4dc969d incorporated). All findings repaired and locally green on this head: fmt pass, 3 journey tests pass, receipts inside ceilings. All threads resolved, no change requests. Ready for Small Result qualification; merge subject to green checks and final integration judgment.
Native-group admission checkpoint (2026-11-14 UTC)Unchanged PR head In run 43630102016, Admit PR Candidate, the candidate-admission and release-cut self-tests passed, then the exact-candidate admission action logged Required Result 132555112987 failed at 19:06:39. Rust gates and test jobs were skipped, so this run establishes neither a candidate test failure nor successful qualification. The PR timeline records removal from the merge queue at 19:14:34. This is a factual evidence handoff only. Existing ownership, source-review limits and qualification holds remain unchanged. No branch, CI or queue action has been taken for this checkpoint; historical head evidence does not qualify a future group. |
|
Fresh native-queue failure receipt for the existing owner: run 43630102016, composed G Existing owner should reconcile current exact-head review/checks and queue membership, then use normal protected queue recovery if still eligible and absent. Do not re-bless fixtures or alter source based on this failure. I have not rerun CI or changed queue membership; successor groups, including #14529, are already running and should not be disturbed. |
|
Queue recovery: re-enqueued after a route-defect ejection (campaign orchestrator, 2026-11-14T19:26Z). Head The merge_group run 43630102016 (19:04Z) ejected this PR with Action: re-enqueued through the native merge queue (position 49). No code change, no label change, no restack. If the next merge_group run ejects it again with |
|
Failure-attribution correction to the recovery disposition: re-admission at 19:25:37 is verified; no further queue action is requested. For run 43630102016 specifically, admission job 132554786586 did identify this constituent: |
|
Review record update for head 0a04997: scratch-fixture lifecycle repair. The journey test's external workspace now returns the existing parent-module DeclaredHunkScratch guard armed inside workspace() before population, so setup failures, assertion panics and the success path all remove the sibling fixture directory. Local proof on Windows: cargo test -p ripr --test cli_smoke agent_journey 3 passed with 0 ripr-agent-journey-budget-* directories before and after; a deliberate failure control (ceiling forced to 1 byte, test failed as expected) also left 0 directories. Sibling pre-existing leaks in agent_output_budget.rs and legend_first_run.rs are follow-up scope, not this candidate. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Head 0a04997
Scope and proof for this head are in the linked conversation review record.
EffortlessSteven
left a comment
There was a problem hiding this comment.
VERDICT: APPROVE 0a04997 — no blocking findings on this head.
Delta since my APPROVE at 0563edc3: one test-only commit, 0a0499776e "test(agent): clean up journey budget fixture on drop (#13673)", 1 file, +5/−4 in crates/ripr/tests/cli_smoke/agent_journey_budget.rs.
workspace()now returns(PathBuf, DeclaredHunkScratch)and arms the guard immediately afterunique_external_workspace, beforecreate_dir_all, so a failed assertion or an early?still removes the fixture.- The single caller binds
_cleanup(not_), so the guard lives to the end of the test; the tuple destructuring is the only call site. DeclaredHunkScratchis the existing parent-module guard (Drop→ignore_remove_dir_all, which ignores a missing path), so a double remove is harmless.- No production code, no test assertion, and no receipt value changed.
Admission is green at this head (Admit PR Candidate completed 21:12:57Z). The hosted Rust gates (Ripr Rust Small on GitHub Hosted / Rust gates and the four test shards) were still pending when this review was written; that qualification is not yet observed on this head. Static review only: no build, no test run, no checkout.
|
Exact-head qualification checkpoint for H |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Re-attestation at 0a0499776e6d0f72bd65880b849b794c60157777, unchanged head. My 21:26:56Z VERDICT: APPROVE review at this head displaced the 21:09:45Z marker, and Ripr Rust Small Result (run 43641553694) then failed at 21:47:56Z on source review attestation refused. This review restores the attestation; the judgement is the same one, not a new one.
Evidence at this head:
Admit PR Candidatepass, 21s.Ripr Rust Small on GitHub Hosted / Rust gatespass, 34m30s; all four test shards pass (19m20s, 18m13s, 20m9s, 20m36s);Rust test shards verifypass.vscode surface,CodeRabbit,GitGuardian,Graphitepass.- The only red is
Ripr Rust Small Result, and its annotation is the attestation refusal above, not a test or build failure.
Source delta since 0563edc3 is the single test-only commit 0a0499776e in crates/ripr/tests/cli_smoke/agent_journey_budget.rs: workspace() returns (PathBuf, DeclaredHunkScratch) and arms the guard before create_dir_all; the one caller binds _cleanup; DeclaredHunkScratch is the existing parent-module Drop guard over ignore_remove_dir_all, which ignores a missing path. No production code, no assertion, no receipt value changed.
Static review plus the hosted gate results above. No local build or test run; no checkout.
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Head 0a04997
Scope and proof for this head are in the linked conversation review record.
|
Final integration judgment on head 0a04997: REVIEW_READY. Hosted Ripr Rust Small Result SUCCESS on this head, all review threads resolved, no unresolved material findings, behind-only base movement needs no restack. Enqueuing in the native merge queue; landing is conditional on the queue merge-group qualification for the actual composition. |
Summary
Pins the whole scripted agent CLI journey (check cold + steady, one
explain --format agent, onecontextpacket, final verify-bearing check) inside byte budgets, plus a cross-step exact-duplicate redundancy budget. Test-only evidence package for #13673; no production delta. Repair of the CodeRabbit/EffortlessSteven Windows path-normalization finding is included: both the raw canonical and ripr's printed (folded/) project spellings now normalize to<root>, proven by a checkout-length-independence test.This is a deterministic output-budget instrument over a fixed fixture (five changed predicates yielding four agent gap records) with no test edit between the initial and final checks (final
verify=may becompleteorrefused). It must not be cited as observed agent token savings, provider billing, or a completed repair workflow.Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk fortrusted same-repo
riprwork. Confirm the change belongs here:dependency, or repo-ops development for
ripr-swarmsurface
If this PR moves crates.io publishing, VS Marketplace publishing, Open VSX
publishing, GitHub Release assets, signing, release environments, or release
secrets, close or retarget it. Those surfaces belong in
EffortlessMetrics/riprunless a dedicated release-boundary change has already been approved.
Source-of-truth Links
Proposal: n/a - test-only budget, no product proposal
Spec: n/a - no spec change; instrument for #13673 claim
ADR: n/a - no architecture decision
Plan item: #13673 journey-budget instrument (child of token-efficiency track)
Governing issue or accepted claim: #13673
Acceptance delta (one sentence): The scripted check-explain-context-verify CLI sequence stays inside per-step byte ceilings with both Windows path spellings normalized and cross-step duplication bounded.
Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication): perf/agent-journey-budget-13673
Stack parent or prerequisite PR (if any): none - merged origin/main 111c780 (2026-11-14 catch-up)
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): n/a - single candidate, no tournament
Related (not parents, no duplication): #13674 owns single-surface budgets (sibling); draft #13873 owns MCP discovery reduction (merged 2026-11-09, incorporated via rebase); #13846 owns JSON-terse dedup; #13426 owns changed-line ranges; #13367 owns conditional MCP reads. This PR adds no output reduction and duplicates none of them.
Scope
crates/ripr/tests/cli_smoke/agent_journey_budget.rs: normalize both root spellings, cross-step dup metric, scripted-sequence claims, nonempty-verify guard, checkout-length-independence proof test.crates/ripr/tests/cli_smoke.rs: module registration (unchanged by this repair).changelog.d/13673-agent-journey-budget.md: entry (unchanged by this repair).Scope Classification
This PR is scoped by:
Production delta:
src/change.Evidence/support delta:
<root>(CodeRabbit + EffortlessSteven finding 2 repaired, proven byjourney_root_normalization_erases_checkout_path_length).check cold (with legend)corrected tocheck cold(finding 4); empty-stdout guard added (finding 5).Single acceptance criterion:
cargo test -p ripr --test cli_smoke agent_journeypasses on Windows with per-step receipts inside ceilings and the normalization-invariance test green.Non-goals:
agent_output_budget4055/3900 Windows failure (separate owner; recorded below).Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
Policy Impact
Ledger or exception notes:
Proof
Result, failures, or skipped proof:
cargo fmt --check: pass (exit 0).cargo test -p ripr --test cli_smoke agent_journey -- --nocaptureon Windows, head 0563edc on origin/main 111c780: 3 passed. Receipts: check cold 1186 (ceiling 1400), check steady 1186 (1400), explain 543 (800), context packet 4975 (6000), final verify 1186 (1400); steady-total 7890 bytes, cross-step exact-duplicate lines >=24B 1187 bytes (budget 3000). Folded three-row workload pinned: header gaps=3 folded_gaps=1 plus three distinct gap IDs asserted on cold/steady/verify (five changed predicates yield four findings; fix(output): fold identical agent gap rows into one (#14338) #14453 folds the two identical age-line rows into one printed row, clamp/parse stay hidden on this compact surface). Catch-up merge of origin/main plus re-pin a0d671f and check-local-context fixture repair 0563edc; all review threads resolved.cargo test -p ripr --test cli_smoke agent_facing_outputs -- --nocapture: FAILS as inherited and recorded, not fixed here - check (default human) 4055 bytes over its 3900-byte ceiling on Windows. The failing output embeds the foldedH:/...root (e.g.ripr explain --root H:/Code/Muse/ripr-agent-output-budget-...), which the sibling's raw-onlyto_string_lossyreplace never folds - the same normalization defect class repaired in this PR's new test. Separate owner should apply the shared-helper normalization there; the ceiling must not be raised to absorb unnormalized path bytes.Claim Boundary
What may be claimed after this PR? What must not be claimed yet?
verify=may becompleteorrefused. The context packet (~60% of the steady total) is the largest single step but real-call frequency is unmeasured.Rollback
How can this PR be reverted safely?
git revertthe squash merge (test-only: one new test file, 3-line module registration, one changelog entry). No production, migration, config, or generated-artifact rollback. Reverting restores the unbudgeted journey (no product behavior change).Spec-Test-Code Traceability
crates/ripr/tests/cli_smoke/agent_journey_budget.rs-agent_journey_stays_inside_byte_budget_and_keeps_verify_record,journey_root_normalization_folds_both_windows_spellings,journey_root_normalization_erases_checkout_path_lengthoutput::human::agentrenderer andagent::loop_commandsroot display)killed/survivedlanguage used; unknown/provider scope explicitStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
Complete this section when the PR changes workflows, policy gates, branch
protection expectations, CI artifacts, report uploads, release checks, or the
cost/posture of existing lanes. Use
n/afor ordinary PRs that do not affectCI behavior.
cli_smoke agent_journey(~12s) used for shaping instead of the full matrixEngineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
cargo fmt --checkcargo check --workspace --all-targetscargo test --workspacecargo clippy --workspace --all-targets -- -D warningscargo doc --workspace --no-depscargo package -p ripr --listcargo publish -p ripr --dry-runcargo xtask check-static-languagecargo xtask check-doc-artifactscargo xtask check-support-tierscargo xtask check-no-panic-familycargo xtask check-allow-attributescargo xtask check-local-contextcargo xtask check-file-policycargo xtask check-covered-bycargo xtask check-executable-filescargo xtask check-workflowscargo xtask check-spec-formatcargo xtask check-spec-numberingcargo xtask check-fixture-contractscargo xtask check-generatedcargo xtask check-badge-diff-policycargo xtask check-generated-cleancargo xtask check-dependenciescargo xtask check-process-policycargo xtask check-network-policyExtension changes:
cd editors/vscode && npm cicd editors/vscode && npm run compilecd editors/vscode && npm run packageGates note: only
cargo fmt --checkand the focusedagent_journeytests are claimed locally above. Remaining gates are left unchecked for hosted qualification on the exact integration subject; the PR stays Draft until late qualification is requested and green.