Repository navigation
refactor(reef): drop hand-maintained manifest schema copies - #131292
Conversation
The reef manifest duplicated the full channel config schema into both configSchema and channelConfigs.reef.schema, and the channelConfigs copy silently overrode the zod-derived generated bundled channel metadata in config validation - three surfaces to keep in sync by hand (the trap that bit #131167). Match sibling bundled channel plugins: stub plugin-level configSchema, no channelConfigs copy; the generated metadata (from the zod schema, CI-checked) is the single channel-schema source.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 27, 2026, 8:13 PM ET / August 28, 2026, 00:13 UTC. ClawSweeper reviewWhat this changesThe PR removes Reef’s duplicate manifest schemas so channel configuration is served from the generated schema derived from the Reef Zod definition. Merge readinessKeep open: the cleanup regresses validation for a previously accepted Reef plugin-entry configuration and needs an explicit upgrade path before merge. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherReef configuration reaches OpenClaw through two surfaces: channel settings for runtime behavior and plugin-entry settings for plugin activation metadata. Generated bundled-channel metadata supplies the channel schema to validation and the Control UI. flowchart LR
A[Operator configuration] --> B[Plugin manifest]
A --> C[Channel settings]
B --> D[Plugin-entry validation]
C --> E[Generated channel metadata]
E --> F[Channel validation and Control UI]
D --> G[Gateway startup validation]
Decision needed
Why: The cleanup changes a published validation contract; only maintainers can choose the conflict and precedence policy for existing operator configuration. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -175. Total -175 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep generated metadata as the sole channel-schema source, while adding a Reef doctor migration that moves legacy plugin-entry values only when Do we have a high-confidence way to reproduce the issue? Yes, from source: validate an enabled Reef plugin entry containing Is this the best way to solve the issue? No: using generated metadata for Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 13941a030dd5. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
The retired full plugin-entry schema let a Control UI plugin form park reef settings under plugins.entries.reef.config where the runtime never read them. Doctor now reports the location and --fix moves the keys into channels.reef (channel values stay authoritative; the move only commits when the merged record parses, so a fix can never corrupt valid config).
|
The P1 is addressed in db8f606. Verification notes on the premise first: no repo path ever writes Fix shape (reef's existing doctor config-repair contract, not a runtime fallback):
Also note the sweeper's live-verification command in the review errored at import time ( |
|
Merged via squash.
|
…#131292) * refactor(reef): drop hand-maintained manifest schema copies The reef manifest duplicated the full channel config schema into both configSchema and channelConfigs.reef.schema, and the channelConfigs copy silently overrode the zod-derived generated bundled channel metadata in config validation - three surfaces to keep in sync by hand (the trap that bit openclaw#131167). Match sibling bundled channel plugins: stub plugin-level configSchema, no channelConfigs copy; the generated metadata (from the zod schema, CI-checked) is the single channel-schema source. * fix(reef): doctor migration for stray plugins.entries.reef.config The retired full plugin-entry schema let a Control UI plugin form park reef settings under plugins.entries.reef.config where the runtime never read them. Doctor now reports the location and --fix moves the keys into channels.reef (channel values stay authoritative; the move only commits when the merged record parses, so a fix can never corrupt valid config).
…etadata (#131564) * fix(channels): single-source bundled channel schemas from generated metadata Hand-maintained channelConfigs schema copies in a2a, buzz, clickclack, raft, and slack silently overrode the zod-derived generated bundled channel metadata in config validation: stale buzz/raft copies rejected the valid configWrites key, and the slack/clickclack additionalProperties stubs disabled validation for those channels entirely. Delete the copies so the CI-checked generated metadata is the single channel-schema source, stub feishu's retired rich plugin-entry schema like every sibling, and guard the pattern with a contract test. The retired rich plugin-entry schemas let config UIs park channel settings under plugins.entries.<id>.config unread; the reef doctor migration from #131292 generalizes into the plugin SDK (defineStrayPluginEntryConfigMigration) and feishu adopts it alongside reef. * fix(tests): fold channel schema-source guard into existing shard root A new test root pushed the plugins-platform tsgo shard past its 720-root cap; the guard lives in bundled-package-channel-metadata.test.ts instead. * test(channels): update catalog and parity tests to single-source schemas The official catalog regenerates without the deleted manifest schema copies; the a2a and buzz parity tests drop their cold-manifest/catalog surfaces (the runtime zod projection is what the generator publishes). * test(plugins): lagging slack hydration carries no catalog schema copy The full-suite manifest-registry test still pinned the catalog's retired slack schema fallback; hydration now yields label/description and channel validation falls back to the generated bundled metadata.
…etadata (openclaw#131564) * fix(channels): single-source bundled channel schemas from generated metadata Hand-maintained channelConfigs schema copies in a2a, buzz, clickclack, raft, and slack silently overrode the zod-derived generated bundled channel metadata in config validation: stale buzz/raft copies rejected the valid configWrites key, and the slack/clickclack additionalProperties stubs disabled validation for those channels entirely. Delete the copies so the CI-checked generated metadata is the single channel-schema source, stub feishu's retired rich plugin-entry schema like every sibling, and guard the pattern with a contract test. The retired rich plugin-entry schemas let config UIs park channel settings under plugins.entries.<id>.config unread; the reef doctor migration from openclaw#131292 generalizes into the plugin SDK (defineStrayPluginEntryConfigMigration) and feishu adopts it alongside reef. * fix(tests): fold channel schema-source guard into existing shard root A new test root pushed the plugins-platform tsgo shard past its 720-root cap; the guard lives in bundled-package-channel-metadata.test.ts instead. * test(channels): update catalog and parity tests to single-source schemas The official catalog regenerates without the deleted manifest schema copies; the a2a and buzz parity tests drop their cold-manifest/catalog surfaces (the runtime zod projection is what the generator publishes). * test(plugins): lagging slack hydration carries no catalog schema copy The full-suite manifest-registry test still pinned the catalog's retired slack schema fallback; hydration now yields label/description and channel validation falls back to the generated bundled metadata.
Related: #131167
What Problem This Solves
Follow-up cleanup from #131167. The reef plugin manifest hand-duplicated the full channel config schema into two JSON Schema blocks (
configSchemaandchannelConfigs.reef.schema), and thechannelConfigscopy silently overrode the zod-derived generated bundled channel metadata in config validation (ensureChannelSchemasseeds fromGENERATED_BUNDLED_CHANNEL_CONFIG_METADATA, then registrychannelConfigs.schemaentries win). That left three surfaces to keep in sync by hand — exactly the trap that surfaced during #131167, where the newrulesobject had to be patched into both manifest copies after the zod schema and generated metadata were already correct.Why This Change Was Made
Match the pattern every sibling bundled channel plugin already uses (telegram, discord, msteams, irc, …): plugin-level
configSchemais the minimal required stub ({"type":"object","additionalProperties":false,"properties":{}}— channel plugins carry no plugin-level config), and there is nochannelConfigs.schemacopy. The channel schema is then served everywhere from the generated bundled channel metadata, which derives from the zod schema and is freshness-checked in CI (generate-bundled-channel-config-metadata --check). Reef was the only bundled plugin duplicating the full schema; slack'schannelConfigsschema is a deliberate wide-open stub, not a duplicate, and is untouched.User Impact
None at runtime: config validation, the docs example validator, and the Control UI config schema all resolve reef's channel schema from the zod-derived metadata, which is semantically identical to the deleted copies (parity was aligned in #131167). Future schema changes now need exactly one edit (zod) plus the existing generator, with CI guarding freshness — the drift class is gone. Net −175 lines of hand-maintained manifest JSON.
Evidence
pnpm docs:check-config-examplesgreen — the reef docs config example (includingguard.rules) validates through the plugin-aware path against the generated schema.node --import tsx scripts/generate-bundled-channel-config-metadata.ts --checkgreen (metadata unchanged; it never derived from the manifest).node scripts/run-vitest.mjs extensions/reef src/plugins/bundled-sources.test.ts src/plugins/bundled-plugin-metadata.test.ts— all green.node scripts/check-changed.mjs— all lanes green.requiresConfigderivation unchanged (no root-levelrequiredbefore or after).