fix: make T2 reads sim-time deterministic - #176
Conversation
Carry the completed read park's simulation timestamp through the scan dialogue and select the earliest buffered wrist frame strictly after it. Reset clears pending and buffered frames, and unstamped frames fail closed. Replace the invalid single-seed T2 success assertion with a live wrong-object safety gate; CON-5 layer (d) leaves success acceptance to the committed 25-episode curve. IDs: CON-5, TC-2. Closes #153.
Pre-landing review (
|
Spec concern
Issue #153 — T2 scan/read scheduling and the invalid single-episode success gate.
The read park now carries its completed
sim_time_nsthroughmove_done -> read_request. The label reader buffers timestamped wristframes and selects the earliest frame strictly after that barrier in either
request/frame arrival order. Stale or unstamped frames cannot consume a
barriered request, and reset clears both the request and frame buffer.
The live T2 graph test is now the safety/integration smoke the baseline can
actually support: it rejects
wrong_objectwhile leaving success-rateacceptance to the committed 25-episode curve. CON-5 layer (d) explicitly
classifies full-episode outcomes as statistical; the measured expert T2
baseline is 2/25, so a one-seed success assertion was not a valid gate.
Closes #153.
Requirement IDs implemented or affected
Gates run
uv run ruff format --check .uv run ruff check .uv run pytest -m unit— 1064 passed, 79 deselecteduv run pytest -q tests/graph/test_expert_graph.py::test_expert_t2_episode_closes_without_wrong_object -s— 1 passeduv run python tools/trace_check.py— ok, no uncovered or unknown citationsThe first diagnostic live run reproduced the issue's honest statistical
failure: it read and promoted cetirizine, completed a grasp/place attempt,
then timed out during an in-context retry. The corrected safety gate passed
on the subsequent live run.
ADRs added (if any)
None. CON-5 layer (d) already governs the acceptance interpretation.