test-case: multi-process flock contention #44
Reference in New Issue
Block a user
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?
Steps
history.dir.luajit main.lua(aish boots, takes the flock).luajit main.lua(second boot attempt).Expected
[aish] memory disabled: memory.jsonl held by another aish process (Resource temporarily unavailable).:memory listin terminal B prints(no memory items)(or a similar status; the load reads via io.open which doesn't need the flock).:memory listactually CAN read memory.jsonl without holding the flock. So terminal B can READ but not WRITE.:remember Xin terminal B should fail withmemory unavailable.:quit). Now:memory injectin terminal B... still won't enable writes (terminal B's memory handle was never created). Closing + re-launching terminal B would now succeed.What this exercises
Likely failure modes
if m then ... else renderer.status(...) endin repl.lua startup.renderer.status("memory disabled: ...")actually fires.:rememberstill fails forever (no auto-reacquire) → that's by design v1; document if surprising.PASS (autonomous run, 2026-05-13). Process A held a memory.jsonl flock via a fifo-driven background luajit. Process B's startup status:
[aish] memory disabled: memory.jsonl held by another aish process (Resource temporarily unavailable). Process B continued functioning (:memory listreturned cleanly, no crash). R-B1 single-writer enforcement works as designed. Closing.