Skip to content

fix: close detached broker and worker lifecycles#518

Draft
Cob-AI wants to merge 1 commit into
openai:mainfrom
Cob-AI:codex/fix-broker-test-teardown
Draft

fix: close detached broker and worker lifecycles#518
Cob-AI wants to merge 1 commit into
openai:mainfrom
Cob-AI:codex/fix-broker-test-teardown

Conversation

@Cob-AI

@Cob-AI Cob-AI commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • authenticate broker shutdown before process exit and preserve mismatched live endpoints
  • verify broker and worker process ownership with per-launch tokens before signalling
  • serialize state updates, commit session cleanup against fresh state, and fail closed on stale locks
  • close detached workers and brokers from tests and session cleanup without deleting diagnostic state on failure

Verification

  • npm test (109 passed)
  • npm run build
  • npm run check-version
  • git diff --check
  • focused lifecycle, state, and process tests (23 passed)
  • focused broker and worker runtime tests (10 passed)
  • independent GPT-5.5 review: PASS, zero medium/high findings

Operational Notes

  • legacy broker state without an instance token now fails closed and may require manual cleanup
  • Windows process handling is covered by mocked command tests; native Windows lifecycle integration was not run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant