agent-orchestrator/backend/internal
Pritom14 67f42150b4 fix(terminal): make creackPTY.Close idempotent to avoid shutdown deadlock
The session run loop closes the PTY after copyOut returns, and session.close
(via Manager.Close) closes the same PTY again. creackPTY.Close called cmd.Wait
each time, and a second concurrent Wait on the same process blocks forever, so
daemon shutdown deadlocked whenever a terminal was still attached. fakePTY is
idempotent via sync.Once, so the unit suite never exercised this; a real tmux
attach surfaced it.

Guard close+kill+wait with a sync.Once so Wait runs exactly once. Add a
regression test that double-closes a real PTY under a watchdog.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 20:46:12 +05:30
..
adapters refactor(tracker): address code-review findings 2026-05-30 22:32:45 +05:30
cdc feat(storage,cdc): minimal 6-table schema + trigger-driven CDC (storage layer) 2026-05-31 05:42:59 +05:30
config docs(config): drop stale CDC-JSONL mention in resolveDataDir 2026-05-31 07:18:22 +05:30
domain Merge pull request #37 from aoagents/feat/sqlite-storage-cdc 2026-05-31 17:13:00 +05:30
httpd feat(httpd): mount terminal-streaming WebSocket at /mux 2026-05-31 19:23:35 +05:30
lifecycle feat(backend): atomic PR-observation write + CDC on check status updates 2026-05-31 17:02:47 +05:30
observe/reaper feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
ports Merge pull request #37 from aoagents/feat/sqlite-storage-cdc 2026-05-31 17:13:00 +05:30
runfile feat(backend): HTTP daemon skeleton (Phase 1a) — #10 (#14) 2026-05-29 10:02:53 +05:30
session feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
storage/sqlite feat(backend): atomic PR-observation write + CDC on check status updates 2026-05-31 17:02:47 +05:30
terminal fix(terminal): make creackPTY.Close idempotent to avoid shutdown deadlock 2026-05-31 20:46:12 +05:30