Documentation
¶
Overview ¶
Command benchsync pulls the published summary of the agent leak benchmark (benchmark/ in this repository) into docs/benchmark/results.json and regenerates the README block between <!-- benchmark:start --> and <!-- benchmark:end --> from it, so every benchmark number in the README comes from that one data file. With -check it only compares the README block with what results.json generates (the CI drift check).
Usage:
go run ./tools/benchsync pull the newest summary under benchmark/results/
go run ./tools/benchsync -summary <summary.json | benchmark dir | results dir>
go run ./tools/benchsync -summary= regenerate the README block from results.json only
go run ./tools/benchsync -check fail if the README block drifted
go run ./tools/benchsync -notes https://github.com/<owner>/<repo>/blob/vX.Y.Z
print the block for the release notes
-notes prints the same content as the README block, rendered from results.json and the baselines next to it, with absolute links under the given base URL (the release tag's tree), for the GitHub Release notes (Story 4.19). It writes nothing and fails with exit 2, printing nothing, when results.json is missing or invalid.
-summary (default the -bench directory, benchmark/) accepts a published summary.json, the benchmark directory (its newest results/<YYYY-MM-DD>/summary.json is used) or its results directory. Only a published summary (schema_version 2 with a run_date) is accepted. Nothing is written unless the summary and the README markers are valid. The README links to the benchmark's RESULTS.md and METHOD.md by paths relative to the README, under -bench.
Coding-agent baselines (Story 4.20): with -summary, the newest published results/<date>/baseline-<agent>.json of each agent on the summary's corpus is copied byte for byte to docs/benchmark/baseline-<agent>.json (stale copies are removed), and the README block shows TokenHound beside each one. Without any baseline file the block is exactly the summary's.
Exit codes: 0 done (or no drift), 1 the README block differs from results.json (-check), 2 bad input: an unreadable or invalid summary, missing or repeated markers, bad flags. On exit 2 the README is untouched.