Low-Context Execution Packet

Use branch stage/d3-13-resilience-crucible.

Implement only the resilience design from D3-12. Do not change bridge protocol or frontend UX unless the D3-12 manifest explicitly requires a small compatibility hook.

Required drills:

  1. Ghost protocol:
    • trigger a 60-second mock task
    • simulate frontend disconnect at second 5
    • prove task completes at about second 60
    • prove result enters mailbox
  2. Mailbox recovery:
    • create three offline completions
    • simulate reconnect
    • prove exactly three messages flush
    • prove a second reconnect does not duplicate them
  3. Reaper:
    • spawn a deliberate infinite-loop or long sleep process
    • assign short TTL
    • prove reaper kills the whole process group
    • prove the log contains task ID, PID/process group, signal, and final state

Suggested tests:

tests/test_async_dispatch.py
tests/test_mailbox.py
tests/test_reaper.py
scripts/run_resilience_drills.py

Required logs:

/mnt/kitchen/collab/d3-tui/logs/d3-13/ghost-protocol.log
/mnt/kitchen/collab/d3-tui/logs/d3-13/mailbox-recovery.log
/mnt/kitchen/collab/d3-tui/logs/d3-13/reaper.log

Minimum acceptance command:

python -m pytest backend/hermes-membrane/tests
python backend/hermes-membrane/scripts/run_resilience_drills.py

docs/RESILIENCE_CRUCIBLE_REPORT.md must include failures encountered during iteration, the discarded approaches, and why the final approach was kept.