Skip to content

docs: replace retired config keys with canonical schema keys - #121330

Merged
steipete merged 1 commit into
mainfrom
docs/retired-config-keys
Aug 10, 2026
Merged

steipete merged 1 commit into
mainfrom
docs/retired-config-keys

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

A docs audit (verified against src/config/dead-config-keys.test.ts, the strict zod schemas, and the doctor retirement migrations) found ~50 config examples across 40+ docs pages teaching retired config keys that now fail strict validation with Unrecognized key. Operators copying these examples get a broken config. Worst case, docs/gateway/configuration.md contradicted itself: prose described agents.entries while the adjacent example still used agents.list.

Why This Change Was Made

Runtime reads canonical config only; docs must teach the canonical shape. This PR mechanically replaces every retired key with its canonical schema key, validated against the current schemas:

  • agents.list (array) → agents.entries (keyed map; id becomes the key, exactly one default: true) — src/config/zod-schema.agents.ts
  • agents.defaults.{image,video,music}GenerationModel → agents.defaults.mediaModels.{image,video,music} — src/config/zod-schema.agent-defaults.ts:69, value shape src/config/zod-schema.agent-model.ts:15
  • messages.queue.debounceMs → removed; docs now describe the built-in 500ms debounce and per-channel debounceMsByChannel — src/config/zod-schema.core.ts:897
  • commands.ownerDisplay/ownerDisplaySecret/useAccessGroups → removed (doctor deletes them; no replacement knob); security pages now describe the actual always-on access-group/channel authorization instead of a no-op knob
  • discovery.wideArea.enabled → removed; discovery.wideArea.domain is the enabling mechanism — src/config/zod-schema.root-shape.ts:412
  • browser.ssrfPolicy.hostnameAllowlist → wildcard-aware allowedHostnames — src/config/zod-schema.core.ts:97
  • agents.defaults.pdfMaxBytesMb → pdfMaxMb
  • Retired memory.search.remote.nonBatchConcurrency / memory.search.local.{contextSize,modelCacheDir} guidance rewritten around the current schema

