Skip to content

fix(config): resolve channel schema ownership via preferOver - #132729

Merged
obviyus merged 9 commits into
openclaw:mainfrom
xydt-juyaohui:fix/config-channel-schema-ownership-prefer-over
Sep 4, 2026
Merged

obviyus merged 9 commits into
openclaw:mainfrom
xydt-juyaohui:fix/config-channel-schema-ownership-prefer-over

Conversation

@xydt-juyaohui

@xydt-juyaohui xydt-juyaohui commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #132133.

What Problem This Solves

Fixes an issue where channel settings were checked against a displaced plugin's schema. The Gateway could serve the preferred plugin while validation rejected its fields, the Control UI schema described another plugin, and config reads used the wrong sensitive-field hints.

Why This Change Was Made

The metadata collector previously chose the last same-origin schema without the activation context. The repair reuses existing channel auto-enable candidates and the Gateway's configured-channel activation predicate, then selects schema, labels, and sensitive hints together. It does not add another preferOver rule or execute plugin setup probes during validation.

Explicit dual-selection remains explicit: runtime keeps its first eligible registration and reports the duplicate. Metadata follows that owner. Disabled and denied replacements cannot take ownership from the serving fallback. Existing install-origin precedence is retained.

The redaction cache now distinguishes configuration snapshots as well as the process-stable plugin inventory. No configuration option, grant, migration, persistent-store schema, or protocol changed.

User Impact

  • Validation accepts the serving plugin's channel fields.
  • Gateway schema responses expose that plugin's fields and labels.
  • CLI, Gateway, and system-agent config reads use the selected owner's sensitive hints.

Evidence

Baseline: 6505c061f012f21d24af99c7d53e2b250039afe1.
Tested repair: b5b882b31cc69aea0e6f20005aa226e1caadd561.

Real product proof used two local fixture plugins loaded through plugins.load.paths, ordinary manifests, and registerChannel. The replacement declares preferOver and adds newField to the legacy schema. Only the replacement is explicitly enabled in the normal case. Each case uses isolated config/state and a restarted Gateway.

No direct collector import or mocked Gateway response was used as product proof.

Scenario Baseline Repair
Replacement discovered first CLI rejects newField for proof-core; Gateway serves proof-plus but publishes the legacy schema Validation passes; runtime and schema both use proof-plus
Discovery order reversed Validation and schema change despite the same runtime owner Same preferred owner and fields in either order
Replacement disabled or denied One order selects replacement hints while runtime serves the fallback; a synthetic fallback secret is visible Fallback schema matches runtime; its synthetic secret is redacted in both orders
Both plugins explicitly selected Schema uses the last claimant while runtime keeps the first Schema follows the first runtime registration; duplicate diagnostics remain

Additional controls cover an explicit plugin entry combined with a restrictive allowlist, and a config-only entry that must not gain runtime activation. Effective allowlists and authored activation intent remain separate inputs to the existing Gateway policy.

Commands exercised:

node openclaw.mjs config validate --json
node openclaw.mjs config get channels.proofchat --json
node openclaw.mjs gateway run --port <isolated-port> --bind loopback
node openclaw.mjs gateway call config.schema --json
node openclaw.mjs gateway call config.schema.lookup --params '{"path":"channels.proofchat"}' --json
node openclaw.mjs gateway call channels.status --json
node openclaw.mjs gateway call config.get --json

Gateway calls used the isolated server URL and a synthetic local token.

The new owner and redaction regressions failed on baseline production code. Focused and sibling coverage includes metadata, runtime schema, config validation, malformed channel schemas, auto-enable, loader duplicate diagnostics, CLI integration, closer-origin precedence, ineligible workspace claimants, and owner changes within one metadata snapshot.

The UI-facing schema was checked through the real Gateway API; no browser-rendering claim is made.

All 12 real CLI/Gateway cases passed on this exact head. All 487 focused/sibling tests, lint, and the assertion-safety ratchet pass on the new main integration. The earlier config/CLI test-type graph and source-contract checks passed before this mechanical main refresh; fresh CI checks the integrated head.

