Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions loopx/canary/module_metric_baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion tests/control_plane/test_inbox_read_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading