Repository navigation
🚀 feat: Run the Standalone Slack Channel Gateway - #17618
Conversation
701b7a3 to
955e5a5
Compare
955e5a5 to
8327501
Compare
8327501 to
f054713
Compare
There was a problem hiding this comment.
🟡 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
f054713 to
17f5009
Compare
9775bc1 to
96372c2
Compare
96372c2 to
990905d
Compare
990905d to
4f7eee5
Compare
16aff1c to
4ccffce
Compare
4ccffce to
9febec4
Compare
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
6f98086 to
4d366b0
Compare
4d366b0 to
67fb758
Compare
67fb758 to
b3c134e
Compare
b3c134e to
20b228d
Compare
20b228d to
2bdcc08
Compare
82b4094 to
88e1422
Compare
88e1422 to
f05d910
Compare


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