Skip to content

fix(discovery): add missing domain to wideArea Zod config schema#35615

Merged
altaywtf merged 2 commits intoopenclaw:mainfrom
ingyukoh:fix/gateway-widearea-domain-schema
Mar 13, 2026
Merged

fix(discovery): add missing domain to wideArea Zod config schema#35615
altaywtf merged 2 commits intoopenclaw:mainfrom
ingyukoh:fix/gateway-widearea-domain-schema

Conversation

@ingyukoh
Copy link
Copy Markdown
Contributor

@ingyukoh ingyukoh commented Mar 5, 2026

Closes #35614

Summary

  • Add domain field to wideArea schema in zod-schema.ts
  • Add regression test in config.schema-regressions.test.ts

Problem

The wideArea schema uses .strict() but was missing the domain field that is:

  • Defined in the type (types.gateway.ts:21)
  • Used across gateway, CLI, and infrastructure code for unicast DNS-SD
  • Referenced in 10+ locations across the codebase

Users setting discovery.wideArea.domain get a validation error.

Test plan

  • New regression test: accepts discovery.wideArea.domain for unicast DNS-SD
  • CI passes

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 5, 2026

Greptile Summary

This PR fixes a schema gap where discovery.wideArea.domain — an existing field on the WideAreaDiscoveryConfig TypeScript type — was absent from the Zod validation schema. Because the wideArea object uses .strict(), any config that included domain would fail validation at runtime. The one-line schema fix and accompanying regression test are correct and well-scoped.

Changes:

  • src/config/zod-schema.ts: Adds domain: z.string().optional() to the wideArea Zod object, matching WideAreaDiscoveryConfig.domain?: string in src/config/types.gateway.ts.
  • src/config/config.schema-regressions.test.ts: Adds a regression test asserting that validateConfigObject accepts a config containing discovery.wideArea.domain, preventing future regressions from .strict() removing the field.

Confidence Score: 5/5

  • Safe to merge — minimal, correct fix with targeted regression test.
  • The change is a single-field addition that directly mirrors the existing TypeScript type. No logic is altered, no regressions are introduced, and the new test covers the previously-failing scenario. The schema is now fully in sync with WideAreaDiscoveryConfig.
  • No files require special attention.

Last reviewed commit: c697172

@ingyukoh
Copy link
Copy Markdown
Contributor Author

@altaywtf This is ready for review — CI passes, no conflicts. Could you take a look? Thanks!

@ingyukoh ingyukoh force-pushed the fix/gateway-widearea-domain-schema branch from c697172 to 99d396b Compare March 12, 2026 09:27
@altaywtf altaywtf self-assigned this Mar 13, 2026
@altaywtf altaywtf force-pushed the fix/gateway-widearea-domain-schema branch from 99d396b to 72eacb7 Compare March 13, 2026 12:23
ingyukoh and others added 2 commits March 13, 2026 15:51
The wideArea schema uses .strict() but was missing the domain
field that is defined in WideAreaDiscoveryConfig type
(types.gateway.ts:21) and used across gateway, CLI, and
infrastructure code for unicast DNS-SD discovery.

Users setting discovery.wideArea.domain in their config get a
validation error.

Add the field to the schema and a regression test.
@altaywtf altaywtf force-pushed the fix/gateway-widearea-domain-schema branch from 72eacb7 to d81d332 Compare March 13, 2026 12:52
@altaywtf altaywtf merged commit af4731a into openclaw:main Mar 13, 2026
26 of 27 checks passed
@altaywtf
Copy link
Copy Markdown
Member

Merged via squash.

Thanks @ingyukoh!

mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 13, 2026
* main: (168 commits)
  fix: stabilize macos daemon onboarding
  fix(ui): keep shared auth on insecure control-ui connects (openclaw#45088)
  docs(plugins): clarify workspace shadowing
  fix(node-host): harden perl approval binding
  fix(node-host): harden pnpm approval binding
  fix(discovery): add missing domain to wideArea Zod config schema (openclaw#35615)
  chore(gitignore): add docker-compose override (openclaw#42879)
  feat(ios): add onboarding welcome pager (openclaw#45054)
  fix(signal): add groups config to Signal channel schema (openclaw#27199)
  fix: restore web fetch firecrawl config in runtime zod schema (openclaw#42583)
  fix: polish Android QR scanner onboarding (openclaw#45021)
  fix(android): use Google Code Scanner for onboarding QR
  fix(config): add missing params field to agents.list[] validation schema (openclaw#41171)
  docs(contributing): update Android app ownership
  fix(agents): rephrase session reset prompt to avoid Azure content filter (openclaw#43403)
  test(config): cover requiresOpenAiAnthropicToolPayload in compat schema fixture
  fix(agents): respect explicit user compat overrides for non-native openai-completions (openclaw#44432)
  Android: fix HttpURLConnection leak in TalkModeVoiceResolver (openclaw#43780)
  Docker: add OPENCLAW_TZ timezone support (openclaw#34119)
  fix(agents): avoid injecting memory file twice on case-insensitive mounts (openclaw#26054)
  ...
z-hao-wang pushed a commit to z-hao-wang/openclaw that referenced this pull request Mar 13, 2026
…nclaw#35615)

Merged via squash.

Prepared head SHA: d81d332
Co-authored-by: ingyukoh <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
frankekn pushed a commit to xinhuagu/openclaw that referenced this pull request Mar 14, 2026
…nclaw#35615)

Merged via squash.

Prepared head SHA: d81d332
Co-authored-by: ingyukoh <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
hougangdev pushed a commit to hougangdev/clawdbot that referenced this pull request Mar 14, 2026
…nclaw#35615)

Merged via squash.

Prepared head SHA: d81d332
Co-authored-by: ingyukoh <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
ecochran76 pushed a commit to ecochran76/openclaw that referenced this pull request Mar 14, 2026
…nclaw#35615)

Merged via squash.

Prepared head SHA: d81d332
Co-authored-by: ingyukoh <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
Interstellar-code pushed a commit to Interstellar-code/operator1 that referenced this pull request Mar 16, 2026
…nclaw#35615)

Merged via squash.

Prepared head SHA: d81d332
Co-authored-by: ingyukoh <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

(cherry picked from commit af4731a)
sbezludny pushed a commit to sbezludny/openclaw that referenced this pull request Mar 27, 2026
…nclaw#35615)

Merged via squash.

Prepared head SHA: d81d332
Co-authored-by: ingyukoh <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] discovery.wideArea.domain config rejected by strict Zod schema

2 participants