Skip to content

🚀 feat: Run the Standalone Slack Channel Gateway - #17618

Merged
dustinhealy merged 12 commits into
feat/slack-gateway-presentationfrom
feat/slack-channel-gateway
Nov 11, 2026
Merged

dustinhealy merged 12 commits into
feat/slack-gateway-presentationfrom
feat/slack-channel-gateway

Conversation

@dustinhealy

@dustinhealy dustinhealy commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Runs the Slack Channel gateway as an independently deployable Node process with webhook and Socket Mode ingress, durable delivery workers, health/metrics endpoints and container packaging. It resolves the server-owned versioned gateway policy before listening, authenticates installation challenges and verifies Slack input, forwards scoped events and resumes saved delivery receipts across process restarts.

A retained execution with unavailable state shows explicit recovery guidance instead of a stale review action or an apparent successful continuation. Native Stop carries the complete external channel scope. Pending modal submissions retain their concurrency slot until the backend operation actually settles.

How it works

The process loads the server-owned gateway policy, verifies its Slack installation binding, and serves webhook or Socket Mode ingress. Durable workers read the canonical execution view, persist answer plans, and settle delivery receipts. Reconnect and shutdown revoke transport authority until a fresh authenticated handshake succeeds. Required uncertain writes remain held for reconciliation; optional diagnostic failures cannot block a confirmed answer.

Type of change

  • Feature
  • Bug fix
  • Tests / tooling / CI

Testing

Tested environments/configuration: Node 24; actual Slack HTTP/WebSocket SDKs, a standalone production bundle without node_modules, and an additional live Slack smoke.

474 gateway cases across ten suites pass, together with owning typechecks, the standalone build and scoped static checks. Production-process fixtures cover authenticated ingress, truthful health/readiness, policy/binding changes, durable admission, reconnect failures, shutdown and recovery without leaking credentials. The dedicated CI lane builds and smoke-tests the gateway image.

The live smoke on this head verified formatting/files, restart continuity, native approval/decline, question forms, Stop and post-Stop recovery. Docker execution was not verified locally.

Screenshots / recordings

The base has no running gateway surface. The recovery message below is the actual worker-generated block payload rendered by Slack's official builder, cropped to its preview pane. It retains Stop and suppresses a stale review action. SDK fixtures verify the corresponding behavior; the preview shows public fixture content. An additional live smoke on this head exercised actual Slack delivery and native controls.

Execution recovery guidance

Risk / compatibility

Requires configured service authentication and Slack credentials. Uncertain required delivery is deliberately retained for reconciliation; it is not blindly repeated. Gateway restarts reuse canonical run and delivery identities. Container runtime verification remains a required CI signal.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant local tests pass
  • Scoped checks introduce no new warnings or errors
  • Complex behavior is documented in code and tests
  • Required SDK dependencies use the declared versions
  • Required documentation PR: 📚 docs: Document Background Responses and Slack Channels docs#892

@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 701b7a3 to 955e5a5 Compare October 29, 2026 13:04
@dustinhealy dustinhealy changed the title 💬 feat: Run the Standalone Slack Channel Gateway 🚀 feat: Run the Standalone Slack Channel Gateway Oct 29, 2026
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 955e5a5 to 8327501 Compare October 29, 2026 13:09
@dustinhealy
dustinhealy added this pull request to stack #17619 October 29, 2026 13:14
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 8327501 to f054713 Compare October 29, 2026 13:14
Copilot AI balanced review requested due to automatic review settings October 29, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical bugs let pending submissions bypass overload protection and cause exhausted optional-message retries to block runs and subsequent requests indefinitely.

3 open issues
What changed in this PR

Makes the TypeScript Slack gateway independently deployable, connecting Slack ingress to LibreChat’s durable channel execution and delivery services.

Changes:

  • Adds signed webhook and app-bound Socket Mode ingress, including native Stop handling.
  • Adds lease-renewing workers with persisted delivery receipts, progress updates, and artifact uploads.
  • Adds process startup/shutdown, container packaging, deployment configuration, and CI checks.
File Description
packages/​channel-gateway/​tsdown.config.mjs Builds the standalone process entry point.
packages/​channel-gateway/​src/​worker.ts Processes durable runs and delivers Slack output.
packages/​channel-gateway/​src/​worker.spec.ts Tests delivery recovery, leases, artifacts, and cancellation.
packages/​channel-gateway/​src/​socket.ts Validates Socket Mode connections and dispatches events.
packages/​channel-gateway/​src/​socket.spec.ts Tests connection binding, acknowledgments, and shutdown.
packages/​channel-gateway/​src/​main.ts Wires HTTP, metrics, transports, workers, and shutdown.
packages/​channel-gateway/​src/​app.ts Handles webhook verification and normalized event dispatch.
packages/​channel-gateway/​src/​app.spec.ts Tests ingress validation, capacity limits, and native Stop.
packages/​channel-gateway/​package.json Adds the standalone start command.
packages/​channel-gateway/​Dockerfile Packages the gateway in a non-root runtime image.
docker-compose.channels.yml Adds an opt-in gateway deployment service.
.github/​workflows/​channel-gateway.yml Adds tests, image verification, and process smoke checks.

Review effort: Balanced

Comment thread packages/channel-gateway/src/app.ts Resolved
Comment thread packages/channel-gateway/src/worker.ts Resolved
Comment thread packages/channel-gateway/src/worker.ts Resolved
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from f054713 to 17f5009 Compare October 29, 2026 13:27
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch 2 times, most recently from 9775bc1 to 96372c2 Compare October 29, 2026 14:21
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 96372c2 to 990905d Compare October 29, 2026 14:56
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 990905d to 4f7eee5 Compare October 29, 2026 15:16
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch 2 times, most recently from 16aff1c to 4ccffce Compare October 29, 2026 16:38
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 4ccffce to 9febec4 Compare October 31, 2026 20:46

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-10-31T20:59:37.002825Z 9febec4 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 9febec4ed8

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dustinhealy
dustinhealy added this pull request to stack #17807 November 4, 2026 15:46
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch 2 times, most recently from 6f98086 to 4d366b0 Compare November 5, 2026 07:06
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 4d366b0 to 67fb758 Compare November 10, 2026 11:35
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 67fb758 to b3c134e Compare November 10, 2026 23:16
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from b3c134e to 20b228d Compare November 10, 2026 23:51
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 20b228d to 2bdcc08 Compare November 11, 2026 00:11
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch 2 times, most recently from 82b4094 to 88e1422 Compare November 11, 2026 03:04
@dustinhealy
dustinhealy force-pushed the feat/slack-channel-gateway branch from 88e1422 to f05d910 Compare November 11, 2026 04:22
@dustinhealy
dustinhealy merged commit 4398b61 into dev Nov 11, 2026
40 of 54 checks passed
@dustinhealy
dustinhealy deleted the feat/slack-channel-gateway branch November 11, 2026 05:05
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