diff --git a/loopx/canary/module_metric_baseline.json b/loopx/canary/module_metric_baseline.json index 93893d3e4d..8112dec08b 100644 --- a/loopx/canary/module_metric_baseline.json +++ b/loopx/canary/module_metric_baseline.json @@ -39,9 +39,6 @@ "any_count": 25, "dict_any_count": 0 }, - "loopx/chat_store.py": { - "lines": 2028 - }, "loopx/codex_cli_probe.py": { "any_count": 37, "dict_any_count": 0 diff --git a/tests/control_plane/test_inbox_read_recovery.py b/tests/control_plane/test_inbox_read_recovery.py index 2205055c41..80bc57e6d7 100644 --- a/tests/control_plane/test_inbox_read_recovery.py +++ b/tests/control_plane/test_inbox_read_recovery.py @@ -47,10 +47,15 @@ def test_interrupted_page_preserves_first_receipt_and_finishes_remaining_reads(t try: child.stdin.write(json.dumps(payload)) child.stdin.close() + # Interrupt between request transactions. A published receipt can + # precede lock retirement; killing there can leave a partial claim + # subject to the lock owner's separate stale-claim recovery grace. + first_lock = owner / "request-locks" / (items[0]["request_id"] + ".ts-effect.lock") deadline = time.monotonic() + 15 - while not first.exists() and child.poll() is None and time.monotonic() < deadline: + while (not first.exists() or first_lock.exists()) and child.poll() is None and time.monotonic() < deadline: time.sleep(0.02) assert first.exists(), child.stderr.read() if child.poll() is not None else "first read was not committed" + assert not first_lock.exists(), "first request transaction did not release its lock" assert not second.exists() committed = first.read_bytes() finally: