Repository navigation
feat(xtask): token-cost scoreboard for check output formats - #13261
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
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 12 minutes. View limit details
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY head=133882bd7b91b14ec8318f2a1bd8dc9dcc764130 scope: xtask-only additive token-cost scoreboard; reviewed diff (command/catalog/dispatch wiring, additive FixtureCheckFormat variants with exhaustive match updated, producer formats json-compact/sarif verified in crates/ripr/src/output/format.rs, null denominators disclosed for human formats). Proof: cargo test -p xtask token_cost 2 passed; clippy exit 0; live run wrote 10 measured rows. Inherited check-command-catalog failure reproduces on clean main and is owned by #13246. No findings.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
ripr static exposure checkCommit Took 29s. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Summary
cargo xtask token-cost: an advisory scoreboard that renders the dogfood fixtures (boundary_gap,weak_error_oracle) through the realripr checkbinary in json, json-compact, sarif, human, and human-full formats, and records exact stdout bytes, finding/result counts, and bytes-per-finding per (fixture, format) row totarget/ripr/reports/token-cost.{json,md}.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
Source-of-truth Links
Proposal: none (advisory repo-ops measurement, modeled on
bench-agent-surfaces)Spec: none new; grain and definitions are documented in the module header of
xtask/src/reports/token_cost.rsADR: none
Plan item: token-efficiency measurement lane (scoreboards/evals improvement)
Governing issue or accepted claim: No single issue; accepted claim is the session goal of measuring and providing token-efficient feedback. Related but distinct: #12902 cohort token accounting (per-agent A/B), which this does not duplicate — this measures per-format output bytes.
Acceptance delta (one sentence): A reviewer can run one command and see exact bytes and bytes-per-finding for every
ripr checkoutput format on the dogfood fixtures.Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
feat/token-cost-scoreboardStack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none. Searched all-state PRs for
token-costbefore publishing; nearest work (#13051, #13071, #13228, #13259) is cohort A/B token accounting, a different claim.Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): n/a
Scope
cargo xtask token-costcommand (command enum, parser, help list, command catalog, dispatch).FixtureCheckFormatvariants (JsonCompact,Sarif) so the fixture runner can request the existing CLI--format json-compact/--format sarifproducers. Existing consumers (goldens, dogfood) use only Json/Human/HumanFull and are unchanged; the exhaustive match is updated in place.Scope Classification
This PR is scoped by:
Production delta:
riprproduct binary. xtask-only.Evidence/support delta:
Single acceptance criterion:
cargo xtask token-costexits 0 and writes 10 rows (2 fixtures x 5 formats) with measured bytes, and the unit tests pass.Non-goals:
check-command-catalogfailure on main (duplicatecheck-fastregistration); that is owned by fix(xtask): reconcile duplicate check-fast registrations (#13241) #13246 / fix(xtask): reconcile duplicate check-fast registrations after parallel landings #13241 and reproduces identically on clean main at the base SHA.Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
Policy Impact
Ledger or exception notes:
Proof
Result, failures, or skipped proof:
Measured at candidate head (Windows, dev profile):
Observation recorded, not claimed as a defect: on
weak_error_oracle, SARIF renders 1 result where JSON renders 2 findings. The scoreboard exposes the discrepancy; reconciling it is separate work.Claim Boundary
What may be claimed after this PR? What must not be claimed yet?
Rollback
How can this PR be reverted safely?
Spec-Test-Code Traceability
xtask/src/reports/token_cost.rs(grain, byte definition, denominator rules)reports::token_cost::tests(2 unit tests)xtask/src/reports/token_cost.rs, wiring inxtask/src/command.rs,xtask/src/dispatch.rs,xtask/src/reports/mod.rs,xtask/src/reports/fixtures.rstarget/ripr/reports/token-cost.{json,md}(schematoken-cost-v1)Static Language Check
killed,survived,untested,proven, andadequate.