Skip to content

docs(run-log): freeze run log v1 schema and prove --report json byte-stable - #105

Merged
AetherAI3 merged 3 commits into
mainfrom
claude/nano10-runlog
Nov 8, 2026
Merged

AetherAI3 merged 3 commits into
mainfrom
claude/nano10-runlog

Conversation

@AetherAI3

Copy link
Copy Markdown
Owner

nano replay --report json is now a documented, versioned contract: run log v1.

  • docs/run-log.md + docs/run-log.schema.json (JSON Schema 2020-12, closed objects): every member; the 14 VM events with informative detail formats; byte rules (indent 2, emitter key order, ASCII escaping, shortest round-trip float repr, single LF); the timestamp rule (bar times from the input frame only — never the wall clock, in a run or a replay); emission ordering (not timestamp order); versioning (no in-band field; absence of runLogVersion means v1); and an explicit mapping onto the run receipt, which stays the canonical artifact.
  • Golden run logs for three library strategies plus a fixture strategy that reaches every replay-path event (intents, agent and non-agent escalations, warm-up, risk suppression, routes, infer.skipped). Tests reproduce them byte for byte in process, twice in a row, with clocks replaced by absurd values, and in subprocesses under foreign hash seeds, time zones and locales. Goldens validate against the schema (17 negative controls); their arrays equal the receipt's run arrays. A drift guard keeps the VM's event set, the schema and the doc in step.
  • Fix: on Windows the JSON report was printed through the text console and came out CRLF-framed, so the same run produced different bytes per platform (reproduced first: 252/252 line feeds preceded by \r). It now goes through the byte stream like the receipt. No member, value or order changed; POSIX output is unchanged.
  • docs/receipts.md now points at the run log contract instead of calling the report unversioned.

No to_dict shape or runtime error text changed (nano package test fixtures unaffected). Mutation checks: sort_keys, compact separators, an injected wall clock, reverting to text output and set-ordered effects each make the new tests fail.

Local: full suite 3490 passed / 20 skipped / 0 failed (Windows, CPython 3.13); focused run-log/docs/receipt tests 164 passed.

Closes #10.

🤖 Generated with Claude Code

AetherAI3 and others added 3 commits November 8, 2026 06:58
`nano replay --report json` printed through the console's text wrapper,
which rewrites each LF to CRLF on Windows, so the same run produced
different bytes per platform. The report now leaves through Console.emit,
like the receipt, via a single encode_run_log() helper. Field names,
order, indent and float formatting are unchanged; POSIX output is
byte-identical to before.

Adds encoding pins (line terminator, key order, float repr, wide and
negative integers, ASCII escaping) and the run_log fixture inputs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Documents `nano replay --report json` as run log v1: every member, the
event vocabulary, byte rules (indent, key order, ASCII, float repr, LF),
the bar-time-only timestamp rule for run and replay, emission ordering,
versioning policy (no in-band version field; absence of runLogVersion
means v1), and how it maps onto the run receipt, which stays the
canonical artifact.

Adds docs/run-log.schema.json (closed objects, open event set) and
golden run logs for three library strategies plus one fixture strategy
reaching every replay-path event. Tests reproduce the goldens in-process,
twice, with the wall clock replaced, and in subprocesses under foreign
hash seeds, time zones and locales; validate them against the schema with
negative controls; check the arrays equal the receipt's run arrays; and
keep the documented event list equal to the VM emitters.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
receipts.md still called `nano replay --report json` an unversioned
convenience with no stability promise. It now has its own run log v1
contract; say so, while keeping the receipt independent of it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AetherAI3
AetherAI3 merged commit ece0010 into main Nov 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the run-log JSON schema and prove it byte-stable

1 participant