Skip to content

fix(acp): release completed macOS Codex worker slots - #20

Merged
reynholm merged 3 commits into
mainfrom
fix/completed-session-slots
Oct 16, 2026
Merged

reynholm merged 3 commits into
mainfrom
fix/completed-session-slots

Conversation

@reynholm

@reynholm reynholm commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Completed macOS Codex turns can leave a late-started codex-code-mode-host alive. The ACP pool mistakes that resident helper for background work and retains the thread's worker; after five completed threads, a sixth cannot acquire a slot.

Confirm the helper's ps comm basename with one bounded macOS query and exclude only the confirmed resident helper from blocking work. Continue traversing its descendants so real background tasks retain the slot until they exit. Failed or incomplete identity checks remain conservative. ACP behavior on Linux and Windows is unchanged; relay, database, protocol and dependencies are unchanged.

Composer autofocus also preserves focus inside an open dialog. Previously late composer readiness could move focus from the huddle voice popover to the editor, dismissing the menu immediately after a click. Ordinary navigation from an outside button retains its autofocus behavior.

Validation on 2e8fbe999de78702046a5cf7063bef930f3121e6:

  • Full buzz-acp: 1103 passed, 0 failed, 7 ignored; fmt and package clippy passed.
  • Real ACP-adapter regressions cover six threads with five workers, child-work retention/release, and an ordinary process mentioning the helper name. Original-code and three mutation runs fail as expected.
  • Fork registry validation and all 77 maintenance tests passed.
  • Gronen review: PASS, no confirmed defects (Buzz event f581a05ce988210b971f9703e2cd553ee03d95e3f991940d55de0e5584274e1b). Independent source review and live macOS ps probes; test results above were supplied by the author.
  • Repository-wide just ci desktop-typecheck passed with unchanged HEAD and clean tree: ACP 1103/0 (7 ignored), native Desktop 3646/0 (20 ignored), JavaScript 7065/0, mobile 2631/0 (4 skipped). These full repository results belong to the ACP commit.
  • Follow-up e4d73a3223d9e91767f5ce45f0792014a81dd616: full Desktop check/test/typecheck/build passed; all 26 huddle E2E tests passed without retries, including the formerly failing voice-menu scenario. Three new production-hook tests pass; removing the dialog guard causes two failures. The four tested inputs match the committed snapshot. ACP sources are unchanged.
  • Gronen follow-up source review on e4d73a32: PASS, no confirmed defects; 4/4 reviewed hashes match (Buzz event fbcc0afbd629dc359c6f0d1bdd6b6d3de1130cf3d4d772937405b1a956e0f450). Hosted run38895912126 subsequently failed the pre-existing position-based voice-note E2E assertion; the test-only follow-up below addresses its reproduced cause.
  • Autofocus protection is intentionally scoped to role="dialog"; it does not add a focusin subscription or cover alertdialog/portalled menu items.

The duplicate voice-note playback E2E now binds both controls/assertions to emitted message IDs, so live message reordering does not switch the player under test. The one-second real audio fixture loops during this test to prevent natural completion from impersonating mutual pause. Playback code, assertions, timeouts and retries are unchanged.

Validation of test-only follow-up 7dcb952a7b8130a260a6516c781a50e8b1f32ced:

  • Instrumented slow CPU/media loading reproduced the original failure3/3: the clicked message later occupied a different DOM index. The revised test passes normal1/1 and slow3/3.
  • Removing production mutual-pause behavior makes the revised test fail at the required first-player pause assertion; mutation restored and E2E build regenerated.
  • Complete voice-note E2E13/13 without retries; full frontend check,7068 tests, typecheck;77 fork tests and registry validation pass. The three reviewed paths match the commit receipt. Gronen source review PASS on the exact commit (Buzz event 17563ffd232f39f606cf66b1804d4e4b46c8ab45c719d610e7836560a61afc39), three reviewed hashes match; no confirmed defects. Reviewer did not rerun tests. Author frontend process exited0; its log ends at tsc without an exit marker. Hosted CI38900579352 is still running.
  • Original hosted failures and the separate workflow deletion retry-pass remain recorded at https://github.com/reynholm/buzz/actions/runs/38895912126/job/116957375114. Local media telemetry establishes the reproduced mechanism, not each historical hosted attempt's precise cause.

Linux verification: an isolated x86_64 Linux probe of the unchanged production process-tree module and verbatim background-child method confirms a synthetic late helper remains blocking after its child exits. This macOS patch does not address that Linux case. Genuine Linux Codex, the complete Linux pool/Desktop workflow and Linux ARM were not exercised.

Review limits: ps comm is a process-name heuristic, not immutable executable identity; argv[0] impersonation can match. Children already alive at pool return are covered; work born after an empty snapshot and the unchanged continuation collection path are not newly established by these tests. Installed-app six-thread acceptance remains unperformed.

Earlier unchanged Git fixtures failed under Apple Git 2.39.5 and passed with Git 2.49. One earlier full run hit the existing keepalive_resets_idle_past_deadline timing assertion; a separate final full run passed with unchanged sources and timeout. These failures remain recorded, not reclassified as passes.

Owner authorized Gronen review, PR/merge, then a macOS build in Buzz event bd18abe0604c9174be04bd817f0bfcfbbd052dc64b36e7c6cddaf7d3e9dbf16e. Human installed-app acceptance is not claimed. No public release or extension of the previous release-only unsafe-libyaml exception is included.

Local evidence: RESEARCH/BUZZ_COMPLETED_SESSION_SLOTS_ASTRON_2026_10_16.md and WORK_LOGS/ASTRON_SESSION_SLOTS_2026_10_16/ in the Buzz workspace.

The first hosted run on 2e8fbe99 failed the unchanged huddle voice-menu scenario in all three attempts. Local reproduction and recorded focus events established the existing autofocus defect addressed above. The original failure is retained at https://github.com/reynholm/buzz/actions/runs/38892002326/job/116944004362. No test assertion, timeout or skip was weakened.

Signed-off-by: Andrey Bruhanov <mail@alamra.net>
@reynholm
reynholm marked this pull request as ready for review October 16, 2026 11:28
@reynholm
reynholm marked this pull request as draft October 16, 2026 11:43
Signed-off-by: Andrey Bruhanov <mail@alamra.net>
@reynholm
reynholm marked this pull request as ready for review October 16, 2026 11:50
Signed-off-by: Andrey Bruhanov <mail@alamra.net>
@reynholm
reynholm merged commit bbee628 into main Oct 16, 2026
78 checks passed
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