feat: add benchmark reporting command (task 0031) #32
Reference in New Issue
Block a user
Delete Branch "task-0031-bench-report-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements
.claude/tasks/0031-bench-report-cli.md.Summary
Adds the maintainer-facing
bench:reportcommand — the reporting counterpart tobench:run— giving the aggregator seam from task 0030 a runnable entry point.runReportCommandopens the sample store, drains it withreadAllSamples, aggregates against the scored suite and bonus definitions, and printsrenderReport(...)to stdout.It renders whatever has accumulated, annotating incomplete coverage (unrun arms show an em dash) rather than blocking on a complete matrix — no aggregation, weighting, or rendering is reimplemented in the command.
parseReportArgsis the pure argument seam.bench/report.tsmirrorsbench/run.ts(samemain/ direct-execution guard /usagehelper /Parsed…union shape), and abench:reportnpm script (tsx bench/report.ts) sits alongsidebench:run.Deviations from the plan
runReportCommandis deterministic and covered by real unit tests over a temp-dir store (populated, empty,--help), on top of the parser tests. It was still run end-to-end (npm run bench:report). The unuseddepsparameter is kept only for signature parity with the command family.--self-review/--no-self-review, beyond the written(--store, --help)seam.aggregateneeds asuiteandbonus, andbuildScoredSuite/buildBonusTasksare parameterized byselfReviewPermitted.bench:runresolves this by probing the live host; the offline report has no host to probe, so the flag makes the choice explicit (defaulttrue) instead of silently hardcoding one variant. It is well-scoped — the scored coverage is identical either way, so it only selects the bonus capability catalog — and is documented in--helpand the README. Criterion 5's wording was updated to record it.DEFAULT_STORE_ROOTmoved tostore.tsas the single source of truth (both commands need it) and re-exported fromrun.tsso its existing importers are unchanged.Full bench tier green (104 tests), typecheck clean.
Review
Three-axis
/review-uncommitted.Risk
Overall: Low
Standards — unaddressed findings
parseReportArgsflag loop partly overlapsparseRunArgs(judgement call, Duplicated Code). Left unextracted: the two have genuinely diverged (the report parser adds--no-boolean negation), so a shared parser would be premature generality — the reviewer's own recommendation.Spec — unaddressed findings
--self-reviewexceeding the written seam) was addressed by recording the decision in the task's Implementation Notes and updating the criterion wording; the reviewer judged the flag justified in substance.