Repository navigation
feat(bench): run the task suite offline and score it by exit code - #579
Open
arminazimi wants to merge 1 commit into
Open
arminazimi wants to merge 1 commit into
arminazimi wants to merge 1 commit into
Conversation
tools/bench-run.mjs builds each task's workspace from planning/bench/tasks.json in a temp dir, runs every criterion through the real built CLI as an argv array, applies the task's scripted reference edit, and re-runs the gates so the verdict stays the documented exit code alone. --json is deterministic (no timestamps, no temp paths, workspace-relative locations) for CI diffing, a red gate prints the findings still open at its --fail-on level, and a workspace hash proves no CLI run rewrote the site. Exposed as npm run bench:run and deliberately kept out of npm run check: a benchmark is a measurement, not a gate. (#102)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #102
Stacked on #571 (
feat(bench): 10 agent benchmark tasks) — this runner consumesplanning/bench/tasks.jsonandtools/bench-tasks.mjsexactly as that PR defines them.What changed
tools/bench-run.mjs— the runner. For each task inplanning/bench/tasks.jsonit builds that task's workspace in its own temp directory (task.start→<workspace>/site, every seed to<workspace>/<file>), runs each criterion through the real built CLI as an argv array with no shell (it importsrunCriterionfromtools/bench-tasks.mjsrather than re-implementing the contract), applies the task's scripted reference edit, re-runs the criteria, and prints a per-task score plus a summary line. The verdict is still the documented exit code alone: 0 clean at--fail-on, 1 findings at or above it, 2 usage, 4 crash.npm run bench:run— one script line inpackage.json. Deliberately not wired intonpm run check: a benchmark is a measurement, not a gate.--json— the same report, deterministic: fixed key order, task-file order, workspace-relative locations, no timestamps, no temp paths, so CI can diff it.--task <id>scores one task;--listprints the plan (argv and expected exit per criterion) without running the CLI.--fail-onlevel, with check id, file, line and fix hint — so a red task is actionable, not just a number.fix --dry-runpreview (exit code and suggested-edit count) on the solved workspace, which keeps the "reports and suggests" boundary visible in the score..seaworthy/run record changed. Seaworthy never rewrites the user's site, so the fix step is the runner's scripted edit inside the temp dir — never the CLI's.tools/bench-run.test.mjs— 8 tests through the repo'stools/*.test.mjsconvention (matchingtools/bench-tasks.test.mjs, notpackages/verify/tests): a fixture that satisfies its criteria scores pass; a deliberately broken fixture scores fail and names its unresolved findings; a scripted reference edit turns a red gate green; a reference edit that no longer fits the fixture throws instead of passing silently; a task with no reference solution is reported unsolved with a reason; the plan and summary counts tie totasks.json; two--jsonruns are byte-identical and leak no local paths or timestamps; the task file is unchanged after scoring.changelog.d/102.added.md.Why these files
packages/verifyowns the engine and the CLI; the benchmark is repo tooling that consumes built output, so it lives intools/beside the validator it follows, and it imports that validator's helpers so #101's workspace contract has exactly one definition. The scripted reference edits live in the runner becauseplanning/bench/tasks.jsonis #101's file and is read-only here; keying them by task id means a new task without an edit is reported, never skipped silently.What you will not find here
planning/bench/README.md— nothing in feat(bench): 10 agent benchmark tasks with exit-code-decided success criteria and a live validator #571's data was loosened to make the score look good, and all 10 tasks score solved on their own criteria.registry.tsregeneration was needed..github/workflows/.verifywrites its run record to<workspace>/.seaworthy/history/, so scoring a workspace is not byte-pure and the runner exempts that path by name — a--no-history/history-outside-root option would be cleaner; andfix --dry-runcurrently suggests scripted edits for only a few checks (2 forfix-image-alternatives, 0 for the rest), so the preview column mostly reports zero even where findings remain.Commands I ran
Real score output of
npm run bench:run:Merge note
This PR stacks on PR #571 (
feat(bench): 10 agent benchmark tasks, branch tip00d73a7). It readsplanning/bench/tasks.jsonand importstools/bench-tasks.mjs, both added there, so it must merge after #571 — do not merge it intomainfirst, and do not rebase it ontomain. Once #571 lands, this branch fast-forwards to it;npm run checkhere already exercises #571's validator throughnpm test.Plan comment: #102 (comment)