Skip to content

fix(config): ignore empty plugin defaults when widening allowlists - #192380

Merged
RomneyDa merged 2 commits into
mainfrom
fix/forward-port-1010-config
Nov 5, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
fix/forward-port-1010-config

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Problem

Validation-generated empty plugin config objects can widen a restrictive plugin allowlist.

Solution

Treat only nonempty config objects as material operator configuration; retain explicit enabled and other material settings.

Independent split of #191830, directly against main; no sibling PR is required. Original release provenance is preserved in commit bodies. Scope excludes every other forward-port group.

Evidence

  • Original combined-branch evidence: plugin auto-enable 125 tests passed; regression failed without the fix.
  • Product/test changes cherry-picked cleanly; original evidence is retained evidence, not a new split-head run.
  • Fresh node scripts/run-vitest.mjs src/config/config.plugin-validation.test.ts --maxWorkers=1: 53/53 passed. Initial worktree runs failed dependency setup before tests; restoring matching package-local dependency links resolved that setup failure.
  • Fresh changed-file formatting, targeted oxlint --type-aware, and git diff --check: passed.
  • Local ClawSweeper committed-range review against main 34007820fa2c: complete, no actionable findings.
  • Full lint/type declaration preparation refused this worktree’s shared dependency install; no bypass used. Broad type/build proof remains with PR CI.
  • Test growth is exactly offset by this PR’s scoped allocation; the selected main base has an inherited 47-line ratchet deficit.
  • Broad type/build/CI coverage is delegated to PR CI.

Reviewed candidate: 183deb854e940299d60dd4044d6de72bcd25df92.

Split CI status

  • Observed CI failure is inherited from main 34007820fa2c: missing McpCatalogTool export in mcp-metadata.ts and consequent optional UI metadata errors. That file and agent-bundle-mcp-materialize.ts / agent-bundle-mcp-types.ts are byte-identical to the base; SDK declaration preparation propagates the same error into build/boundary/lint lanes.
  • Test-line ratchet retains the pre-split 47-line deficit: baseline total 6,444,916 versus ceiling 6,444,869. This split’s dedicated allocation covers its exact positive test-line delta; inflating it would violate the allocation checker.
  • Ready for review does not mean green CI or ready to merge. Remaining broad checks are still running; no merge requested.

Exact-head CI attribution audit

Audited 2026-11-04 at 183deb854e940299d60dd4044d6de72bcd25df92. Failed job logs were inspected individually, not inferred from their names.

The MCP failures are inherited from base 34007820fa2c: src/agents/mcp-metadata.ts, agent-bundle-mcp-materialize.ts, and agent-bundle-mcp-types.ts have identical Git blob IDs at base and PR head. The missing McpCatalogTool export and consequent optional-property errors propagate through SDK declarations into boundary/build/lint/type lanes.

The test-line ratchet is also inherited: this PR offsets its exact positive test-line delta, and its job still exceeds the adjusted ceiling by the same 47 lines already present at base (6,444,916 vs 6,444,869). No baseline increase or unrelated repair is included.

Failed check Attribution
checks-fast-baseline-ratchets Inherited 47-line test-budget deficit
check-additional-extension-package-boundary Inherited MCP declaration/type failure
check-prod-types Inherited MCP declaration/type failure
check-test-types Inherited MCP declaration/type failure
check-test-types-core-1 Inherited MCP declaration/type failure
check-test-types-core-2 Inherited MCP declaration/type failure
check-test-types-core-3 Inherited MCP declaration/type failure
check-test-types-core-4 Inherited MCP declaration/type failure
check-test-types-core-5 Inherited MCP declaration/type failure
openclaw/ci-gate Aggregate of failed or downstream-skipped prerequisite jobs above; not an independent runtime failure
openclaw/ci-gate Aggregate of failed or downstream-skipped prerequisite jobs above; not an independent runtime failure

Cancelled dispatch jobs are orchestration cancellations, not passing tests or additional source defects. CI remains red; this section explains the failures rather than claiming green.

Rebase onto current main

Rebased onto a1f99240c8367a0e012b401bed71831a3cc65026, including merged Goal-test correction #192387. New candidate: cba2e09ac6dfd857eba03d6a1e18ded68c24c135. This PR still targets main independently.

Verified the complete rebased tree equals the previous PR patch integrated with that main snapshot. No new behavior was added during rebase. Prior test and CI attribution sections remain evidence for their named old revisions; fresh CI on this head is pending, not claimed green.

@clawsweeper

clawsweeper Bot commented Nov 3, 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.

@RomneyDa
RomneyDa marked this pull request as ready for review November 3, 2026 23:36
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR prevents empty plugin config defaults from widening restrictive plugin allowlists.

Example: Validation adds memory-core.config: {} when plugins.allow is ["codex"].

  • Before: Reapplying plugin auto-enable appends memory-core to the allowlist.
  • After: The empty config object leaves the restrictive allowlist intact.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, minimal repair with a relevant regression and no identified patch defect; upgrade compatibility and broad CI validation remain unsettled.