The integration includes main's Model Providers lazy-copy repair. Its startup payload measures 348,957 bytes and passes the original 350,141-byte enforcement limit. Main also contains a later stored-baseline adjustment, but this repair does not rely on that increase and changes no budget.

Review disposition

The latest ClawSweeper disabled-channel claim is not reproduced. The shared predicate already reaches resolveChannelConfigEnablement before explicit plugin enablement. A real two-order diagnostic with the shared channel disabled confirms neither external plugin starts. With no selected runtime owner, the unchanged catalog fallback chooses the last same-origin schema. Adding another startup gate would not alter that result.

The alternate inactive schema's synthetic canary remains visible under the existing catalog behavior. That pre-existing inactive-catalog ambiguity is a separate policy question; this repair does not merge schemas or sensitivity hints. The proposed extra gate and its matching rank-up test expectation are not applied because the existing transitive gate already enforces channel disablement.

Other review notes:

  • The compatibility correction is intentional and accepted: duplicate channel installations now validate and redact against the plugin already selected by documented activation policy. No activation grant or selection policy changes.
  • Production growth carries the missing source/effective selection context and cache ownership. Existing policy is shared, not duplicated.
  • The stored-data-model warning does not apply: only in-memory metadata projection and cache keys change. No stored representation, database schema, schema version, migration, or protocol changes.

Production: +680/-550, net +130. Tests: +179/-0. Most of the larger diff moves existing activation logic into acyclic leaf modules. The shared auto-enable module is now below the line limit, and its grandfathered exception is removed. Four unnecessary type assertions are removed and the old allowance shrinks accordingly. Catalog-only schema generation retains its existing behavior.

Original contribution by @xydt-juyaohui; maintainer repair is AI-assisted.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@xydt-juyaohui
xydt-juyaohui marked this pull request as ready for review August 29, 2026 17:02
@xydt-juyaohui

Copy link
Copy Markdown
Contributor Author

Closing and reopening to force a clean CI run after the draft-to-ready transition dropped the pull_request CI wave.

@xydt-juyaohui xydt-juyaohui reopened this Aug 29, 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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 1:52 PM ET / 17:52 UTC.

ClawSweeper review

What this changes

This PR makes channel validation, schema output, CLI reads, and system-agent redaction follow the plugin selected to serve a configured channel under preferOver.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 5 items remain

The patch fixes the reported active-channel case, but its new selection path omits the Gateway’s explicit channel-disable gate. An explicitly enabled plugin can still become schema and redaction owner after channels.&lt;id>.enabled=false prevents it from starting, leaving a sensitive alternate schema field unprotected.

Priority: P1
Reviewed head: 8dbbe90628c988debc6c3da66fa9016d85ef1c47

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR has credible real boundary proof and a focused shared-policy direction, but the remaining startup-disablement and redaction defect blocks merge.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The exact-head PR body records baseline-to-repair CLI and real Gateway API cases for preferred, denied, and duplicate owners; those are meaningful after-fix proof for the central issue, but they do not cover the channel-disabled path identified in this review.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The exact-head PR body records baseline-to-repair CLI and real Gateway API cases for preferred, denied, and duplicate owners; those are meaningful after-fix proof for the central issue, but they do not cover the channel-disabled path identified in this review.
Evidence reviewed 5 items Introduced selection omits channel disablement: The new selector filters every manifest through the shared plugin predicate, but does not apply Gateway startup’s preceding check that excludes a channel when all declared channel ids are disabled.
Existing Gateway startup contract: Current main explicitly starts a non-bundled channel plugin from plugins.entries only when it has an enabled manifest channel; its adjacent test requires that the same plugin is not started when channels.<id>.enabled is false.
Redaction consumes selected owner hints: The PR builds system-agent redaction metadata from only the selected channel schema owner; once a channel is known, a secret field from a suppressed alternate owner no longer falls back to unknown-owner redaction.
Findings 1 actionable finding [P1] Honor explicit channel disablement before selecting an owner
Security Needs attention Honor channel disablement before selecting sensitive hints: A known channel bypasses unknown-owner fail-closed redaction. If selection suppresses the alternate plugin solely because an explicitly enabled plugin has the same disabled channel, the alternate plugin’s sensitive-only field can be emitted without its hint.

How this fits together

Channel plugin manifests feed Gateway startup and configuration metadata. That metadata then controls config validation, Gateway and CLI schema output, and which values system-agent commands redact.

flowchart LR
  A[Operator configuration] --> B[Plugin manifests]
  A --> C[Gateway startup plan]
  B --> C
  C --> D[Serving channel owner]
  D --> E[Validation and schema API]
  D --> F[CLI config reads]
  D --> G[System-agent redaction]
Loading

Before merge

  • Honor explicit channel disablement before selecting an owner (P1) - The selector applies canStartConfiguredChannelPlugin to every manifest, but Gateway calls that predicate only after excluding explicitly disabled channels. Therefore an external plugin enabled in plugins.entries can own schema and redaction metadata even when channels.&lt;id>.enabled=false prevents it from starting; with a same-origin alternate claimant, this can suppress that claimant’s sensitive hint. Derive ownership from the full startup-plan decision and cover both registry orders.
  • Resolve security concern: Honor channel disablement before selecting sensitive hints - A known channel bypasses unknown-owner fail-closed redaction. If selection suppresses the alternate plugin solely because an explicitly enabled plugin has the same disabled channel, the alternate plugin’s sensitive-only field can be emitted without its hint.
  • Resolve merge risk (P1) - With two same-origin channel claimants, an explicitly enabled but channel-disabled plugin can suppress the alternate owner’s sensitive hint even though Gateway does not start it; a retained secret in that disabled channel config may then reach system-agent output unredacted.
  • Complete next step (P2) - Align schema-owner selection with Gateway’s explicit channel-disable gate and add validation plus redaction regressions before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P1] Honor explicit channel disablement before selecting an owner — src/config/channel-schema-selection.ts:39-47
  • [medium] Honor channel disablement before selecting sensitive hints — src/config/channel-schema-selection.ts:39
Agent review details

Security

Needs attention: The owner-selection change can omit a sensitive redaction hint for retained configuration of a channel explicitly disabled at startup.

PR surface

Source +130, Tests +179, Other -1. Total +308 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 15 680 550 +130
Tests 2 179 0 +179
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 1 2 -1
Total 19 860 552 +308

Review metrics

Metric Value Why it matters
Production and test delta production +679/-549 (net +130); tests +179/-0 The refactor adds a shared selection path across configuration and startup, so its remaining disabled-channel divergence is material before merge.

Stored data model

Persistent data-model change detected: unknown-data-model-change: src/config/runtime-schema.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #132133
Summary: This PR is the open candidate fix for the configuration-owner divergence tracked by the linked issue, but requires one bounded correction before it can resolve it safely.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Complete startup-owner alignment (recommended)
    Reuse the complete Gateway startup-plan result for schema ownership, then prove a channel-disabled explicit plugin cannot replace another owner’s validation or sensitive hints.

Technical review

Best possible solution:

Derive per-channel schema and redaction ownership from the complete Gateway startup-plan decision, including explicit channel disablement, and add reversed-order validation plus redaction coverage for that disabled-channel case.

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

Yes—source establishes the path: explicitly enable one non-bundled channel plugin, set its shared channel entry to enabled:false, and arrange a same-origin alternate claimant with a sensitive-only field. Gateway’s existing test proves the first plugin does not start, while the new selector still chooses it.

Is this the best way to solve the issue?

No: sharing only the inner eligibility predicate is insufficient because Gateway startup also gates that predicate on channel presence and explicit channel disablement. The complete startup-plan owner decision is the narrower canonical source of truth.

Full review comments:

  • [P1] Honor explicit channel disablement before selecting an owner — src/config/channel-schema-selection.ts:39-47
    The selector applies canStartConfiguredChannelPlugin to every manifest, but Gateway calls that predicate only after excluding explicitly disabled channels. Therefore an external plugin enabled in plugins.entries can own schema and redaction metadata even when channels.&lt;id>.enabled=false prevents it from starting; with a same-origin alternate claimant, this can suppress that claimant’s sensitive hint. Derive ownership from the full startup-plan decision and cover both registry orders.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add merge-risk: 🚨 security-boundary: The changed redaction-owner selection can omit a sensitive hint for retained disabled-channel configuration.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The exact-head PR body records baseline-to-repair CLI and real Gateway API cases for preferred, denied, and duplicate owners; those are meaningful after-fix proof for the central issue, but they do not cover the channel-disabled path identified in this review.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P1: The patch leaves a concrete configuration and redaction mismatch on a supported explicit external-channel startup path.
  • merge-risk: 🚨 compatibility: Existing installations that explicitly disable a channel can receive schema ownership different from the Gateway’s actual activation decision.
  • merge-risk: 🚨 security-boundary: The changed redaction-owner selection can omit a sensitive hint for retained disabled-channel configuration.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The exact-head PR body records baseline-to-repair CLI and real Gateway API cases for preferred, denied, and duplicate owners; those are meaningful after-fix proof for the central issue, but they do not cover the channel-disabled path identified in this review.
  • proof: sufficient: Contributor real behavior proof is sufficient. The exact-head PR body records baseline-to-repair CLI and real Gateway API cases for preferred, denied, and duplicate owners; those are meaningful after-fix proof for the central issue, but they do not cover the channel-disabled path identified in this review.

Evidence

Security concerns:

  • [medium] Honor channel disablement before selecting sensitive hints — src/config/channel-schema-selection.ts:39
    A known channel bypasses unknown-owner fail-closed redaction. If selection suppresses the alternate plugin solely because an explicitly enabled plugin has the same disabled channel, the alternate plugin’s sensitive-only field can be emitted without its hint.
    Confidence: 0.9

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/config/runtime-schema.test.ts.
  • [P1] node scripts/run-vitest.mjs src/system-agent/config-redaction.test.ts.
  • [P1] node scripts/run-vitest.mjs src/plugins/channel-plugin-ids.test.ts.
  • [P1] node scripts/check-changed.mjs -- src/config/channel-schema-selection.ts src/config/runtime-schema.test.ts src/system-agent/config-redaction.ts src/system-agent/config-redaction.test.ts src/plugins/channel-startup-policy.ts.

What I checked:

  • Introduced selection omits channel disablement: The new selector filters every manifest through the shared plugin predicate, but does not apply Gateway startup’s preceding check that excludes a channel when all declared channel ids are disabled. (src/config/channel-schema-selection.ts:39, 8dbbe90628c9)
  • Existing Gateway startup contract: Current main explicitly starts a non-bundled channel plugin from plugins.entries only when it has an enabled manifest channel; its adjacent test requires that the same plugin is not started when channels.<id>.enabled is false. (src/plugins/channel-plugin-ids.test.ts:1148, 606d9ab82afd)
  • Redaction consumes selected owner hints: The PR builds system-agent redaction metadata from only the selected channel schema owner; once a channel is known, a secret field from a suppressed alternate owner no longer falls back to unknown-owner redaction. (src/system-agent/config-redaction.ts:98, 8dbbe90628c9)
  • Current main still lacks the requested alignment: Current main builds runtime channel metadata directly from the registry without configuration-aware owner selection, so the central issue remains necessary. (src/config/runtime-schema.ts:21, 606d9ab82afd)
  • Feature-history routing: Current-main history identifies the explicit non-bundled channel startup behavior as a recent plugin activation change by Peter Steinberger. (src/plugins/gateway-startup-plugin-plan.ts:153, a220e67a929e)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Derive schema selection from the complete Gateway startup decision, including explicit channel disablement.
  • Add reversed-registry-order validation and system-agent redaction regression coverage for an explicitly enabled external plugin whose channel is disabled.

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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-08-29T17:23:53.603Z sha 40b4acddedde41e8eb8ce3e66b0e7fb7ff474522 :: needs real behavior proof before merge. :: [P1] Preserve preferred-owner state through the channel pass | [P1] Import PluginManifestRegistry for the new test casts
  • reviewed 2026-08-29T17:35:26.698Z sha f02905834a81a262efc2ddcbf5455f171bed5e80 :: needs real behavior proof before merge. :: [P1] Honor disabled preferred-plugin fallback in schema ownership
  • reviewed 2026-08-29T17:48:39.961Z sha 287a452 :: needs real behavior proof before merge. :: [P1] Respect disabled and denied replacement fallback
  • reviewed 2026-09-04T15:59:16.800Z sha 0bdbe90 :: blocked before merge. :: none
  • reviewed 2026-09-04T16:43:22.883Z sha 697e1d3 :: blocked before merge. :: none

