feat: add benchmark run-loop command (task 0029) #30
Reference in New Issue
Block a user
Delete Branch "task-0029-bench-run-loop-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?
Task:
.claude/tasks/0029-bench-run-loop-cli.mdSummary
Adds the maintainer-facing command that runs one chosen benchmark cell on demand, so only the token budget available at that moment is spent.
runCells(bench/run-loop.ts) runs one(arm, task)cell for a batch of trials — defaulting to five with a reporting floor of three — by driving the existing single-cellrunCelland the append-only sample store rather than reimplementing orchestration.bench/run.tsis the command:parseRunArgsis the pure, unit-tested argument seam;runBenchCommandis the live boundary that resolves host access, probes self-review support to resolve the scored suite, selects the task, and drives the run loop. Invoked via the newbench:runnpm script undertsx.Deviations from the plan
tsxdevDependency +bench:runscript: node's native TS stripping doesn't rewrite.jsspecifiers to.ts, which the wholebench/tree relies on, so the command runs undertsx.peerDependency: documented but neither installed for package consumers nor pulled into CI'snpm ci; the maintainer installs it for live runs.--modelflag dropped after review (see below);bench/results/gitignored.Review
Risk
Overall: Medium
bench/; only shared touch ispackage.json/lockfile, and the new peer dep is optional so it can't break published-package installs.run-loop.tsand the pureparseRunArgsseam are well covered; the liverunBenchCommandboundary is deliberately validated by running, not mocked.--trialsburns budget against production credentials.Standards — unaddressed (judgement calls, left as-is)
5/3defaults: the trial default and reporting floor appear in ~6 prose/test copies. Left deliberately — the code constants (DEFAULT_TRIALS,REPORTING_FLOOR) are single-sourced; the prose and test copies are intentional (tests must not recompute expected values from source).arm+taskIdas a loose pair): aCelltype could exist. Left as-is — the store already accepts the{ arm, taskId }shape, and minting a suite-wideCelltype is broader than this slice warrants.RunCellInput; no new bundling needed.Spec — unaddressed
--turn-cap/--wall-clock-msare unrequested surface: kept deliberately. They are safe-defaulted bounds a maintainer may legitimately need to raise for a heavier task, and they do not affect cross-arm comparability (unlike--model, which was removed).