Repository navigation
fix(gateway): dev mode suppresses ambient channel env auto-configuration - #112011
Merged
Merged
Conversation
Channel plugins declare package env triggers in manifests, and ambient environment variables count as "channel configured". A dev gateway (gateway run --dev) inherits the operator's shell, so real channel credentials silently configured channels and could connect development instances to live services (observed with reef and a Telegram-range connection during isolated stress testing). Dev mode now drops presence signals whose only sources are env or manifest-env across activation planning, auto-enable, autostart, health recovery, readiness, reloads, and startup warnings. Explicit channels.<id> config still works, --dev-ambient-channels restores the old behavior, and startup logs the suppressed channel ids once. Non-dev gateways are unchanged.
steipete
marked this pull request as ready for review
July 21, 2026 02:14
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 21, 2026
…ion (openclaw#112011) Channel plugins declare package env triggers in manifests, and ambient environment variables count as "channel configured". A dev gateway (gateway run --dev) inherits the operator's shell, so real channel credentials silently configured channels and could connect development instances to live services (observed with reef and a Telegram-range connection during isolated stress testing). Dev mode now drops presence signals whose only sources are env or manifest-env across activation planning, auto-enable, autostart, health recovery, readiness, reloads, and startup warnings. Explicit channels.<id> config still works, --dev-ambient-channels restores the old behavior, and startup logs the suppressed channel ids once. Non-dev gateways are unchanged.
steipete
added a commit
that referenced
this pull request
Sep 25, 2026
Carry the selected Gateway ambient policy into initial config auto-enable, matching reload preparation. Require that policy at the startup config boundary and classify explicit channel presence from authored source rather than generated runtime enablement. Remove duplicate detector defaults. Preserve explicit channel configuration and both ambient opt-in flags. Document that the policy also applies to reloads and managed services. Release-note context: env-only channel activation bypassed the documented opt-in in stable releases through v2026.9.6. Affected operators must add channels.<id> configuration or use --ambient-channels. Existing suppression warnings explain the enablement path; no config migration should infer operator consent from environment credentials. Completes the policy work from #112011 and #123174 across the loader extracted in #110779. Validation: 440 focused tests passed. Before the fix, the new suite had two expected failures (suppression bypass and generated consent) and three passes; after the fix all five pass. The authored-config/prior-release corpus run had 24 passes and five 120-second timeouts, all in the first Doctor checkpoint before Gateway config loading. No causal connection to this fix was found; migration/worker timing remains a separate follow-up. A standalone replay was stopped while waiting for the legitimate artifact lock held by check-changed, before it reached Vitest. The changed-check aggregate passed production typing, all 25 test-type graphs, formatting, config docs, plugin boundaries and earlier guards, but failed on the full-tree Knip export scan's 600-second timeout. The same scan timed out when run alone with its unchanged limit; production/script export scans passed. Changed-file lint passed with zero warnings/errors. The native-state schema guard passed. The supplemental database-first scan was stopped after over 16 minutes under host load around 179; later media, sidecar, import-cycle, webhook and pairing guards were not run. Full changed-check validation is not claimed green.
steipete
added a commit
that referenced
this pull request
Sep 25, 2026
…7387) Carry the selected Gateway ambient policy into initial config auto-enable, matching reload preparation. Require that policy at the startup config boundary and classify explicit channel presence from authored source rather than generated runtime enablement. Remove duplicate detector defaults. Preserve explicit channel configuration and both ambient opt-in flags. Document that the policy also applies to reloads and managed services. Release-note context: env-only channel activation bypassed the documented opt-in in stable releases through v2026.9.6. Affected operators must add channels.<id> configuration or use --ambient-channels. Existing suppression warnings explain the enablement path; no config migration should infer operator consent from environment credentials. Completes the policy work from #112011 and #123174 across the loader extracted in #110779. Validation: 440 focused tests passed. Before the fix, the new suite had two expected failures (suppression bypass and generated consent) and three passes; after the fix all five pass. The authored-config/prior-release corpus run had 24 passes and five 120-second timeouts, all in the first Doctor checkpoint before Gateway config loading. No causal connection to this fix was found; migration/worker timing remains a separate follow-up. A standalone replay was stopped while waiting for the legitimate artifact lock held by check-changed, before it reached Vitest. The changed-check aggregate passed production typing, all 25 test-type graphs, formatting, config docs, plugin boundaries and earlier guards, but failed on the full-tree Knip export scan's 600-second timeout. The same scan timed out when run alone with its unchanged limit; production/script export scans passed. Changed-file lint passed with zero warnings/errors. The native-state schema guard passed. The supplemental database-first scan was stopped after over 16 minutes under host load around 179; later media, sidecar, import-cycle, webhook and pairing guards were not run. Full changed-check validation is not claimed green. Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Sep 26, 2026
…nclaw#157387) Carry the selected Gateway ambient policy into initial config auto-enable, matching reload preparation. Require that policy at the startup config boundary and classify explicit channel presence from authored source rather than generated runtime enablement. Remove duplicate detector defaults. Preserve explicit channel configuration and both ambient opt-in flags. Document that the policy also applies to reloads and managed services. Release-note context: env-only channel activation bypassed the documented opt-in in stable releases through v2026.9.6. Affected operators must add channels.<id> configuration or use --ambient-channels. Existing suppression warnings explain the enablement path; no config migration should infer operator consent from environment credentials. Completes the policy work from openclaw#112011 and openclaw#123174 across the loader extracted in openclaw#110779. Validation: 440 focused tests passed. Before the fix, the new suite had two expected failures (suppression bypass and generated consent) and three passes; after the fix all five pass. The authored-config/prior-release corpus run had 24 passes and five 120-second timeouts, all in the first Doctor checkpoint before Gateway config loading. No causal connection to this fix was found; migration/worker timing remains a separate follow-up. A standalone replay was stopped while waiting for the legitimate artifact lock held by check-changed, before it reached Vitest. The changed-check aggregate passed production typing, all 25 test-type graphs, formatting, config docs, plugin boundaries and earlier guards, but failed on the full-tree Knip export scan's 600-second timeout. The same scan timed out when run alone with its unchanged limit; production/script export scans passed. Changed-file lint passed with zero warnings/errors. The native-state schema guard passed. The supplemental database-first scan was stopped after over 16 minutes under host load around 179; later media, sidecar, import-cycle, webhook and pairing guards were not run. Full changed-check validation is not claimed green. Co-authored-by: Peter Steinberger <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Channel plugins declare package env triggers in their manifests, and ambient environment variables matching those triggers mark a channel as "configured" in any gateway that inherits them. A dev gateway (
openclaw gateway run --dev) inherits the operator's shell environment, so real channel credentials exported there (e.g. reef guard keys, bot tokens) silently auto-configured channels in supposedly isolated development instances — which can then connect to live external services. This was observed live: an isolated stress-test dev gateway with an emptychannelsconfig warned about the operator's reef channel and held an outbound connection to a Telegram data-center range.Why This Change Was Made
Maintainer decision after the live incident: dev gateways must not touch real channel surfaces via ambient credentials. Dev mode now drops channel presence signals whose only sources are
env/manifest-env, threaded consistently through activation planning, plugin auto-enable, channel autostart, health monitoring/recovery, readiness, config reloads, and startup warnings. Explicitly configured channels (channels.<id>in the dev config) continue to work; a new additive--dev-ambient-channelsflag restores the previous behavior; suppression is logged once at startup with the affected channel ids and the re-enable hint. Non-dev gateways are completely unchanged, and no new config keys or env vars are introduced.User Impact
Developers running
gateway run --devget inert-by-default gateways: no accidental connections to production channels from shell credentials. Anyone who intentionally relied on ambient env to configure channels in dev mode passes--dev-ambient-channels. Docs updated (docs/cli/gateway.md,docs/help/debugging.md).Evidence
--dev-ambient-channelswithout--deverrors), and the one-time suppression log. 406 tests pass across the touched surfaces.server-startup-log.test.tsnow scrubs the host's real reef env vars — six of its pre-existing tests failed on any machine exporting those vars (verified on this host); they are deterministic everywhere with this change.git diff --checkclean, structured autoreview (Codexgpt-5.6-sol, xhigh) clean: "no concrete actionable defect."