@xydt-juyaohui
xydt-juyaohui force-pushed the fix/config-channel-schema-ownership-prefer-over branch from 40b4acd to f029058 Compare August 29, 2026 17:27
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Aug 29, 2026
When two same-origin plugins claim the same channel, channel schema ownership
was decided by registry iteration order (last wins), so a plugin displaced by
a sibling's declared preferOver could still own the channel and validate the
running replacement against the wrong schema keys.

Honor replacement precedence at equal origin: a claimant another plugin lists
in its channel preferOver is displaced and must not publish its schema, mirroring
shouldSkipPreferredPluginAutoEnable. Ambiguous or absent declarations keep the
existing deterministic last-wins overwrite.

Fixes openclaw#132133
@xydt-juyaohui
xydt-juyaohui force-pushed the fix/config-channel-schema-ownership-prefer-over branch from f029058 to 287a452 Compare August 29, 2026 17:42
@xydt-juyaohui

Copy link
Copy Markdown
Contributor Author

CI status

All checks touched by this change are green on the latest head (287a4526a7). In the most recent run, 82 jobs passed and the only failure was checks-node-compact-large-19, which is unrelated to this diff:

  • checks-node-compact-small-18 (this PR's new tests in channel-config-metadata.test.ts) — pass
  • check-lint / oxfmt — pass
  • check-test-types-core-3 / check-prod-types — pass
  • build-artifacts — pass

The sole remaining failure is the vitest ownership audit test/vitest-projects-config.test.ts:

expected [ Array(1) ] to strictly equal []
Received: [ "extensions/codex/src/app-server/run-attempt.channel-tool-progress.test.ts" ]

This is a pre-existing regression inherited from main (fix(codex): restore configured channel tool progress added run-attempt.channel-tool-progress.test.ts without registering it in a full-suite vitest shard). It is not caused by this PR:

  • This branch's diff is exactly two files, both under src/config/ — it does not touch extensions/codex/ or any vitest shard config.
  • The flagged file is tracked on upstream/main itself and appears regardless of this branch.
  • The audit globs every **/*.test.ts on disk and reports any file not covered by a full-suite shard; that codex file is not referenced by any shard config.

Happy to help land a separate fix for the codex shard registration if maintainers want one; it is out of scope for this config-ownership change.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: M and removed size: S labels Sep 4, 2026
@obviyus

obviyus commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

Repaired and tested at 0bdbe90c9ee7917408508fa4d6171928c1c4fc4e.

The updated body records real CLI and Gateway red/green proof in both discovery orders, including disabled and denied replacements, explicit dual-selection, and serving-owner sensitive canaries. Schema selection now reuses the existing channel-candidate materializer and scoped owner eligibility. It does not execute plugin setup probes.

The prior fallback/redaction finding and duplicate-policy concern are addressed. The persistent-data warning does not apply: there is no stored schema or migration change.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 4, 2026
@obviyus

obviyus commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

New tested head: 697e1d39cba6dcab7a8a0cbe2e70a05b6c51f275.

This also fixes the static-import CI failure by moving existing candidate/materialization logic into leaf modules. A further real allowlist control found that setup-import eligibility was not identical to Gateway startup; schema selection now shares the Gateway's existing predicate directly.

All 12 real CLI/Gateway cases pass, including restrictive allowlists with explicit entries and a config-only negative control. There are 487 passing focused/sibling tests, clean lint, and zero cycles in both import checks. Runtime grants, operator settings, stored schemas, and protocols are unchanged. The updated body records the full scope and production/test deltas.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Sep 4, 2026
@obviyus

obviyus commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

The repair is verified at 8dbbe90628c988debc6c3da66fa9016d85ef1c47: all 12 real CLI/Gateway cases and fresh independent review pass.

CI run 33898744434 finished with one failed child, control-ui-performance. The previous source-contract, assertion-ratchet, test-type, and two test-job failures all pass.

The remaining check is inherited:

  • The PR's UI startup payload measured 350,408 bytes against the 350,141-byte limit.
  • An isolated build of the exact CI base, ab7cbd81203a65ceed542d9829015b52694ff5b0, also fails: 350,342 bytes against the same limit.
  • That separate base measurement used Node 24.20.0; CI used 24.19.0. It is base-source reproduction, not a passing or matching main CI run.
  • This PR changes neither UI code nor the performance budget.

Named follow-up: restore the main Control UI startup budget. The guarded merge tool does not support an unrelated-red exception for this standalone budget check, so no merge or CI bypass was attempted. The repair, proof, and review remain retained.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@obviyus

obviyus commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

The disabled-channel finding does not reproduce on the reviewed head 8dbbe90628c988debc6c3da66fa9016d85ef1c47.

The shared predicate already reaches the disable gate:

  • src/plugins/channel-startup-policy.ts:51 calls the effective activation owner with the manifest channel IDs.
  • src/plugins/config-activation-shared.ts:185 checks channel disablement before explicit plugin enablement.
  • src/plugins/config-normalization-shared.ts:263 rejects an owner when all its declared channels are disabled, while preserving enabled or unspecified sibling channels.

I also ran the real CLI/Gateway fixture with channels.proofchat.enabled=false, only the preferred external plugin explicitly enabled, and both discovery orders. Neither plugin starts: channels.status has no channel entries in both cases.

With no selected runtime owner, metadata uses the pre-existing catalog path. Plus-first selects the legacy schema and redacts the legacy canary; core-first selects the preferred schema and redacts the preferred canary. The other inactive schema's canary remains visible in each order. Adding the proposed outer startup check changes neither result.

The inactive-catalog ambiguity is therefore retained existing behavior, not introduced explicit-plugin suppression. It needs a separate ownership/redaction policy decision; this repair does not merge schemas or hints. Disabled-plugin metadata itself is intentional in the plugin architecture.

Disposition: the proposed gate change and its matching rank-up test expectation are not applied because the gate is already enforced transitively. The complete source and real diagnostic capture are included in fresh independent review. No stored representation, database schema, migration, or protocol changes exist.

@obviyus
obviyus merged commit 3fa8cf3 into openclaw:main Sep 4, 2026
208 of 209 checks passed
@obviyus

obviyus commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks @xydt-juyaohui!

Landed as 3fa8cf3ccb23. Fresh exact-head independent review and CI run 33908595783 passed.

Proof: All 12 real CLI/Gateway cases passed on the tested head. All 487 focused tests, lint, and assertion guards passed. The integrated UI measures 348,957 bytes and passes the original 350,141-byte startup limit.

  • Bug: Validation, published schema, and sensitive-field hints could belong to a plugin other than the one serving the channel.
  • Fix: Metadata selection now shares the existing Gateway activation policy and keeps each owner's schema, labels, and redaction hints together.
Before After
Discovery order could reject the preferred plugin's fields or expose its synthetic sensitive value Both discovery orders use the serving owner's schema and redact its sensitive values
Disabled, denied, or explicitly duplicated plugins could disagree with schema ownership Fallback and explicit dual-selection follow the actual runtime owner

No operator setting, runtime grant, selection policy, stored schema, migration, or protocol changed. The repair is AI-assisted.

The disabled-channel review claim was checked against the transitive disable gate and real two-order CLI/Gateway evidence; the disposition is recorded here. Existing inactive-catalog behavior remains unchanged.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
…enclaw#132729)

Keep channel validation, Gateway schema output, and config redaction aligned with the channel owner selected by existing activation policy.

Reuse auto-enable and the existing Gateway channel-startup predicate, preserve explicit dual-selection and install-origin precedence, and bind sensitive-hint caching to configuration snapshots.

Real CLI and Gateway proof covers both discovery orders, disabled and denied replacements, duplicate registration, and synthetic sensitive values. Regression and sibling tests cover metadata consumers and owner changes within the same inventory.

Fixes openclaw#132133.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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.

[Bug]: config validate rejects channel keys the plugin actually serving the channel accepts

2 participants