Skip to content

fix: preserve channel plugin access across updates - #116540

Merged
fuller-stack-dev merged 3 commits into
mainfrom
codex/fix-channel-plugin-auto-enable-readiness
Jul 30, 2026
Merged

fuller-stack-dev merged 3 commits into
mainfrom
codex/fix-channel-plugin-auto-enable-readiness

Conversation

@fuller-stack-dev

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where users with an already configured external channel plugin could lose channel access after an update when plugins.entries.<id>.config already existed but did not contain enabled=true.

The update/doctor auto-enable pass treated the plugin entry as sufficient reason to inspect manifests, but discarded the configured channel IDs before resolving their owning plugins. The gateway then refused to rely on the installed external plugin without explicit persisted trust.

Why This Change Was Made

The readiness pass now collects configured channel IDs once and preserves them through the existing plugin-config and material-allowlist shortcuts. This keeps the external-plugin trust boundary intact: configured owners are still persisted through the existing auto-enable/doctor path, while global disable and explicit per-plugin disable remain authoritative.

User Impact

Existing users who already configured a channel and installed its owning plugin keep access across updates without manually adding a new enable flag. Operators who explicitly disabled a plugin or all plugins remain opted out.

Evidence

  • Exact-head red reproduction on b907309b35754e25aa15a309ce6cf63875267c71: configured Discord plus an existing empty plugin config produced no channel-owner candidate. Testbox run
  • Focused green proof: plugin-auto-enable.core.test.ts and plugin-auto-enable.channels.test.ts, 73/73 tests passed. Testbox run
  • Changed-surface gate passed formatting, guards, production/test typechecks, lint, dependency/boundary checks, dead-export scan, and import-cycle checks. Testbox run
  • Live Rosita upgrade proof from an OCM-built package runtime:
    • openclaw doctor --fix persisted Discord configured, enabled automatically.
    • /healthz and /readyz passed after two restarts.
    • Discord inspected as explicitlyEnabled=true, activated=true, and status=loaded.
    • Both configured Discord accounts reconnected with no channel error.
  • Source-blind negative control preserved plugins.entries.discord.enabled=false before and after doctor in an isolated OCM clone; the focused regression also covers explicit disable with installed owner metadata.
  • Autoreview: clean, no accepted/actionable findings (gpt-5.6-sol, high reasoning).

AI-assisted: yes. The change and evidence were verified by the author. No agent transcript is included.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 30, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Jul 30, 2026
@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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 4:38 PM ET / 20:38 UTC.

ClawSweeper review

What this changes

The PR retains configured channel IDs during plugin auto-enable readiness so the existing doctor/update path can persistently enable the installed external plugin that owns an already configured channel.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

This is a narrow, current-base repair for a P1 upgrade regression: configured external channel plugins can lose access after doctor/update when their plugin entry already has an empty config object. The patch preserves the configured-channel evidence through the existing readiness shortcuts, and its supplied package-runtime upgrade proof plus focused regressions support the approach; because this is a member-authored PR with the maintainer label, it needs an explicit maintainer merge decision rather than automated cleanup.

Priority: P1
Reviewed head: a0827413622a9e818210f02b13f43f6996d20314
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrowly scoped regression repair with strong real upgrade proof and focused coverage; the remaining gate is maintainer acceptance of the intended upgrade-time persistence behavior.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides after-fix package-runtime upgrade evidence, restart health checks, loaded-channel inspection, reconnection results, and an explicit-disable negative control.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides after-fix package-runtime upgrade evidence, restart health checks, loaded-channel inspection, reconnection results, and an explicit-disable negative control.
Evidence reviewed 4 items Current patch preserves readiness evidence: The changed readiness function still exits before collection when plugins are globally disabled, but now collects configured channel IDs before the material allowlist and existing plugin-config shortcuts so those shortcuts no longer discard channel-owner candidates.
Focused regression coverage: The PR adds coverage for an already-present empty plugin config entry and for a material allowlist, asserting that the configured Discord owner remains an auto-enable candidate and is persisted as enabled.
Prior review continuity: The previous ClawSweeper review requested a rebase and current-main validation of disable protections. The head includes a merge of current main SHA a079d79, and the PR body reports an explicit-disable negative control plus focused regression proof.
Findings None None.
Security None None.

How this fits together

Plugin auto-enable is the configuration readiness step used by doctor/update to decide whether an installed plugin should be persisted as enabled. It reads channel configuration and plugin manifests, then hands the resulting persisted trust state to the gateway so configured channels can load after an upgrade.

flowchart LR
  A[Saved channel configuration] --> B[Plugin readiness check]
  C[Global plugin disable] --> D[Stop auto-enable]
  B --> E[Configured channel IDs]
  F[Installed plugin manifests] --> G[Resolve channel owner]
  E --> G
  G --> H[Doctor/update persists enablement]
  H --> I[Gateway loads configured channel plugin]
Loading

Decision needed

Question Recommendation
Should the existing doctor/update policy persistently enable an installed external plugin when it owns an already configured channel but its plugin entry currently contains only an empty config object? Accept configured-channel enablement: Merge after required checks complete, accepting that an installed owner of an existing configured channel is eligible for the established doctor/update persistence path.

Why: The implementation is narrow and proof-positive, but it deliberately changes persisted enablement during upgrades; the PR is also member-authored and carries the protected maintainer label, so this acceptance belongs to a human maintainer.

Before merge

  • Resolve merge risk (P1) - Merging intentionally changes upgrade-time persistence: an installed plugin that owns an already configured channel can now be written as enabled during doctor/update. That is the reported repair, but it is a compatibility decision maintainers should accept explicitly after the remaining required checks complete.
Agent review details

Security

None.

PR surface

Source 0, Tests +48. Total +48 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 3 0
Tests 1 49 1 +48
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 52 4 +48

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Accept the repaired upgrade behavior (recommended)
    Merge once required checks finish if maintainers agree that configured channels should retain access by enabling their installed owner through the existing doctor/update path.
  2. Pause for policy narrowing
    Hold the PR if maintainers want configured channel ownership to require additional explicit opt-in before persistence changes an installed plugin's enabled state.

Technical review

Best possible solution:

Keep the existing trust model and land this bounded readiness fix if maintainers accept configured-channel ownership as sufficient evidence for the existing doctor/update enablement path, with global and explicit per-plugin disable remaining authoritative.

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

Yes—source inspection establishes the failing decision path: the two readiness shortcuts previously returned no configured channel IDs, and the supplied focused regression covers both shortcuts. The PR body also reports an exact-head package-runtime reproduction before the repair.

Is this the best way to solve the issue?

Yes—the change restores already-collected configuration evidence at the readiness boundary rather than weakening the gateway trust boundary or adding new configuration. The preserved global-disable early return and supplied explicit-disable control make this narrower than a new fallback path.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: A configured external channel can become unavailable after an update, interrupting an established agent/channel workflow for affected operators.
  • merge-risk: 🚨 compatibility: The repair intentionally changes doctor/update persistence for existing configured plugin owners, so upgrade semantics need maintainer acceptance.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix package-runtime upgrade evidence, restart health checks, loaded-channel inspection, reconnection results, and an explicit-disable negative control.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix package-runtime upgrade evidence, restart health checks, loaded-channel inspection, reconnection results, and an explicit-disable negative control.

Evidence

What I checked:

  • Current patch preserves readiness evidence: The changed readiness function still exits before collection when plugins are globally disabled, but now collects configured channel IDs before the material allowlist and existing plugin-config shortcuts so those shortcuts no longer discard channel-owner candidates. (src/config/plugin-auto-enable.shared.ts:573, a0827413622a)
  • Focused regression coverage: The PR adds coverage for an already-present empty plugin config entry and for a material allowlist, asserting that the configured Discord owner remains an auto-enable candidate and is persisted as enabled. (src/config/plugin-auto-enable.core.test.ts:111, a0827413622a)
  • Prior review continuity: The previous ClawSweeper review requested a rebase and current-main validation of disable protections. The head includes a merge of current main SHA a079d79, and the PR body reports an explicit-disable negative control plus focused regression proof. (src/config/plugin-auto-enable.shared.ts:573, a0827413622a)
  • Real upgrade behavior proof: The PR body reports a package-runtime upgrade run where openclaw doctor --fix persisted the configured Discord owner, both configured accounts reconnected, and health endpoints passed after restarts. (a0827413622a)

Likely related people:

  • fuller-stack-dev: Authored the three commits on this PR, including the current-base merge, and is assigned on the PR; no stronger current-main feature-history owner was available in the supplied review evidence. (role: current configuration-path contributor and assigned reviewer; confidence: medium; commits: b03ed0367d5b, 935741f4fc89, a0827413622a; files: src/config/plugin-auto-enable.shared.ts, src/config/plugin-auto-enable.core.test.ts)

Rank-up moves

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

  • Obtain explicit maintainer acceptance of the configured-channel enablement policy after required checks finish.

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 (1 earlier review cycle)
  • reviewed 2026-07-30T19:58:40.584Z sha b03ed03 :: needs maintainer review before merge. :: none

@fuller-stack-dev
fuller-stack-dev merged commit c094667 into main Jul 30, 2026
122 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the codex/fix-channel-plugin-auto-enable-readiness branch July 30, 2026 20:48
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant