Documentation Index
Fetch the complete documentation index at: https://mintlify.com/neosigmaai/auto-harness/llms.txt
Use this file to discover all available pages before exploring further.
record.py appends one iteration result to workspace/results.tsv after a change has passed the gate and been committed. It enforces the file guard a second time — including an inspection of the most recent commit — so an agent that committed forbidden files before invoking record cannot slip through undetected. The script is typically called by the coding agent as the final step of each optimization iteration.
CLI usage
0 on success and 1 if the file guard rejects the call.
| Argument | Type | Description |
|---|---|---|
--val-score | float | Mean reward on the full test set from the most recent gate run |
--evals-passed | int | Number of eval suite tasks that passed |
--evals-total | int | Total number of eval suite tasks |
Output format
Each call appends one tab-separated row toworkspace/results.tsv. The file is created by prepare.py with the following header:
Auto-incremented iteration number, starting at
1. Iteration 0 is the baseline recorded by prepare.py.Mean reward on the full test set, formatted to 4 decimal places.
Git short hash of HEAD at the time
record was called, or "unknown" if git is unavailable.Number of eval suite tasks that passed the most recent gate run.
Total number of eval suite tasks evaluated.
ISO 8601 UTC timestamp with seconds precision (e.g.
2024-11-05T14:23:01+00:00).record
workspace/results.tsv. Runs the file guard before writing.
Mean reward on the full test set.
Number of eval suite tasks that passed.
Total number of eval suite tasks.
0 on success, 1 if the file guard rejects the call (violations are printed to stdout).
File guard behavior
record calls file_guard_violations(check_last_commit=True). This means it inspects:
- Files in the working tree that differ from HEAD.
- Untracked files not covered by
.gitignore. - Files changed in the most recent commit (HEAD vs HEAD~1).
ALLOWED_AGENT_FILES = {"agent/agent.py", "PROGRAM.md"} causes the function to print a detailed error message and return 1 without writing to results.tsv.
current_commit
git rev-parse --short HEAD as a string, or "unknown" if git is unavailable or the command fails.
next_iteration
workspace/results.tsv.
The header line (starting with "iteration") is excluded. Iteration 0 is the baseline row written by prepare.py.
Returns: An int equal to the number of existing data rows (i.e., the next iteration number to assign). Returns 1 if results.tsv does not exist.