Skip to content

fix(update): chat /update from a configured owner fails post-install Doctor while channel plugins await migration - #190433

Merged
steipete merged 1 commit into
mainfrom
codex/issue-178291-owner-allowfrom
Nov 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/issue-178291-owner-allowfrom

Conversation

@steipete

@steipete steipete commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Related: #178291

What Problem This Solves

Fixes: a chat /update from an owner listed in commands.ownerAllowFrom fails the post-install Doctor with authority-check-failed when a configured channel plugin is waiting for Doctor to run its state migration.

User Impact

User impact: owners authorized through commands.ownerAllowFrom (for example telegram:<id>) can update from chat across releases that migrate a channel plugin's state. Before this, Doctor refused, the run recorded state-migrated-no-rollback, and those plugins stayed on the old version until someone ran openclaw update repair from 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 ownerAllowFrom channel 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

  • New regression in update-requester-authority.test.ts: a configured owner telegram:owner stays 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 with plugin load failed: telegram, the reporter's failure.
  • Before the fix, a probe of isConfiguredCommandOwner with no channel plugin loaded matched 123456789 but not telegram:123456789 or tg:123456789.
  • Focused suites pass: requester authority (13), and 10 owner-matching consumer files (146 tests), including command-control, command-auth-native, doctor owner route, cron execution context, outbound owner route, update owner, and the plugin runtime registry loader.
  • pnpm check:changed --base origin/main passes: tsgo shards, lint, deadcode, import cycles and guards.
  • Autoreview: scoped-clean. Independent Codex security review: see below.

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?

…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.
@clawsweeper

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

@steipete
steipete marked this pull request as ready for review November 1, 2026 14:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T14:52:13.238519Z 3fb4ffb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This 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.

  • Before: Plugin loading rejects the requester check before Doctor can perform the migration.
  • After: The proposed fallback recognizes the configured owner and continues checking the current owner list.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused repair has useful regression coverage and no definite code finding, but the changed authority path lacks required final-effect evidence.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A configured owner starts an update from chat, but post-install Doctor fails and leaves channel plugins requiring terminal recovery.
Reason: The maintainer-authored direction repairs a corroborated released workflow, and its explicitly accepted formatter limitation does not require another product decision.

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
Reviewed head: 3fb4ffbbd2fb5faecd29810bd464c44a50b367fe

Before merge

  • Add real behavior proof - Authority-chain proof required: the added regression mocks configured-channel loading and exercises createManagedUpdateRequesterAuthority against real configuration, showing an allowed owner, subsequent removal, and a non-migration error; it does not exercise Doctor's final writes or process effects, wrong-channel or initially unlisted requesters, or an upgrade from v2026.10.9. No linked live artifact supplies those scenarios; redact IPs, API keys, phone numbers, and non-public endpoints from supplied traces. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve merge risk - Before merge, the PR owner must establish that metadata-based owner matching preserves channel isolation and revocation at Doctor's final effects.

Findings

None.

Tests

  • Missing end-to-end proof: Supply an isolated latest-stable-to-fixed-candidate chat upgrade with pending channel migration and settings intact, plus production-owner evidence that wrong-channel, unlisted, and removed owners cannot reach Doctor writes or child spawning.
Agent review details

How this fits together

Chat 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]
Loading

Technical review

Best 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 options

Maintainer options:

  1. Verify the fallback at Doctor's effects (recommended)
    The PR owner should exercise allowed, wrong-channel, unlisted, and subsequently removed requesters through production Doctor owners and record whether configuration writes and child spawning occur.

Provenance checked

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced hunks add migration-only failure classification, narrowly catch that classification, extend existing owner-prefix resolution, and add a focused regression. (src/infra/update-requester-authority.ts:148, 3fb4ffbbd2fb)
  • Current main retains the failure path: Fetched main still awaits configured-channel loading without the migration-only exception and resolves owner prefixes solely through registered plugins. (src/infra/update-requester-authority.ts:146, 64b00dd6dd9d)
  • Loader owns migration diagnostics: Pending migrations produce error records with plugin-state-migration diagnostics; strict loading throws before registry activation, supporting metadata-based matching during this window. (src/plugins/loader-records.ts:135, 3fb4ffbbd2fb)
  • Fresh policy reaches Doctor authority checks: Each isCurrent call rereads owner configuration; delegated Doctor composes that result with its executor fence and passes the assertion into its health flow and process custody. (src/infra/update-migrated-finalize.worker.ts:340, 3fb4ffbbd2fb)
  • Released reports distinguish configured owners: reldubnix reports failed 2026.10.8-to-2026.10.9 finalization and terminal plugin recovery; Farzy subsequently confirms configured-owner authorization without linked chat profiles. These reports establish user impact but do not independently prove this precise migration-load cause.
  • Supplied proof and accepted limitation: The full PR body reports base-failing regression coverage and passing focused checks, explicitly lacks a live upgrade, and accepts exact native-ID matching without plugin formatting while plugins are unavailable. (src/infra/update-requester-authority.test.ts:255, 3fb4ffbbd2fb)

Likely related people:

  • Peter Steinberger: Raw commit cd6c9c8 adds src/infra/update-requester-authority.ts:127 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cd6c9c8e9283; files: src/infra/update-requester-authority.ts)
  • Gustavo Madeira Santana: Raw commit 392bbdd adds src/auto-reply/command-auth.ts:96 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 392bbddf29c7; files: src/auto-reply/command-auth.ts)

PR surface

Source +20, Tests +26. Total +46 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 21 1 +20
Tests 1 26 0 +26
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 47 1 +46

Labels

Label changes:

  • add P0: The reported community chat-update flow requires terminal repair to finish plugin migration, meeting the specified update and recovery UX override.
  • add merge-risk: 🚨 security-boundary: The patch changes when delegated owner authority survives unavailable plugin runtimes; final-effect channel isolation and revocation are not established by the supplied boolean-level test.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P0: The reported community chat-update flow requires terminal repair to finish plugin migration, meeting the specified update and recovery UX override.
  • merge-risk: 🚨 security-boundary: The patch changes when delegated owner authority survives unavailable plugin runtimes; final-effect channel isolation and revocation are not established by the supplied boolean-level test.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Record a latest-stable upgrade through the fixed Doctor and prove allowed execution plus rejection of wrong-channel, unlisted, and removed requesters before writes or child spawning.

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.

Reviewed November 1, 2026, 10:07 AM ET / 15:07 UTC.

@steipete
steipete merged commit a5bcd9c into main Nov 1, 2026
212 checks passed
@steipete
steipete deleted the codex/issue-178291-owner-allowfrom branch November 1, 2026 15:17
@steipete

steipete commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Farzy added a commit to Farzy/self-config that referenced this pull request Nov 1, 2026
## 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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
…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.
RomneyDa added a commit that referenced this pull request Nov 17, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant