You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_uk_replay_memory fails about 1 run in 12: its private marker is digits #237
tests/test_uk_replay_memory.py::test_measured_run_samples_the_tree_and_keeps_only_aggregate_lines fails by chance. It checks that 777, the private tail FAKE_COMPUTE prints (line 532), never reaches json.dumps(result) (line 547). That result holds measured numbers, so any of them containing 777 fails the test. No private data leaks.
Twelve local runs of the test gave one failure with that assertion.
Forty direct calls to measure.measured_run gave three results containing 777. One held "_t": 99522.897772, the time.perf_counter() reading from pipeline/modal_uk_replay_memory.py:268.
Fix
Use a marker no measurement can contain, such as a non-numeric token, in both places. Keep it as the tail of the otherwise accepted line, so the test still proves the runner drops that tail. Confirm the test still fails when the tail leaks, and passes on repeated runs.
#234 changes tests/test_uk_replay_memory.py, so check it first.
A second cause feeds the first. In measured_run, {**phase, ...} copies _t into each recorded phase before phase.pop("_t") runs, so results keep the raw time.perf_counter() reading. docs/uk_replay/evidence/replay_memory.json on main has 191 lines with "_t". Dropping the field removes one source of chance matches, but byte counts and seconds can still contain 777, so the marker still needs changing.
Activity
MaxGhenis commentedon Oct 30, 2026
A second cause feeds the first. In
measured_run,{**phase, ...}copies_tinto each recorded phase beforephase.pop("_t")runs, so results keep the rawtime.perf_counter()reading.docs/uk_replay/evidence/replay_memory.jsonon main has 191 lines with"_t". Dropping the field removes one source of chance matches, but byte counts and seconds can still contain777, so the marker still needs changing.