Repository navigation
fix(slack): retire probe sockets after timeout - #147846
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 12:06 AM ET / 04:06 UTC. ClawSweeper reviewWhat this changesGive Slack health checks their own HTTP connection pool and destroy it when each check finishes, including after a timeout. Merge readiness✅ Ready for maintainer review Keep open: this is a focused lifecycle fix absent from current main and the latest release. No introduced correctness or security defect was found, and the maintainer-protected PR remains useful. Priority: P2 Review scores
Verification
How this fits togetherSlack health checks send an authentication request using the configured account token and return connection and identity information to diagnostics. The changed transport lifecycle releases the check's sockets before returning that result. flowchart TD
A[Channel diagnostics] --> B[Account token and deadline]
B --> C[Slack health probe]
C --> D[Dedicated HTTP transport]
D --> E[Slack authentication response or timeout]
E --> F[Destroy probe sockets]
F --> G[Health result]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +33, Tests +21. Total +54 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep socket retirement with the probe owner while preserving shared transports for ordinary Slack operations. Do we have a high-confidence way to reproduce the issue? Unclear for independent reproduction: the real-transport harness covers the reported failure, but the intermittent loaded-Bun trigger was reported by the author and was not executed in this read-only review. Is this the best way to solve the issue? Yes: explicit disposal at the probe boundary reuses the existing transport owner and avoids changing ordinary Slack request lifetimes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ae5a4b4a5552. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit 'e3d8d0078369b21223c70028c4502c89f1420897': (51 commits) fix: background requests delay opening chats (#147845) chore(i18n): refresh native locales (#147899) feat: start remote sessions without a repository (#147773) fix(slack): retire probe sockets after timeout (#147846) refactor(agents): share theme ANSI color encoding (#147838) improve(memory): bound vector recall decision counts (#147900) improve(browser): narrow dashboard lifetime rechecks (#147892) test(discord): compact lifecycle matrices (#147855) fix(agents): use exact model rows for harness support (#147849) test(agents): compact embedded lifecycle matrices (#147856) test(agents): compact embedded admission matrices (#147853) test(cli): compact node management matrices (#147854) feat(artifacts): select assistant-delivered files by run (#147682) improve: reduce event-loop work when recording prompts (#147876) fix: preserve readable generated image and video filenames (#147833) fix(ci): skip SDK rendering for identical revisions (#147572) fix: prevent false process failures and stalled background waits (#147871) fix(ui): restore live updates when retrying chat history (#147865) fix(ui): preserve text and image order in assistant replies (#147731) refactor(qa-lab): reuse approval result formatter (#147867) ...
Problem
A timed-out Slack health probe can return while its HTTP socket remains pooled. Under Bun and a loaded non-isolated Slack test process, the stalled-request and trickling-body cases intermittently kept their only socket open beyond the probe deadline.
Solution
Give each Slack health probe its own shared HTTP/1 env-proxy dispatcher, pass that dispatcher into the existing read-client owner, and destroy it after the probe settles. Invalid ambient proxy settings retain the existing direct-health-check fallback, now through a direct owned dispatcher. Ordinary Slack clients keep their existing shared transport behavior.
The dedicated lifecycle also makes the ownership explicit: health probes do not retain a reusable connection pool after returning.
Validation
node scripts/check-changed.mjsA direct Bun
fetchreproduction and a bare Slack WebClient reproduction each closed stalled and trickling sockets in 20/20 attempts. The failure requires OpenClaw's loaded Slack process, so there is no isolated Bun runtime report to send upstream from this evidence.Release-note context: Slack health checks now retire timed-out probe sockets reliably, including when OpenClaw runs under Bun.