Repository navigation
fix: preserve channel plugin access across updates - #116540
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 4:38 PM ET / 20:38 UTC. ClawSweeper reviewWhat this changesThe 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 readinessThis 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 Priority: P1 Review scores
Verification
How this fits togetherPlugin 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]
Decision needed
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 Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +48. Total +48 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel 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
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
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>.configalready existed but did not containenabled=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
b907309b35754e25aa15a309ce6cf63875267c71: configured Discord plus an existing empty plugin config produced no channel-owner candidate. Testbox runplugin-auto-enable.core.test.tsandplugin-auto-enable.channels.test.ts, 73/73 tests passed. Testbox runopenclaw doctor --fixpersistedDiscord configured, enabled automatically./healthzand/readyzpassed after two restarts.explicitlyEnabled=true,activated=true, andstatus=loaded.plugins.entries.discord.enabled=falsebefore and after doctor in an isolated OCM clone; the focused regression also covers explicit disable with installed owner metadata.gpt-5.6-sol, high reasoning).AI-assisted: yes. The change and evidence were verified by the author. No agent transcript is included.