3 Commits

Author SHA1 Message Date
jeremy ce9487c7cc Fix stale paths in utility scripts 2026-03-27 12:38:23 -07:00
jeremy 6f4e52cd99 Unify self-dev sessions on shared server 2026-03-10 08:01:22 -07:00
jeremy ab2b10d896 Fix InterruptSignal race: create Notified future before flag check
The notified() method had a TOCTOU race: if fire() was called between
the is_set() check and the .notified().await call, notify_waiters()
would drop the notification (no waiters registered yet), causing the
caller to hang indefinitely.

Fix: create the Notified future before the flag check. This registers
as a waiter immediately, so any concurrent fire() / notify_waiters()
call will wake it correctly.

Race scenarios (all now handled):
  - fire() before notified() call: flag is set, fast path returns
  - fire() between is_set() and .await: future is registered, woken
  - fire() after .await: future is woken normally

This is the root cause of the intermittent selfdev reload hang.

Also adds:
  - 6 unit tests for InterruptSignal (src/agent.rs)
  - scripts/test_reload.py: 18-test suite for the full reload path
2026-03-09 11:36:27 -07:00