Repository navigation
fix(plugins): keep channels authoritative after activation rollback - #129232
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 6:52 AM ET / 10:52 UTC. ClawSweeper reviewWhat this changesThe PR makes failed plugin-registry activation rollback restore the previous registry without reminting its lifecycle epoch, preserving retained bundled-channel provenance. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open. This active maintainer-labelled PR is the canonical repair for the linked regression; current main still remints the restored registry epoch, while the branch preserves it only on failed staging. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherPlugin activation temporarily stages a replacement registry before committing it. Bundled channel runtimes retain an epoch from the active registry; that epoch controls whether their ingress and invoker provenance can be attached to the next channel context. flowchart LR
A[Active plugin registry] --> B[Stage replacement registry]
B --> C{Activation succeeds?}
C -->|Yes| D[Retire prior epoch]
D --> E[Old channel closures rejected]
C -->|No| F[Rollback prior registry]
F --> G[Retained channel provenance stays live]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +30. Total +30 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep rollback as the sole caller of the no-reactivation path, preserve ordinary activation for genuine replacement, and land the focused lifecycle regression coverage with the PR. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s restore call reaches an unconditional activation that remints the captured epoch; the changed regression test models a failed activation followed by a successful replacement. Is this the best way to solve the issue? Yes. The branch repairs the lifecycle owner rather than masking lost provenance downstream, and preserves the distinct retirement behavior for successful replacement. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f830b8c1590b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
* origin/main: (26 commits) fix(plugins): preserve registry epoch on activation rollback (#129232) refactor(plugins): make discovery invocation-owned (#130486) feat(ui): save appearance preferences per user profile (#130340) fix: Buzz bots recover relay stalls and reject revoked senders (#130467) fix(code-mode): serialize catalog handles nested in final values (#130276) fix(webchat): CLI skill and harness-injected turns render as operator-sent messages (#130427) fix(agents): read the published model catalog owner from session_status (#130277) fix(channels): preserve long presentation text (#130368) fix(agents): route CLI bootstrap truncation notice into the system prompt (#130325) refactor(plugins): unify setup registration and artifact selection (#130474) fix(memory): prevent forgotten session content from returning (#130451) refactor(outbound): consolidate transport completion (#130460) fix(workers): protect in-flight workspace manifests from concurrent retention (#130449) fix(portals): keep worker previews reachable and owned by the active environment (#130434) fix(config): keep core channels keys in the generated config schema (#120736) chore(deps): refresh dependencies after seven-day cooldown (#130296) fix(agents): remind exec models to quote shell metacharacters (#125485) fix(auth): honor shared-store ownership in temp-state exec and agent deletion (#130437) fix(openshell): preserve file writes during concurrent mirror commands (#130447) fix(workers): report full nodes as at capacity, not offline (#130445) ...
|
Post-merge real-behavior proof passed on the same Blacksmith Testbox lease Using detached worktrees and isolated Command: Result: |
Closes #127393
What Problem This Solves
Fixes an issue where running bundled channels lost trusted ingress and invoker provenance after a candidate plugin registry failed to activate. Although OpenClaw restored the prior registry object, its existing channel runtimes were no longer recognized as live until restart recovery.
Why This Change Was Made
Failed pre-commit activation now uses a rollback-specific registry operation that preserves the prior committed lifecycle epoch because staging never retired it. Successful replacement and genuine later reactivation retain their existing behavior: they retire old authority and mint a fresh epoch.
This adds no config, protocol, plugin SDK, or database surface.
User Impact
Running bundled channels remain authoritative through a failed plugin activation rollback instead of temporarily degrading provenance to unknown. A later successful replacement still revokes the old channel authority.
Evidence
expected false to be true).mise exec -- node scripts/run-vitest.mjs src/plugins/loader.test.ts src/plugins/registry-runtime.channel-ingress.test.tstbx_01m0w5h6w9axgfr8kxjje3v13c:pnpm buildpassed in 6m20s (run).tbx_01m10a0a1s8j0hdt80rr3ss6d3: detached baseline33e556fe8a2331d2deff610508b45c1d28df5a01degraded retained channel ingress/invoker authority frompresenttounknownafter failed activation; detached merged head2056b13ace89cbfa993ff7427b9b00f56ce50adekept bothpresent, including a subsequent real QA-channel turn, while successful replacement revoked both tounknown. Both scenarios passed through real ephemeral Gateways and operator CLI calls; isolated state, detached worktrees, and remote artifacts were cleaned (run).