Proof confidence 🦐 gold shrimp (3/6) Maintainer authorship exempts ordinary contributor proof; however, the previous upgrade request remains unresolved: supplied tests exercise validation followed by activation, but no fresh-install or latest-stable upgrade reload demonstrates preservation of existing plugin settings.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Reloading validated configuration can unexpectedly expand a restrictive plugin allowlist and alter the available tools.
Reason: The maintainer-authored direction restores operator intent with a narrow predicate change and no new configuration surface.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this maintainer-authored PR provides a minimal correction for a current-main allowlist bug, with no actionable correctness findings.

Priority: P2
Reviewed head: 183deb854e940299d60dd4044d6de72bcd25df92

Before merge

  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Show fresh-install and latest-stable-to-candidate reload behavior preserving the restrictive allowlist and authored plugin settings.
Agent review details

How this fits together

Config validation materializes plugin defaults; runtime loading reapplies auto-enable policy to produce the effective plugin configuration.

flowchart LR
  A[Authored configuration] --> B[Plugin validation]
  B --> C[Configuration with defaults]
  C --> D[Runtime load context]
  D --> E[Auto-enable policy]
  E --> F[Effective plugin configuration]
Loading

Technical review

Best possible solution:

Keep the existing material-config owner and exclude empty config objects while preserving explicit enablement, nonempty settings, and deny rules.

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

Validation, runtime loading, and the added regression establish the empty-default-to-allowlist path; no target code was executed during this review.

Is this the best way to solve the issue?

The predicate correction is the smallest complete fix using the existing owner: defaults remain available without an empty object implying operator selection.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 44eaed3d95d7.

Provenance checked

  • Material plugin configuration and explicit selection changes intended behavior with a stated reason (3fa8cf3: This commit extracted existing activation policy to align channel metadata with the serving owner and preserve explicit selection; it does not establish the predicate's earliest origin.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • juyaohuidt: Raw commit 3fa8cf3 adds src/config/plugin-auto-enable.materialize.ts:192 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3fa8cf3ccb23; files: src/config/plugin-auto-enable.materialize.ts)
  • Masato Hoshino: Raw commit 88b56ee adds src/config/plugin-auto-enable.materialize.ts:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 88b56eea62be; files: src/config/plugin-auto-enable.materialize.ts)

PR surface

Source +2, Tests +14, Other +2. Total +18 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 1 +2
Tests 1 14 0 +14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 3 19 1 +18

Labels

Label changes:

  • add P2: Repeated activation can silently expand a restrictive plugin allowlist and change the effective tool surface; the repair is focused and has limited scope.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: Repeated activation can silently expand a restrictive plugin allowlist and change the effective tool surface; the repair is focused and has limited scope.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-04T00:00:46.874Z sha 183deb8 :: blocked before merge. :: none

Reviewed November 4, 2026, 5:10 PM ET / 22:10 UTC (Revision 2).

@RomneyDa

RomneyDa commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
…ists

Validation materializes an empty config object for enabled plugins such as
the default memory slot (memory-core). Runtime plugin load contexts re-run
auto-enable on that runtime config, and the configured-entry allowlist
pass treated the empty object as operator config, appending memory-core to
a restrictive plugins.allow after any hot reload (for example
models.authSetApiKey). The Codex thread's dynamic tool catalog then changed
and the session rotated to a new native thread. An empty config object is
not material operator configuration.

Forward-port of cc9ab3d from release/2026.10.10.
@RomneyDa
RomneyDa force-pushed the fix/forward-port-1010-config branch from 183deb8 to cba2e09 Compare November 5, 2026 01:49
@RomneyDa
RomneyDa merged commit 2cd45a3 into main Nov 5, 2026
120 checks passed
@RomneyDa
RomneyDa deleted the fix/forward-port-1010-config branch November 5, 2026 02:59
RomneyDa added a commit that referenced this pull request Nov 5, 2026
Carry the final reviewed changes from #191830, #192378, #192379,
#192380, #192383, #192385, and #192386. Preserve #191838's existing
file-transfer import fix. Adapt Gateway readiness to the release owner
and include the narrow SQLite cold-admission prerequisite from #192586.

Do not carry #192387: its Goal expectation depends on main-only
Stop-to-paused behavior absent from this release.

Retain regression allocations without changing the shared baseline.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
…penclaw#192380)

* fix(config): ignore empty default plugin entries when widening allowlists

Validation materializes an empty config object for enabled plugins such as
the default memory slot (memory-core). Runtime plugin load contexts re-run
auto-enable on that runtime config, and the configured-entry allowlist
pass treated the empty object as operator config, appending memory-core to
a restrictive plugins.allow after any hot reload (for example
models.authSetApiKey). The Codex thread's dynamic tool catalog then changed
and the session rotated to a new native thread. An empty config object is
not material operator configuration.

Forward-port of cc9ab3d from release/2026.10.10.

* test(ci): scope plugin config forward-port regression allocation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant