You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codex runtime: stop the Flair task loop on shutdown #781
Found while triaging a CI failure on #759 (Docker Integration, run 42243604181). The failure was in review-trigger-loop.test.ts, whose warnings contained [testbot] Task loop catch-up read unavailable (ConnectionRefused). Those warnings came from the task loop that codex-presence-444.test.ts starts for testbot, still polling in the same Bun process.
runCodexRuntime (packages/cli/src/utils/codex-runtime.ts ~831) starts the Flair task loop and keeps no stop handle. shutdownHandler (~702) stops only the heartbeat before the final beat and exit(0).
What the fix does:
The runtime keeps the task loop's stop handle. The SIGINT/SIGTERM shutdown handler stops the task loop together with the heartbeat, before the final Presence beat. The startup-failure path stops it too.
codex-presence-444.test.ts asserts that no catch-up request reaches its fake server after the shutdown handler ran, so no loop outlives the test.
Activity