Skip to content

fix(slack): name a missing slack proxy only when api egress is closed - #3705

Merged
freeqaz merged 2 commits into
mainfrom
fix-2533
Oct 26, 2026
Merged

freeqaz merged 2 commits into
mainfrom
fix-2533

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Production always builds the Slack Channel Driver with expectProxy: true. With no Slack proxy, any unanswered Slack check (timeout, DNS failure, spent time budget) becomes the 409 that tells an administrator to set slackProxy.enabled or api.channelDirectoryProxyUrl. But when GitHub, Google or OIDC sign-in is enabled with empty egressCidrs, the chart's sign-in egress rule allows the API TCP 443 to any address except 169.254.0.0/16, so Slack is reachable directly. On those installs a transient Slack outage gets the hedged, no-retry 409 instead of a plain retryable 503. Follow-up to #3684.

Change

  • Chart: new helper openclaw.api.httpsEgressOpen renders OCC_API_HTTPS_EGRESS_OPEN on the API (only) as "true" when any sign-in provider is enabled with empty egressCidrs (the same condition that renders a 0.0.0.0/0 login egress rule), else "false".
  • API startup (production): parses OCC_API_HTTPS_EGRESS_OPEN as a strict boolean (default false; any other value fails startup) into apiHttpsEgressOpen.
  • composeProduction: expectProxy: config.apiHttpsEgressOpen !== true. No change to the ChannelDriver contract; expectProxy is an existing option of the bundled Slack Driver.
  • Docs: settings row in the production settings reference, environment cheat sheet entry, and the Slack Channel Driver page states when the 409 applies and how Helm sets the flag.

Verification

  • New case in tests/integration/sign-in-chart-parity.test.mjs: renders password-only, a null GitHub map, GitHub/Google/OIDC with default and narrowed egressCidrs, and narrowed GitHub plus open Google; asserts the API env value, that it matches whether a login egress rule to 0.0.0.0/0 is rendered, and that the worker gets no flag. API startup accepts the rendered true (reaches the database step) and refuses open. The case fails on main (no env var rendered).
  • New case pinned 20/20 at 2 CPUs on a remote test VM; sign-in-chart-parity, production-kubernetes-packaging and slack-channel-directory pass there (147/147). tsc --build (sources + tests), eslint and prettier on touched files.
  • Not separately proven: the one-line composition choice. The Driver's behavior with and without expectProxy is covered by tests/conformance/slack-channel-directory.test.mjs and tests/integration/occ-api.test.mjs.

Risks

Low. Installs with narrowed or no external sign-in keep today's 409. Open-egress installs that truly cannot reach Slack (for example an external firewall) now get a retryable 503 instead of the proxy hint. The new API env var rolls the API Pod once on upgrade; an older image ignores it, and a newer image without it keeps today's behavior.

The chart now tells the API, as OCC_API_HTTPS_EGRESS_OPEN, whether a
sign-in egress rule allows TCP 443 to any address (GitHub, Google or
OIDC enabled with empty egressCidrs). Production builds the Slack
Channel Driver with expectProxy only when that egress is closed, so an
open route that times out stays a retryable 503 instead of the
missing-proxy 409 (finding 2533).
…ge owns the Helm rule

docs/reference/settings/production.md is near the 2,500-word limit.
@freeqaz
freeqaz requested a review from a team as a code owner October 26, 2026 01:49
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@freeqaz
freeqaz merged commit 30af93b into main Oct 26, 2026
43 checks passed
@freeqaz
freeqaz deleted the fix-2533 branch October 26, 2026 02:09
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