Intentional non-changes: docs/releases/** (historical), doctor-migration FROM-key references, docs/gateway/protocol.md / docs/plugins/admin-http-rpc.md agents.list RPC method names (a Gateway RPC method, not the config key), and generated docs/plugins/reference/microsoft-foundry.md (its stale text has no editable generator source; scripts/generate-plugin-inventory-doc.mts:455-469 preserves the generated file itself — follow-up noted below).

User Impact

Copy-pasting any config example from these pages now yields a config that passes strict validation. No behavior change; docs-only (61 files, +397/−360).

Evidence

  • Exhaustive re-greps for every retired key return zero hits outside docs/releases/**, doctor migration descriptions, and RPC method names.
  • Representative rewritten examples were validated against OpenClawSchema (accepted; agents.entries single-default rule enforced at src/config/zod-schema.agents.ts:40-46).
  • pnpm docs:list, focused docs tests (2 files, 5 tests), node scripts/check-changed.mjs, git diff --check — all clean.
  • Bonus fixes found during the sweep: additional invalid examples in docs/install/fly.md, docs/gateway/openshell.md, docs/plugins/codex-harness.md, docs/tools/{skills,skills-config,subagents}.md; invalid JSON5 numeric literals (180_000) corrected in media-model examples.

Follow-ups (out of docs scope, discovered during the sweep): extensions/microsoft-foundry/shared.ts:135,624 still emits retired imageGenerationModel; src/cli/dns-cli.ts:180 still prints retired discovery.wideArea.enabled.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 10, 2026 01:34
@steipete
steipete requested a review from a team as a code owner August 10, 2026 01:34
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: slack Channel integration: slack gateway Gateway runtime security Security documentation docker Docker and sandbox tooling channel: feishu Channel integration: feishu extensions: codex plugin: bonjour Plugin integration: bonjour extensions: tts-local-cli extensions: litellm plugin: azure-speech Azure Speech plugin plugin: file-transfer plugin: pixverse channel: buzz extensions: fish-audio Extension: fish-audio size: XS maintainer Maintainer-authored PR labels Aug 10, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 9, 2026, 9:42 PM ET / August 10, 2026, 01:42 UTC.

ClawSweeper review

What this changes

Replaces retired configuration keys in documentation examples with their canonical schema shapes and updates the surrounding explanations.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: the documentation conversion is directionally correct, but two supported setup flows still emit the retired keys that the updated docs say operators must not use.

Priority: P1
Reviewed head: c880559db0960733da0f0d1354e6e62a8ee2ae75

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The documentation migration is well-targeted, but two source-backed setup producers remain incompatible with its canonical guidance.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 5 items Canonical media-model contract: The current schema accepts mediaModels.image/video/music and is strict; the retired imageGenerationModel key is explicitly listed as dead configuration.
DNS setup still prints an invalid recommendation: The documented command prints a recommended configuration containing discovery.wideArea.enabled, while the dead-key test classifies that key as retired.
Foundry onboarding still returns the retired image key: MAI image onboarding builds a configPatch with agents.defaults.imageGenerationModel, and existing tests assert that retired shape.
Findings 2 actionable findings [P1] Fix the DNS setup recommendation before declaring the docs canonical
[P1] Update Foundry onboarding to emit the documented media-model shape
Security None None.

How this fits together

Configuration examples, CLI setup output, and provider onboarding all produce OpenClaw configuration that is validated before the gateway and agent tools use it. This PR updates the documentation producer, while the DNS and Microsoft Foundry setup producers remain relevant sibling paths.

flowchart TD
  A[Documentation examples] --> D[Canonical configuration]
  B[DNS setup output] --> D
  C[Provider onboarding] --> D
  D --> E[Strict configuration validation]
  E --> F[Gateway and agent tools]
Loading

Before merge

  • Fix the DNS setup recommendation before declaring the docs canonical (P1) - This page directs operators to openclaw dns setup for recommended configuration, but that command still prints discovery.wideArea.enabled: true. Current strict config marks that key retired, so the documented flow can still hand users an invalid config. Update the CLI writer and its focused test with this sweep.
  • Update Foundry onboarding to emit the documented media-model shape (P1) - The MAI example now correctly uses agents.defaults.mediaModels.image, but Foundry onboarding still returns agents.defaults.imageGenerationModel and its tests assert that obsolete patch. That config patch reaches users after provider setup and is rejected by the strict schema; migrate the producer and expectations together.
  • Resolve merge risk (P1) - Merging leaves the canonical docs inconsistent with two in-product setup paths, so DNS and Microsoft Foundry users can still receive configurations rejected for retired keys.

Findings

  • [P1] Fix the DNS setup recommendation before declaring the docs canonical — docs/cli/dns.md:33
  • [P1] Update Foundry onboarding to emit the documented media-model shape — docs/tools/image-generation.md:367-371
Agent review details

Security

None.

PR surface

Docs +37. Total +37 across 61 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 61 397 360 +37
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 61 397 360 +37

Review metrics

Metric Value Why it matters
Runtime configuration surface 0 runtime config/default fields changed This is documentation-only, so all corrected guidance must continue to match existing setup producers and strict validation.
Production versus test delta production docs +37 net, tests 0 The documentation expansion is justified by canonical-schema coverage, but no regression coverage accompanies the related producer defects.

Stored data model

Persistent data-model change detected: persistent cache schema: docs/plugins/llama-cpp.md, vector/embedding metadata: docs/plugins/llama-cpp.md. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Align setup producers before merge (recommended)
    Update the DNS recommendation and Microsoft Foundry onboarding patch to the canonical keys, with focused regression coverage for each emitted config shape.

Technical review

Best possible solution:

Make every user-facing configuration producer emit the canonical schema, then keep the documentation sweep as the single current reference.

Do we have a high-confidence way to reproduce the issue?

Yes—source establishes both paths: DNS setup prints the retired discovery key and MAI onboarding returns the retired image key, while the current strict schema accepts only their canonical replacements.

Is this the best way to solve the issue?

No—the documentation edits are correct, but they are not the complete fix while supported setup producers still create the invalid shapes; repair those owner paths and their regression tests in the same change.

Full review comments:

  • [P1] Fix the DNS setup recommendation before declaring the docs canonical — docs/cli/dns.md:33
    This page directs operators to openclaw dns setup for recommended configuration, but that command still prints discovery.wideArea.enabled: true. Current strict config marks that key retired, so the documented flow can still hand users an invalid config. Update the CLI writer and its focused test with this sweep.
    Confidence: 0.98
  • [P1] Update Foundry onboarding to emit the documented media-model shape — docs/tools/image-generation.md:367-371
    The MAI example now correctly uses agents.defaults.mediaModels.image, but Foundry onboarding still returns agents.defaults.imageGenerationModel and its tests assert that obsolete patch. That config patch reaches users after provider setup and is rejected by the strict schema; migrate the producer and expectations together.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ba5895a976ae.

Labels

Label changes:

  • add P1: The stale producer paths can give active DNS or Foundry setup users a configuration that strict validation rejects.
  • add merge-risk: 🚨 compatibility: The branch changes canonical configuration guidance while supported setup paths still generate incompatible retired keys.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Label justifications:

  • P1: The stale producer paths can give active DNS or Foundry setup users a configuration that strict validation rejects.
  • merge-risk: 🚨 compatibility: The branch changes canonical configuration guidance while supported setup paths still generate incompatible retired keys.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/cli/dns-cli.test.ts.
  • [P1] node scripts/run-vitest.mjs extensions/microsoft-foundry/index.test.ts.
  • [P1] pnpm docs:list.
  • [P1] git diff --check.

What I checked:

  • Canonical media-model contract: The current schema accepts mediaModels.image/video/music and is strict; the retired imageGenerationModel key is explicitly listed as dead configuration. (src/config/zod-schema.agent-defaults.ts:69, ba5895a976ae)
  • DNS setup still prints an invalid recommendation: The documented command prints a recommended configuration containing discovery.wideArea.enabled, while the dead-key test classifies that key as retired. (src/cli/dns-cli.ts:180, ba5895a976ae)
  • Foundry onboarding still returns the retired image key: MAI image onboarding builds a configPatch with agents.defaults.imageGenerationModel, and existing tests assert that retired shape. (extensions/microsoft-foundry/shared.ts:624, ba5895a976ae)
  • Changed documentation exposes both affected setup paths: The branch changes the DNS page to say the domain alone enables discovery and changes the Foundry MAI example to mediaModels.image, while each associated producer above remains stale. Public docs: docs/cli/dns.md. (docs/cli/dns.md:33, c880559db096)
  • Current-path provenance: Blame and history show the DNS and Foundry setup producers were introduced together in the current-main commit that also established these adjacent configuration paths. (src/cli/dns-cli.ts:180, 6ee409ca7b6d)

Likely related people:

  • steipete: Current-main blame attributes both the DNS recommendation and Microsoft Foundry retired config patch to the same recent commit. (role: introduced current setup producers and recent configuration contributor; confidence: high; commits: 6ee409ca7b6d; files: src/cli/dns-cli.ts, extensions/microsoft-foundry/shared.ts, src/config/zod-schema.agent-defaults.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Update the DNS CLI recommendation and add a focused assertion for its emitted JSON.
  • Migrate the Microsoft Foundry MAI config patch and its existing expectations to mediaModels.image.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Re the two Rank-up moves: both are intentionally deferred, not skipped silently.

  • DNS CLI recommendation (src/cli/dns-cli.ts:180 printing retired discovery.wideArea.enabled) and
  • Microsoft Foundry MAI config patch still emitting imageGenerationModel (extensions/microsoft-foundry/shared.ts:135,624)

are runtime emitters with their own owner boundaries (CLI, plugin) and need code + focused tests, not docs edits. This PR stays a docs-only canonical-key sweep; both emitters are already named as follow-ups in the PR body and are queued as separate tasks with full context (file:line, canonical shapes, doctor-migration refs). Landing the docs fix now removes ~50 broken copy-paste examples; the two emitters follow in their own scoped PRs.

@steipete
steipete merged commit 914f73a into main Aug 10, 2026
93 of 101 checks passed
@steipete
steipete deleted the docs/retired-config-keys branch August 10, 2026 03:30
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: buzz channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: imessage Channel integration: imessage channel: slack Channel integration: slack docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: codex extensions: fish-audio Extension: fish-audio extensions: litellm extensions: tts-local-cli gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. plugin: azure-speech Azure Speech plugin plugin: bonjour Plugin integration: bonjour plugin: file-transfer plugin: pixverse rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security Security documentation size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant