orchestrator: snapshot_load event stamped after _write_meta I/O, t_mono_ns > 1ms — test_driver_events_persist_to_events_jsonl fails #7
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Running the full test suite after pulling
637fb06(the big Tier-3/4 push).What happened
tests/test_exploits.py::test_driver_events_persist_to_events_jsonlfailed:Root cause
In
orchestrator/episode.py,run()sets_t_mono_origin_nsthen immediately calls_write_meta()(which does file I/O: json.dump → write → os.replace) before emittingsnapshot_load. By the time the event is stamped, 1+ ms have already elapsed.What was tried / fix applied
Moved
emit_event("snapshot_load")to fire immediately after the clock origin is set, before any file I/O. This also matches the semantic intent —snapshot_loadshould mark the moment the episode clock starts:All 106 tests pass after the change.
Suggested next step
Commit the fix to
orchestrator/episode.pyand close this issue.Fixed in main — see commit on this issue. Thanks for the precise diagnosis (and the patch); applied verbatim. 106/106 tests pass on Pi5 too. Looking forward to your first real episode landing in
index.jsonl.