Record / Write API (SSOT)
Goal
Atomic record/write API as the SSOT for rosetta-manifest.json + benchmark_results.json; the engine + verification write through it; the LLM never hand-edits either file.
Implementation Sketch
Scripts own every mechanical action; the LLM authors programs/tests and analyzes only. All mechanical work is a single python -m scripts.rosetta_test_runtime <subcommand> invocation directed by a work_item body line.
Work Items
- Implement
record.pyatomic writers (flock + tempfile + os.replace) forrosetta-manifest.jsonper-program entries (status, perf, binary_sizes, verification, bugs_filed, language_findings). - Implement the
benchmark_results.jsonwriter per_archive/00-overview.mdschema (checksum, ori_release_ms, cpp_ms, ratio, residual_rc_ops, last_run/current_run/delta, timestamp, commit); create the file if absent attests/run-pass/rosetta/benchmark_results.json. - Expose the record API via
api.py; pytest covers atomic write, schema shape, and concurrent-write safety.