Repository navigation
docs: replace retired config keys with canonical schema keys - #121330
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 9, 2026, 9:42 PM ET / August 10, 2026, 01:42 UTC. ClawSweeper reviewWhat this changesReplaces retired configuration keys in documentation examples with their canonical schema shapes and updates the surrounding explanations. Merge readinessKeep 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 Review scores
Verification
How this fits togetherConfiguration 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]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceDocs +37. Total +37 across 61 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ba5895a976ae. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Re the two Rank-up moves: both are intentionally deferred, not skipped silently.
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. |
|
Merged via squash.
|
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 withUnrecognized key. Operators copying these examples get a broken config. Worst case,docs/gateway/configuration.mdcontradicted itself: prose describedagents.entrieswhile the adjacent example still usedagents.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 onedefault: true) —src/config/zod-schema.agents.tsagents.defaults.{image,video,music}GenerationModel→agents.defaults.mediaModels.{image,video,music}—src/config/zod-schema.agent-defaults.ts:69, value shapesrc/config/zod-schema.agent-model.ts:15messages.queue.debounceMs→ removed; docs now describe the built-in 500ms debounce and per-channeldebounceMsByChannel—src/config/zod-schema.core.ts:897commands.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 knobdiscovery.wideArea.enabled→ removed;discovery.wideArea.domainis the enabling mechanism —src/config/zod-schema.root-shape.ts:412browser.ssrfPolicy.hostnameAllowlist→ wildcard-awareallowedHostnames—src/config/zod-schema.core.ts:97agents.defaults.pdfMaxBytesMb→pdfMaxMbmemory.search.remote.nonBatchConcurrency/memory.search.local.{contextSize,modelCacheDir}guidance rewritten around the current schemaIntentional non-changes:
docs/releases/**(historical), doctor-migration FROM-key references,docs/gateway/protocol.md/docs/plugins/admin-http-rpc.mdagents.listRPC method names (a Gateway RPC method, not the config key), and generateddocs/plugins/reference/microsoft-foundry.md(its stale text has no editable generator source;scripts/generate-plugin-inventory-doc.mts:455-469preserves 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
docs/releases/**, doctor migration descriptions, and RPC method names.OpenClawSchema(accepted;agents.entriessingle-default rule enforced atsrc/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.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,624still emits retiredimageGenerationModel;src/cli/dns-cli.ts:180still prints retireddiscovery.wideArea.enabled.