Skip to content

fix(discord): recover closed gateway sockets - #953

Open
vernonstinebaker wants to merge 4 commits into
nullclaw:mainfrom
vernonstinebaker:fix/discord-gateway-close-before-heartbeat-join
Open

vernonstinebaker wants to merge 4 commits into
nullclaw:mainfrom
vernonstinebaker:fix/discord-gateway-close-before-heartbeat-join

Conversation

@vernonstinebaker

Copy link
Copy Markdown
Contributor

Summary

  • close the active Discord gateway socket before joining the heartbeat thread during reconnect cleanup
  • treat stalled pre-HELLO gateway reconnects as unhealthy after a bounded grace window
  • add regression coverage for stalled pre-HELLO reconnect health and reconnect session preservation

Test plan

  • HOME=$(mktemp -d ...) zig build test --summary all

Risk

  • Low-to-medium: Discord channel reconnect behavior only. The change preserves session resume state until reconnect exhaustion and makes stale pre-HELLO sockets fail health checks instead of remaining masked indefinitely.

vernonstinebaker and others added 4 commits June 12, 2026 18:41
Close Discord resume and descriptor races, serialize socket publication/shutdown/final close across WebSocket channels, and bound QQ gateway health before and after HELLO. Keep final close with WsClient after worker joins.

Risk: lifecycle-only; no protocol permissions or credentials change. Regression coverage uses socket pairs. Validated with full tests and ReleaseSmall.
@vernonstinebaker

vernonstinebaker commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged into the vernonstinebaker/nullclaw fork main (0db67f72) — deployed in production from that fork. Keeping the PR open in case upstream revives.

vernonstinebaker pushed a commit to vernonstinebaker/nullclaw that referenced this pull request Sep 23, 2026
…sted

Approved intake U-1/U-2/U-4 complete and upstream authors notified with commit
links and intake-correction feedback. Landed-in-fork notes added to our nine
still-open upstream PRs (nullclaw#987, nullclaw#971, nullclaw#970, nullclaw#966, nullclaw#963, nullclaw#962, nullclaw#959, nullclaw#954, nullclaw#953).
Upstream PRs cannot be marked merged (no write access; re-applied commits never
trigger GitHub merge detection), so these comments are the provenance record.

This branch has not been deployed

No deployments
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.

2 participants