Skip to content

fix(broker): do not signal stale persisted pids - #749

Open
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/broker-pid-reuse
Open

sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/broker-pid-reuse

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Sep 7, 2026 •

Copy link
Copy Markdown

Summary

  • stop treating a PID loaded from persisted broker.json as proof of process ownership
  • require an explicit ownedPid before teardown may signal a process
  • retain the PID fallback for a broker spawned by the current ensureBrokerSession call when startup fails
  • add regressions proving SessionEnd does not signal an unrelated live process after PID reuse

Fixes #743.

Validation

  • npm test (94/94 passed)
  • npm run check-version
  • git diff --check

Maintenance validation on 7 November 2026

The complete standalone branch suite passed 94 tests, including stale-PID ownership checks.

The four PRs merged without conflicts in a local checkout. All 109 tests passed, together with the version check and TypeScript build. The unchanged upstream checkout passed 91 tests and its build. Runtime tests used fake app-server fixtures and isolated test state, without live model requests or account credentials. Native Windows execution and a live Claude Code session were not tested. Hosted CI has not completed successfully for these fork heads; maintainer approval or reruns remain outstanding.

Validation used Python 3.12/3.14 and Node 26 on macOS arm64 as applicable. Earlier validation counts above are historical. Individual and combined counts overlap and should not be added.

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team September 7, 2026 07:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-07T07:58:27.401394Z 9c854bc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Following up after the Group 6 maintenance pass. This branch is current, mergeable, and has no failing checks or unresolved review threads. Could a maintainer review it when convenient?

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.

SessionEnd kills whatever pid broker.json names, without checking it is still a broker (pid reuse → SIGTERM to an unrelated process group)

1 participant