Repository navigation
fix(update): chat /update from a configured owner fails post-install Doctor while channel plugins await migration - #190433
Conversation
…it Doctor A chat /update from an owner listed in commands.ownerAllowFrom could fail the post-install Doctor with authority-check-failed (#178291, reldubnix's case). The delegated requester check loads configured channel plugins with throwOnLoadError, and a channel plugin whose state migration is still pending is held back until Doctor runs it. Doctor's own authority check therefore failed before Doctor could run the migration that would unblock it. The requester check now tolerates a load failure made only of pending plugin state migrations. Owner matching then resolves a prefixed entry such as telegram:<id> through bundled channel metadata instead of the loaded plugin. Every other load failure still fails the check, unlisted or removed owners still fail, and policy is reread on every check.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR permits configured-owner authorization while channel plugins await Doctor migrations and resolves unloaded bundled-channel prefixes from metadata. Example: Telegram sender 123456789 invokes /update with commands.ownerAllowFrom set to ["telegram:123456789"] while Telegram awaits a state migration.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this maintainer-authored PR open: it addresses a source-verifiable configured-owner update failure that remains on main, with no definite introduced code defect identified. Priority: P0 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherChat updates carry requester identity into the installed candidate's Doctor, which checks current owner policy before maintenance, configuration changes, and child-process effects. flowchart TD
A[Chat update requester] --> B[Delegated Doctor]
B --> C[Requester authority]
C --> D[Configured channel loader]
D --> E[Pending migration classification]
C --> F[Current owner configuration]
F --> G[Doctor effects]
Technical reviewBest possible solution: Keep the narrow repair in the existing loader and authorization owners, with chat upgrades completing Doctor automatically while current owner policy remains authoritative. Do we have a high-confidence way to reproduce the issue? Source shows the circular dependency between strict configured-channel loading and Doctor-owned migrations; the author reports a base-failing regression, but this review executed no target code. Is this the best way to solve the issue? The patch is a small repair using existing owners: it distinguishes a Doctor-resolvable load failure, preserves other load errors, and keeps live configuration checks without adding settings or persistent state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 64b00dd6dd9d. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +20, Tests +26. Total +46 across 4 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 10:07 AM ET / 15:07 UTC. |
|
Merged via squash.
|
## Summary On openclaw/openclaw#178291 the maintainer reported a second route to the post-install Doctor's `authority-check-failed`, separate from the profile-linked one that openclaw/openclaw#188472 fixed. The requester check loads the configured channel plugins and fails on any load error. A plugin whose settings/state migration is still pending is held back until Doctor runs that migration, so Doctor's own check failed before it could run that migration. This route matches claw: - the owners are only in `commands.ownerAllowFrom`; - the Signal plugin was left with its settings upgrade pending every time; - a terminal `update repair`, which has no chat requester, finished the job. It is fixed on main by openclaw/openclaw#190433 (merge `a5bcd9c8c8c`), which isn't released yet. ## Changes (`docs/openclaw.md` §4.4) - **Upstream status**, now dated 2026-11-01, lists both routes and both fixes. A chat `/update` is only safe to a release that contains **both** fixes. No config change is needed, since the maintainer confirms `ownerAllowFrom` is the right setup. - The root-cause bullet now says it describes the profile-linked route, and that claw's own route is the second one. - The open `ownerAllowFrom` question is answered. What's left to verify is a chat `/update` to the first stable release with both fixes, with the result reported on #178291. - Earlier references in the section are aligned: the 2026-10-19 entry now attributes that failure to the pending Signal plugin (per the maintainer), and the "expect this every time" note waits for **both** fixes. Docs only, so nothing needs applying to claw. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…it Doctor (openclaw#190433) A chat /update from an owner listed in commands.ownerAllowFrom could fail the post-install Doctor with authority-check-failed (openclaw#178291, reldubnix's case). The delegated requester check loads configured channel plugins with throwOnLoadError, and a channel plugin whose state migration is still pending is held back until Doctor runs it. Doctor's own authority check therefore failed before Doctor could run the migration that would unblock it. The requester check now tolerates a load failure made only of pending plugin state migrations. Owner matching then resolves a prefixed entry such as telegram:<id> through bundled channel metadata instead of the loaded plugin. Every other load failure still fails the check, unlisted or removed owners still fail, and policy is reread on every check.
…it Doctor (#190433) Retain configured owner checks through pending plugin state migrations using existing bundled channel metadata. Other plugin failures and subsequent owner revocation still fail closed. (cherry picked from commit a5bcd9c) Co-authored-by: RomneyDa <[email protected]>
Related: #178291
What Problem This Solves
Fixes: a chat
/updatefrom an owner listed incommands.ownerAllowFromfails the post-install Doctor withauthority-check-failedwhen a configured channel plugin is waiting for Doctor to run its state migration.User Impact
User impact: owners authorized through
commands.ownerAllowFrom(for exampletelegram:<id>) can update from chat across releases that migrate a channel plugin's state. Before this, Doctor refused, the run recordedstate-migrated-no-rollback, and those plugins stayed on the old version until someone ranopenclaw update repairfrom a terminal (reldubnix's report on #178291, 10.8 to 10.9).Why This Change Was Made
The delegated requester check in the post-install Doctor loads configured channel plugins and fails on any load error. The loader holds back a channel plugin with a pending state migration until Doctor runs it. So the check Doctor needs before it can migrate failed because the migration had not run yet. #188472 fixed the profile-linked route to the same error; this is the configured-owner route.
The requester check now tolerates a plugin load failure only when every failed plugin is held for a pending state migration. In that case no plugins are active, so
ownerAllowFromchannel prefixes are resolved through the bundled channel metadata instead of the loaded plugin. Any other load failure still fails the check, so a broken plugin is still reported instead of read as revocation. Policy is reread on every check, so unlisted or removed owners still fail.Accepted edge case: while the plugins are held back, owner entries are matched without the channel plugin's own formatter (exact native id after the bundled channel prefix). Entries for channels outside the bundled set do not match in that window, so the check fails closed, as it did before.
Evidence
update-requester-authority.test.ts: a configured ownertelegram:ownerstays current while the only load failure is a pending state migration, and is revoked when the config lists someone else. A non-migration failure still throws. The pending-migration case fails on main withplugin load failed: telegram, the reporter's failure.isConfiguredCommandOwnerwith no channel plugin loaded matched123456789but nottelegram:123456789ortg:123456789.pnpm check:changed --base origin/mainpasses: tsgo shards, lint, deadcode, import cycles and guards.Gap: no live Crabbox run. Proving it live needs a published build whose post-install Doctor contains this fix, and none exists yet. The proof is at the owning boundary (
createManagedUpdateRequesterAuthority).Reviews: autoreview scoped-clean on
3fb4ffbbd2f. The independent Codex security review answered NO FINDINGS to: can an unlisted or removed requester pass any owner check, and can a non-migration plugin failure be hidden?