Skip to content

fix: preserve gateway administrator permissions across native UI clients - #194443

Merged
roboclaw-bot merged 12 commits into
openclaw:mainfrom
jjjhenriksen:fix/macos-admin-automation-admission
Nov 17, 2026
Merged

roboclaw-bot merged 12 commits into
openclaw:mainfrom
jjjhenriksen:fix/macos-admin-automation-admission

Conversation

@jjjhenriksen

@jjjhenriksen jjjhenriksen commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

An authenticated native-app administrator could receive caller-scoped automation inventory and “not found” for another conversation’s job, despite holding Gateway admin authority. The invariant is same authenticated administrator, same effective scopes and policy, same Gateway permissions, regardless of Control UI or native UI client. Rendering features remain separate.

User Impact

User impact: native UI administrators can inspect and repair existing automations across conversations with the same effective scopes and policy as browser administrators. Caller-only caps, requester isolation, and live revocation remain enforced. The maintainer direction endorses native UI administrator parity; security approval is evaluated separately for each head.

Why This Change Was Made

  • Reuse shared authenticated UI-admin classification for fresh-turn automation admission and durable recovery, without labeling native clients as Control UI or granting direct-local execution.
  • Retain recorded automation-admin delegation across scheduled recovery and repair/notice continuations. Legacy browser grants remain compatible; historical native snapshots without recorded delegation are not upgraded.
  • Preserve scope intersections, principal-only snapshot contracts, exact-device reconnect custody, requester identity, and the existing authorization gates for provider-review acknowledgment, dashboard reads, task suggestions, and signed-in mentions.
  • Retain deployment caller caps, tool policy, fresh/direct-turn and exact-run binding, and live authority/revocation checks through the final effect. Browser origin checks and transport-specific rendering remain separate.

Evidence

Current selected-CI-planner repair — November 17, 2026

Current head: 0c556757a1f98d9ea265d3612b2d833cdf086c3f, parent c9258372212581d58b3454b9c4911a02fe1365c9. The integrated-main baseline remains 2b9b23b9f3afbd8ebb233c097e13b847df0b73a3; no additional main refresh or ancestry rewrite was performed.

  • Root cause: adding correctly routed recovery tests changed unrelated full-plan packing. The selected plugin-reload child already had a two-worker limit but retained the full row’s redundant two-worker job default. Exact environment comparison then stranded it from compatible serial work. The existing one-job, 32-class, serial, shortest-60-minute, exact-target-scope contract is deliberate and remains unchanged; no policy decision or weaker assertion was needed.
  • The 12-line owning-producer repair drops that default from the selected projection only when every retained child explicitly pins an equal or narrower limit. This respects the executor’s min(job, child) intersection: a job cap above an unpinned or wider child remains authoritative. Other environment values, process boundaries, worker limits, memory floors, timing identities, prices, capacity rules, and deadlines are preserved. Native authorization production code and both recovery test registrations are unchanged.
  • The existing regression is retained and strengthened with five lines checking the child worker limits. No test was removed or weakened, and no baseline/ignore/suppression or scalar limit was changed. The exact per-change test allocation is 617 net LF / 400 allowance / 217 credits.
  • Red/green proof: the original actual CI merge 2bda603d… fails while its exact main parent passes. Applying the final repair makes that same merge’s serial-sharing regression pass under the checksum-pinned Bun fork. Candidate-snapshot checks pass 220 planner/selection/command tests across four files, plus the executor worker-ceiling case; the tooling caller type graph and both targeted lint groups pass. Final formatting and test budget pass. These are batched snapshot checks, not a single all-green command or remotely executed new-commit-SHA claim. The three checked Git blobs exactly match this signed commit.
  • Guarded snapshot validation retains an initial formatter-only failure after the tests/types/lint passed. The canonical formatter changed only line wrapping; completion validation passes final format, budget, and the formerly failing actual-merge regression. No failure was hidden or converted into a waiver.
  • Fresh independent canonical autoreview, Codex, P0–P2: scoped-clean, with the full planner, caller, capacity, and actual executor contracts supplied. A separate read-only source/history diagnosis corroborated the cause. Simplification keeps one projection owner and removes stale derived policy rather than adding another scheduler or compatibility layer.
  • Exact-head main CI, attempt 2, completed successfully: 64 successful jobs, 25 skipped, none failed. The formerly failing Compact20 planner lane, test-type lane, and Android 16-KiB lane all pass. Eight of the nine auxiliary pull-request workflows also succeeded; Periphery’s iOS build/report is still running and is not claimed complete. Existing fork execution approval was separate from security-sensitive approval; no manual rerun was requested.
  • Current-head security-sensitive approval remains pending and must recognize this exact commit; earlier approvals do not carry forward. Main CI success is not that approval or merge authorization. No security-approval command, security-rationale comment, merge, auto-merge, or deployment was performed. All task AWS leases have been released.

All earlier evidence below is historical and scoped to its named head.

Prior upstream-fix integration and adapter repair — historical

Current head: c9258372212581d58b3454b9c4911a02fe1365c9. Integrated main: 2b9b23b9f3afbd8ebb233c097e13b847df0b73a3 (upstream lint fix #200685). This is the smallest authenticated main baseline containing the requested fix, integrated without rewriting contributor ancestry; no later-main refresh was added.

  • The integration head 3207881c907f34f6822e27005e16d6a3cc256850 preserves every prior product blob from 8eed13bc, with no conflicts. The generic recovery test exactly matches the selected main; all six native cases remain in the separate 61-line database-worker owner. The inherited expiry test now uses the upstream fixed using _ binding.
  • Fresh complete committed-range canonical autoreview of that integration was scoped-clean at P0–P2. Exact-head isolated proof passed 77 tests in six files/four shards (202.79 seconds), including generic/native/final-write recovery, expiry handling, cron trigger/webhook behavior, and private invocation metadata. Canonical expiry/recovery lint, expiry formatting, whitespace, source equality, and the 612/400/212 test-line budget passed.
  • Its fresh CI run exposed a PR-owned fixture type integration defect, not an authorization failure: check-test-types-core-4 rejects the raw Node readFile overload against later main’s readFile(path, signal?: AbortSignal) operation contract. That failure is retained, not relabeled inherited or green.
  • The current repair is one line in one test file: an inline adapter accepts the optional typed signal and forwards it through Node filesystem options. Production code, allowed-write/final-revocation assertions, and all generic/native cases are unchanged. No cast, suppression, ignored signal, limit increase, or additional main integration was used.
  • A fresh independent canonical full-candidate autoreview, Codex, P0–P2, identified only the old INDEX-only raw adapter while explicitly accepting the corrected working-tree adapter. Staging and committing those exact reviewed working-tree bytes resolved the finding; no additional P0–P2 defect was identified. The original findings report is retained; it is not relabeled helper-certified scoped-clean.
  • Exact current-head secretless proof completed exit 0: the three native recovery final-effect cases pass (71.90 seconds), the gateway-root test type graph passes, and affected canonical lint, formatting, whitespace, clean-tree checks, and the unchanged 612/400/212 test-line budget pass. Prior build/unaffected proof is reused only for unchanged inputs, not represented as a new whole-main local build.
  • Current-head CI, attempt 2, completed failure: 62 successful jobs, 24 skipped, three failed. The formerly failing type lane now passes against the real later-main merge contract, as do all lint/type/build lanes. The remaining failures are the planner assertion and Android dependency infrastructure described next, plus their dependent aggregate gate. CI is not clear or waived.
  • Remaining PR-owned CI integration defect: compact20 fails shares selected serial setup within the shortest contributing timeout at ci-node-test-plan.selection-capacity.test.ts:404 (expected shared serial selection to be defined). Fresh isolated attribution, using the same checksum-pinned Bun fork, reproduces the failure on actual CI merge 2bda603d128bbf72dbb2899e9718fee4ff94692e while its exact main parent ea94eb3bd38e29d17df08a957a08fa2866355110 passes. This is an interaction with the PR-added recovery test inventory, not inherited main noise. The required planner/routing integration repair remains unresolved; no assertion was weakened, recovery lane removed, or expected-failure exception added.
  • Android 16-KiB access fails before instrumentation because Maven Central returns HTTP 429, disabling dependency resolution for the UTP runner. Separately, the Labeler fails a GitHub label-list read with HTTP 500. These infrastructure/metadata failures are not authorization findings and were not rerun to manufacture green. All eight auxiliary pull-request workflows, including Periphery, completed successfully.
  • Per-head security approval remains a separate maintainer gate; earlier approvals do not approve this head. No security-approval command, security-rationale comment, merge, auto-merge, or deployment was performed. All three task AWS leases were released.

All evidence below is historical and applies only to its named head.

Prior 8eed13b lint repair — historical

Current head: 8eed13bc75f6276a3e95c93aba5f8da0f755d0b9. Predecessor: 94082876686eacd2efb845f0796a0ded0bb6626a. Integrated-main baseline remains bb45ba99390c80784ca50d1b07f150b72cd57b7d.

The PR-caused max-lines finding is fixed and its focused proof passes. CI is not clear or waived: the fresh CI run encountered a separate lint error inherited from its later main-side merge base, described below. No merge readiness or security approval is inferred from the code-review result.

  • The necessary correction changes only four test/allocation/routing files. The original 49 native recovery lines are unchanged in a dedicated 61-line operator-run-recovery.native.test.ts, using the existing shared fixture and native database-worker lane. The entire generic recovery test now byte-matches the integrated main, including every generic retired-claim final-write, device/profile-custody, and key-linked lifecycle regression. No test was deleted or weakened; no max-lines limit, suppression, ignore, or baseline exception was added.
  • Fresh independent canonical autoreview, Codex, P0–P2, reviewed the complete PR candidate including the staged repair, committed unchanged as this head: scoped-clean, no actionable findings.
  • Exact-head secretless AWS proof completed exit 0: 91 tests in four files/two shards (42 direct test-project ownership checks and 49 generic/native/final-effect recovery tests), 205.11 seconds; both affected gateway-root/tooling type graphs; canonical lint for both changed recovery tests and the routing module; three-file formatting; whitespace and clean tracked-tree checks. All six expanded native parity/legacy cases run in the intended database-worker owner and pass. The previously failing canonical max-lines check now passes.
  • The test-line budget passes at 612 net LF lines, 400 ordinary allowance, and exactly 212 allocation credits. The increase over the prior allocation is only the 12 import/wrapper lines needed for the separate test module; scalar limits are unchanged.
  • Production code, dependencies, and build configuration are byte-unchanged from 94082876. Its successful full production build and unrelated proof are reused for those unchanged inputs, not relabeled as new-head execution. No redundant full production build, new native-app/model E2E, distribution-signing, or TCC-persistence claim is made. Contributor ancestry and Sally’s credit remain intact.
  • Fresh current-head CI, attempt 2, tested GitHub’s merge revision 331af13a658497fea8a806141b102c5bea859094 combining this head with main 3777fda157ff9bddfce7a0d083aba8291d70602c. Its core lint job fails no-underscore-dangle for using _warning in src/agents/subagents/registry/subagent-result-owed.expiry-discard.test.ts:53. That file is absent from this PR head and has identical blob 316a46d24e48e8fe9e2f61cc26c4b71846c388b7 in the CI base and tested merge; their lint-rule/toolchain inputs are also unchanged. This is a later-main inherited failure, not the repaired native recovery lint issue. Upstream fix #200685, commit 2b9b23b9f3afbd8ebb233c097e13b847df0b73a3, merged at 16:29 UTC after this job had failed. No unrelated source fix, later-main integration, rerun-for-green, or CI waiver was made here. This run is not represented as clear.
  • Security approval is per head: the prior 94082876 approval is historical and does not approve this commit. Fresh current-head recognition remains a separate required gate. No security-approval command, security-rationale comment, merge, auto-merge, or deployment was posted/performed by this repair.

All evidence below is explicitly historical and remains scoped to its named head.

Prior 9408287 refresh and review — historical

Reviewed and published head: 94082876686eacd2efb845f0796a0ded0bb6626a. Integrated main: bb45ba99390c80784ca50d1b07f150b72cd57b7d.

Not yet merge-ready: fresh targeted lint found one integration-caused max-lines failure in the generic recovery test. The approved head is preserved while that required repair is reported; no test, limit, or failure has been hidden.

  • Updated the existing branch through the signed, ancestry-preserving route, retaining contributor history and Sally’s credit. The single conflict preserves the optional authenticated-profile return contract alongside native automation-admin delegation. Main’s device-revocation binding, tokenless continuation revocation, chat-key lifetime through edits/resets/compaction, deletion retirement, and occurrence-start config policy are retained. Every mainline recovery test/import byte is preserved, with the original 49 native test lines added.
  • Fresh independent canonical autoreview, Codex, P0–P2, covers the complete committed range from the integrated main to this head: scoped-clean, no behavioral findings. This static result does not override the lint finding below.
  • Exact-head secretless validation: full pnpm build passed, including Gateway, public declarations, and Control UI; 357 tests passed in 15 files across four Vitest shards (579.40 seconds); all five affected core/test type graphs passed. Production lint and the remaining gateway-methods, cron, and tooling lint groups pass. Formatting passes for all 33 changed supported files; whitespace and unchanged tracked-tree checks pass. The per-change test-line budget passes: 600 net LF lines, 400 ordinary allowance, 200 allocation credits. These are fixture-authenticated production-boundary checks, not new native-app/real-model E2E proof.
  • Required lint failure: src/gateway/operator-run-recovery.test.ts:1079 has 1,039 counted lines against the 1,000-line limit. The exact integrated-main file passes the same canonical lint command in the isolated checkout; this head’s original file was restored byte-for-byte after that comparison. The existing native-specific recovery cases should be moved to their native test owner using the already-shared fixture, without deleting or weakening the generic retired-claim final-write regression. The initial isolated run exits 1 for this failure. The separate remaining-check run passes; it does not turn the failed required lint check into a pass. No contributor code ran on the maintainer host.
  • The successful build emits six advisory Control UI bundle-budget overruns. These warnings are not a passing bundle-budget check; no size budget or baseline was changed.
  • Fresh main CI, attempt 2 on this exact head, completed successfully: 62 successful jobs, 25 skipped, none failed. The older inventory failure below is historical, not the result of this run. Auxiliary macOS Periphery reporting was still in progress at the final snapshot; no uncompleted workflow is claimed green.
  • Sally’s current-head security approval is recognized: openclaw/security-sensitive-review reports success via the approval-event run. No additional commit has replaced that approved head. Any required head-changing repair needs fresh current-head approval afterward. No security-approval command, security-rationale comment, merge, auto-merge, or deployment was posted/performed by this update.

All earlier evidence below is retained as historical proof, not substituted for the exact-head checks above.

Earlier November 17 integration and verification — historical

Historical head: f31e6ff01f633fa825ad97c0045567506b3ac7d1. Integrated main: 4cbd215af463775faa6807aea90621292b28af15.

  • Updated the existing contributor branch through the supported signed, ancestry-preserving integration route. Original contributor commits are preserved; hosted ancestry was not replaced.
  • Resolved six integration conflicts while preserving the canonical extracted grant-type owner, current-main recovery claim/policy separation, reconnect refusal checks, requester restrictions, and the private Control-UI-only Template Add route. The generic current-main regression that retires the requester claim and then tests an allowed child write plus a rejected revoked final write remains intact, alongside the separate native cron final-effect tests.
  • Exact-head secretless AWS validation passed: full pnpm build (Gateway, public declarations, and Control UI); 235 tests in 10 files across three Vitest shards; core typecheck plus the four affected gateway-root, gateway-methods, services-cron, and root-tooling test type graphs; targeted lint for all 32 changed code files; formatting for 33 changed supported files; whitespace checks; and a final unchanged tracked-tree check. The focused tests took 248.99 seconds. These are fixture-authenticated production-boundary tests, not a new native-app/real-model E2E claim. No contributor code ran on the maintainer host.
  • The successful build emitted advisory Control UI bundle-budget overruns. These warnings are not represented as a passing bundle-budget check; no size budgets or baselines were changed.
  • Fresh independent canonical autoreview, Codex, P0–P2, reviewed the complete committed range from the integrated main to this exact head: scoped-clean, no actionable findings. Static review is separate from the runtime checks above.
  • The current per-change test-line budget passes: 600 net LF test lines, the ordinary 400-line allowance, and an allocation of exactly 200 excess lines. The historical scalar-ratchet results below are not current-head results.
  • Exact-head broad CI completed with 61 successful, 24 skipped, and 2 failed jobs. The sole test failure is the compact tooling shard; the other failure is the dependent aggregate gate. The failing private-Control-UI-server inventory assertion discovers extensions/openclaw-id-access/browser/recovery-uses.e2e.test.ts, which is absent from uiE2ePrivateServerTestFiles. The file entered main through feat(openclaw-id): members can recover access with a recovery kit #200145. All scanned ui/ and extensions/ sources, the assertion/support module, UI test configurations, parser, and CI node-plan owner are byte-identical between integrated main 4cbd215a and this head. This is an inherited main inventory defect, not an authorization-test failure. The exact-baseline CI run was cancelled, so no passing baseline replay is claimed. No unrelated fix, expected-failure exception, budget adjustment, or rerun-for-green was made; broad CI is not green or waived. Execution approval was not the separate sensitive-security approval. No merge or deployment was performed.

The November 6–7 evidence below is retained as historical proof, not substituted for the exact-head checks above.

Historical review repair head: 1d59863f8e6155adb544bb806acf134706c91c0e.

Review repairs and expanded proof — November 7, 2026

  • Architecture finding fixed: replaced the scope module's import from the Gateway handler-type barrel with its minimal structural input contract. pnpm check:madge-import-cycles now reports 0 cycles, versus 1 cycle on the reviewed head. Runtime authorization logic is unchanged.
  • All four current-head CI test-type failures repaired: narrow the recovery snapshot discriminant, retain browser classification separately in the restored-source fixture, supply the native transport fixture's authenticated profile, and strip native-only delegation when building a principal snapshot. Core typecheck and the four affected canonical test-type graphs pass.
  • Recovered native owner continuation: operator-run-recovery.effects.test.ts now takes a serialized native snapshot through a persisted CronService row, the production job target and failure-repair event owners, admitted child authority, and a host-bound file write. An allowed write persists; device revocation, email reassignment, and reassignment-then-restoration during the next held write reject it, with the file unchanged. This extends and relocates existing final-effect cases rather than duplicating them.
  • Native provider-review final effect: sessions-provider-review.integration.test.ts exercises the real Gateway router, scope/session authorization, acknowledgment owner, and worker SQLite compare/commit. An authorized native writer clears the exact pause. Read-only, foreign-owner, and non-UI callers never reach runtime handoff; device revocation at commit leaves the entire session entry unchanged. External model acceptance is a fixed fixture: this is production-boundary proof, not a live native-app/provider E2E claim.
  • Latest-stable upgrade: an actual released [email protected] store writer created a disabled synthetic automation. Supported backed-up Doctor migration and current-source loadCronStore/CronService.list/update preserve its authored prompt, disabled state, creator, owner, delivery, interval, and unrelated fields. Exact whole-store comparison permits only verified canonical metadata additions: every-schedule anchor, owner profile from stored creator, and versioned account tool policy from stored owner. Subsequent service update persists without changing unrelated fields. This proves the released-store → Doctor → current-service boundary, not a full native-package upgrade. No jobs or Gateway ran. Existing dependencies were reused without installing packages or overriding install policy.

Focused validation: 154 tests pass across separate runs, not one all-green monolithic suite: recovery 43, recovered final effects 3, provider-review final effects 5, automation transports 15, scheduled-session custody 15, cron-context replay 13, and CI source-owner routing 60. Recovery effects took 43.69 s including compilation (3.97 s summed cases); the new provider-review cases initially took 45.81 s including compilation. Scheduled-session custody took 10.79 s (12.44 s wrapper). CI execution seconds for these new files are pending.

The first combined replay exposed the extracted recovery file running in an incompatible thread pool (host database broker unavailable). Registering it in the existing database-worker lane resolves that setup failure; the corrected effects shard and routing suite both pass. The repaired files pass focused lint, formatting, whitespace checks, and the affected type graphs. Regression check: substituting the pre-generalization job target (a43f5e814047) and original provider-review handler (d482d7616512) produces four intended failures: missing recovered native owner authority and native continuation denial. Restoring the reviewed repair makes 8/8 pass, Vitest 41.34 s / wrapper 45.61 s. No setup failure is counted as negative authority proof.

Fresh independent autoreview, Codex, P0–P2, covers reviewed head 697096f44c77820f7fde61cc005bd425a8227513 → the complete local repair snapshot, including untracked test files and the database-lane registration: scoped-clean, no actionable findings. It inspected supplied source/context and did not execute project tests. The helper's first preflight refused a shared temporary directory; the completed run used the OS-reported private macOS temporary directory without disabling isolation.

Test growth is allocated explicitly: 463 net LF lines across the complete PR for distinct admission, recovery/continuation, forbidden-caller, revocation, and final-effect contracts. The shared test-line scalar is unchanged. Existing authority and persistence owners are reused; the handler-type dependency is removed and no parallel policy registry is introduced.

Upgrade-proof side effect: Doctor also cleaned 3,387 recognized obsolete files in its shared temporary archive-read cache. Source inspection confirms it targets that cache, not original archives; no live Gateway or configuration changed. No further Doctor runs were performed.

Inherited test-line ratchet failure (not waived or masked): the clean merge base d482d7616512 independently reports 6,552,043 LF lines against ceiling 6,551,994 (49 over, delta 0). This head reports 6,552,506 against 6,552,457 (49 over, delta +463). The PR adds exactly 463 lines and 463 allocation credits; it does not increase the inherited debt. The ratchet command still exits nonzero on this positive-delta branch. No unrelated tests, scalar baseline, or extra debt credit were changed. Broad exact-head CI remains to be assessed.

Updated real-app proof — November 6, 2026

Main proof uses the normal, web-backed Mac app interface, not the experimental native SwiftUI chat. Experimental-native results from earlier preparation are supplemental only and are not substituted for the normal-interface results below.

Provenance and signing

  • Gateway and served Control UI built from proof head 697096f44c77820f7fde61cc005bd425a8227513.
  • Real macOS client: installed version 2026.10.4, source metadata 3561a19c06ec0294c022b7b0ca3829a073f52ef5, copied into a separate proof bundle and explicitly ad-hoc re-signed. Its client revision is older than the Gateway; this is not an exact-head native-package build claim.
  • Proof bundle identifier: local.openclaw.pr194443-installed-proof. codesign --verify --deep --strict --verbose=2 reported valid on disk and satisfies its Designated Requirement.
  • The normal embedded UI authenticated through the native bridge as client=openclaw-macos, mode=ui, role=operator; it was not replaced by a script claiming that client name. The real model invoked the production OpenClaw automation tool through a normal chat.send turn.
  • Separate loopback Gateway, state, workspace, app profile, and disabled synthetic job. No LinkedIn or other external automation ran. The existing operator Gateway and installed /Applications/OpenClaw.app bundle were not modified or restarted.

Signing constraint: Ad-hoc signing is the signing path available to this contributor. This evidence does not claim Developer ID/distribution signing, notarization, or TCC permission persistence. Please assess the observed native authentication/authorization chain on that basis; if distribution signing itself is a material dependency, identify it and route that additional verification to a maintainer with distribution-build access.

Normal-interface observations

Scenario Actual observed behavior
Native admin manages another conversation’s job The real model listed disabled jobs, updated the foreign-conversation fixture through the automation tool, and read it back. Independent persisted-state read showed STANDARD-MAC-ADMIN-PR194443-VERIFIED; the job remained disabled.
Explicit tools.gatewayPolicy.automations.scope: "caller" Through the same normal Mac app interface, the real model attempted the foreign-job update and received cron job not found. Persisted job state was unchanged and disabled.
Native device revoked during an in-flight delayed update The model’s tool-orchestration call awaited a 60-second timer before attempting its write. The supported devices revoke CLI revoked the proof device’s operator authority while that run was active. The Gateway terminated the original run with operator source authority is no longer active and stopped model fallback because the caller signal was aborted. After the timer deadline, independent persisted-state comparison showed the entire job unchanged; the attempted new marker was absent.

Sanitized Gateway receipt for the passing revocation run:

21:21:47 [gateway] device token revoked device=<proof-device> role=operator
21:21:47 [agents/harness] error="operator source authority is no longer active"
21:21:47 [diagnostic] runId=9e343352-93e6-4fa3-8a2b-6230ba6378d9 durationMs=39586
21:21:47 [model-fallback/decision] stopped: reason=caller_signal_aborted
post-deadline persisted job comparison: unchanged=true; enabled=false

The shared-bootstrap-token app subsequently reconnected/re-paired. That did not restore the original run’s authority or persist its attempted update. This live case proves in-flight revocation before the delayed tool call; it is not represented as a write already held inside Cron’s commit guard.

Earlier revocation setup attempts used an insufficiently scoped generic RPC client or omitted the explicit credential required by a URL override. Those attempts are not counted as negative proof; an earlier timer completed without a successful revocation. The passing case above used the supported device-management CLI with explicit, disposable proof-Gateway credentials. No credential values or private endpoints are included here.

Additional live scope-demotion proof — November 6, 2026

A second disposable loopback fixture used the same PR-head Gateway and the identified installed 2026.10.4 client, copied to bundle local.openclaw.pr194443-demotion, ad-hoc signed and strictly signature-verified. The normal web-backed Mac app interface was used; experimental native experience remained disabled.

  1. Through a real model turn and the production automation tool, the native admin read a disabled foreign-conversation job, updated its message to DEMOTION-ADMIN-CONFIRMED, and read it back.
  2. The same turn entered a tool-orchestration call awaiting a 90-second Promise timer before attempting a second update to DEMOTED-MUST-NOT-PERSIST.
  3. While that run was active, the supported devices rotate CLI narrowed the proof device’s operator token to operator.read,operator.write, removing operator.admin, approvals, questions, and pairing. This was scope demotion, not device removal or token revocation.
  4. At 21:43:43 PST, the Gateway recorded the narrowed scopes and immediately terminated the original run with operator source authority is no longer active; fallback stopped with caller_signal_aborted. The app subsequently reconnected, but that did not restore the original run.
  5. After the original 90-second deadline, an independent Gateway read verified every persisted job field against the pre-demotion tool readback: unchanged, disabled, and no forbidden marker. The CLI list adds only derived effectiveAgentId and status fields; those are not treated as stored mutations.

This proves live scope-demotion propagation to an in-flight native-app model run before its delayed tool write. It does not claim a fresh non-admin model turn, a write already paused inside the Cron commit guard, persistent denial after a new bootstrap-authenticated reconnect, or distribution signing. No live operator Gateway, installed app bundle, or real automation was changed.

Earlier-head automation final-write boundary proof

Re-executed on 697096f44c77820f7fde61cc005bd425a8227513:

pnpm test src/gateway/server-methods/cron-creator-transports.integration.test.ts --maxWorkers=1

15/15 passed; Vitest wall time 66.86 s, wrapper 70.65 s. This in-process suite uses fixture-authenticated connection facts and production admission, automation tools, and Cron handlers. It independently covers admin success, explicit caller-cap denial, native operator.write without admin denial, and device revocation while the update is held in Cron validation: resumed final write rejects and stored state is unchanged. It complements, rather than substitutes for, the real-app evidence above.

Earlier same-head focused validation: all 68 recovery/reconnect/session-run checks passed after correcting a fixture to publish production revocation rather than merely rotate a token. Seven other focused files passed in the preceding broader run. This is combined focused evidence, not one all-green monolithic suite. Core typecheck, focused lint, formatting, and whitespace checks passed. Current proof also built the Gateway runtime and Control UI successfully.

Base reproduction and earlier narrow proof remain at d482d7616512, c13ab576c5059102aa143ec3355540bdf2d12422, and a43f5e81404718b2e15dd1379bbf885513c967c0; those are prior-head evidence, not substitutes for the current-head runs above. Independent local read-only review previously found no remaining P0–P2 defects; this is not an autoreview-helper-certified result.

Remaining boundaries and gates

  • A normal-app non-admin real-model run remains uncompleted. Non-admin final-write denial is covered by the production-boundary tests, not claimed as native-app E2E evidence. Historical live in-flight scope-demotion proof is recorded above.
  • No distribution-signed/shipped-package or TCC-persistence proof. The historical cold Swift build was stopped during dependency download; the app proof used the explicitly identified existing client instead. No new exact-head native package build is claimed. The latest ClawSweeper review accepts ad-hoc signing for the demonstrated authentication path and does not require distribution signing from this contributor.
  • Maintainer direction endorses native administrator parity. The required native recovery lint repair passes on 8eed13bc; its current-head CI inherited-base failure and per-head security gate are described above. No all-green/merge-ready claim or gate waiver is made; any new head requires fresh security approval. No merge or live deployment was performed.

Simplification: existing classification, run-authority, and recovery owners are reused; browser identity is not widened and no competing authorization registry is introduced. The current test allocation and verification are recorded in the November 17 evidence above.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: S labels Nov 7, 2026
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T03:52:39.242263Z c13ab57 PR opened
ℹ️ 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.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Maintainer security changes approved

A maintainer approved this revision with an explicit security approval comment.

A later push requires a fresh approval comment for an external contributor's PR.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Nov 7, 2026
@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR extends browser administrator delegation to authenticated native UI clients and preserves it through automation recovery and continuations.

Example: An authenticated openclaw-macos administrator repairs a disabled automation owned by another conversation.

  • Before: The agent receives caller-scoped inventory and reports the existing job as not found.
  • After: The agent can inspect and update that job unless deployment policy explicitly restricts automations to caller scope.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, approved permission extension with shipped-entry-point evidence, compatible optional recovery metadata, passing exact-head CI, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Historical normal Mac app proof exercises authenticated chat through a real model and automation tool, including cross-conversation updates, caller-only denial, and revocation/demotion receipts; refreshed production-boundary tests cover recovered authority and provider-review effects without claiming a new native-package build.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Native administrators cannot conversationally inspect or repair existing automations across conversations despite equivalent authenticated administrator scopes.
Reason: The previously browser-specific delegation is a useful permission extension explicitly endorsed by maintainer direction on this PR.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR delivers approved native administrator parity that current main still lacks, with no actionable findings in the reviewed diff and current-head security approval recorded.

Priority: P2
Reviewed head: 0c556757a1f98d9ea265d3612b2d833cdf086c3f

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway translates authenticated UI requests into run-bound authority; automation admission, recovery, and tool execution consume that authority before accessing jobs or performing effects.

flowchart LR
  A[Authenticated native UI] --> B[Gateway request admission]
  B --> C[Operator authority]
  C --> D[Automation management grants]
  C --> E[Recorded recovery source]
  E --> D
  D --> F[Cron service and guarded effects]
Loading

Technical review

Best possible solution:

Land the approved native UI delegation through the existing admission, recovery, and grant owners while retaining caller caps and requester isolation.

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

Current-main admission demonstrably requires the browser-specific management flag, matching the native inventory differences reported in #139586; this review did not execute a reproduction.

Is this the best way to solve the issue?

The implementation extends existing classification and authority owners, preserves browser identity separately, and carries the same bounded delegation through recovery without introducing a competing permission system.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3cce42d18562.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Approved product direction and exact-head security approval: Sally's recorded direction approves equivalent permissions for equally authenticated browser and native administrators; the security guard recognizes VACInc's approval for 0c55675. Discussion: fix: preserve gateway administrator permissions across native UI clients #194443 (comment) and fix: preserve gateway administrator permissions across native UI clients #194443 (comment). (0c556757a1f9)
  • Current main retains browser-only management admission: Current main still derives the UI management entitlement from internal.controlUiAdmin; the PR adds authenticated native UI classification while preserving fresh-turn, administrator-scope, and synthetic-input restrictions. (src/gateway/server-methods/cron-creator-authority-admission.ts:91, 3cce42d18562)
  • Recovery preserves recorded delegation ceilings: The optional automationAdmin snapshot field preserves legacy browser grants without upgrading historical native or principal-only sources; restoration still validates current source authority, and timing edits intersect previous and fresh delegation. (src/gateway/operator-run-recovery-source.codec.ts:157, 0c556757a1f9)
  • Shipped-entry-point proof and compatibility evidence: The full PR body records normal Mac app → authenticated WebSocket → real-model automation updates, caller-only denial, and sanitized revocation/demotion receipts with unchanged persisted jobs; refreshed recovery and provider-review tests supplement that historical live proof. Downloaded screenshots were inspected and belong to linked historical work, so they were not counted as native-client proof. (697096f44c77)
  • CI projection repair preserves worker admission: Selected projections remove the job worker default only when every retained child pins an equal or lower value; the executor retains its minimum-of-job-and-child intersection, and the existing serial-sharing regression retains exact target, timeout, and worker assertions. (scripts/lib/ci-node-test-plan.mts:4650, 0c556757a1f9)
  • Exact-head CI and clean checkout: The CI workflow completed successfully for the reviewed head; the supplied check inventory has no failures and one auxiliary iOS report still running. Final git status remained clean, and no target code or tests were executed during this review. (0c556757a1f9)

Likely related people:

  • Paul Bohm: Raw commit a242eb5 adds src/gateway/operator-run-authority.ts:103 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a242eb57e5d4; files: src/gateway/operator-run-authority.ts)
  • Josh Avant: Raw commit 45893d3 adds src/gateway/operator-run-authority.ts:616 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 45893d3ee45e; files: src/gateway/operator-run-authority.ts)

PR surface

Source +83, Tests +619, Docs +24, Other +19. Total +745 across 36 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 20 114 31 +83
Tests 13 631 12 +619
Docs 1 24 0 +24
Config 0 0 0 0
Generated 0 0 0 0
Other 2 19 0 +19
Total 36 788 43 +745

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +95 lines; tests and test support net +617 lines Growth extends existing authority owners and covers distinct native admission, persisted recovery, requester, provider-review, and guarded-effect boundaries; test routing adds another two lines.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on maintainer: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This addresses a bounded native administration capability gap with an existing browser workaround.
  • merge-risk: 🚨 security-boundary: Native authenticated administrator turns gain existing privileged delegation; maintainers accepted the direction and approved the exact reviewed head.
  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-07T04:03:02.393Z sha c13ab57 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-07T11:55:47.312Z sha 697096f :: needs real behavior proof before merge. :: [P2] Keep the scope module independent of the handler-type barrel
  • reviewed 2026-11-07T17:01:11.676Z sha 1d59863 :: blocked before merge. :: none

Reviewed November 17, 2026, 5:08 PM ET / 22:08 UTC (Revision 4).

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M and removed size: S labels Nov 7, 2026
@jjjhenriksen jjjhenriksen changed the title fix: let native app admins manage automations across chats fix: preserve gateway administrator permissions across native UI clients Nov 7, 2026
@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper — Contributor clarification: ad-hoc signing is the signing path I can provide for local native-app validation. Please do not make access to a shipped/distribution-signed build a contributor prerequisite for this fix. If distribution signing itself is material to the authorization behavior, please identify the concrete dependency and leave that verification with a maintainer who has the necessary build/signing access.

This is not a claim that the remaining end-to-end proof has been completed: it has not. The PR records the fixture-authenticated regression evidence separately from native-client → WebSocket → real-model evidence. Ad-hoc signing must not be represented as distribution signing, but it should be an acceptable basis for locally exercising the native entry point.

Please assess the current head and its updated regression evidence on that basis. Existing scope ceilings, revocation/final-write requirements, and current-head maintainer security approval still apply; this request is not a waiver of those checks.

@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 7, 2026
roboclaw-bot and others added 4 commits November 17, 2026 02:29
Prepare the reviewed canonical grant type and recovery regression bytes for native baseline materialization. Current-main integration and exact-head secretless validation remain pending; this source is not a ready publication candidate.

Co-authored-by: sallyom <[email protected]>
Baseline-Refresh: 762fcc2e63f62eff4e4bc3b9689a7f655ffb07d5
Co-authored-by: sallyom <[email protected]>
Retain the current-main optional authenticated profile return contract alongside native automation administrator delegation. Current-main integration and exact-candidate secretless validation remain pending.

Co-authored-by: sallyom <[email protected]>
Baseline-Refresh: 90fe77b53215b4f98abe5f6f4273c0353c6bdd68
Co-authored-by: sallyom <[email protected]>
@sallyom

sallyom commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

/allow-security-sensitive-change

Move the existing native cases to their own database-worker test owner using the shared recovery fixture. Preserve every current-main generic recovery regression byte-for-byte, without raising or suppressing the max-lines rule. Production source is unchanged; exact-head affected isolated proof follows publication.

Co-authored-by: sallyom <[email protected]>
Baseline-Refresh: 1a87ad06f2a53fad43196e246d92be0e160c9e2b
Co-authored-by: sallyom <[email protected]>
@sallyom

sallyom commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

/allow-security-sensitive-change

Adapt the injected read operation to the optional AbortSignal contract and pass the signal through Node filesystem options. Keep production code and final-write revocation assertions unchanged.

Co-authored-by: sallyom <[email protected]>
Drop a full-plan job worker default from a selected projection only when every retained child already has an equal or narrower worker pin. Preserve the executor intersection, process boundaries, capacity and deadline policies while allowing compatible selected jobs to share setup.

Co-authored-by: sallyom <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Nov 17, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot roboclaw-bot assigned VACInc and unassigned VACInc Nov 17, 2026
@VACInc

VACInc commented Nov 17, 2026

Copy link
Copy Markdown
Member

/allow-security-sensitive-change

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 17, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Security review rationale

Reviewed head: 0c556757a1f98d9ea265d3612b2d833cdf086c3f.

The intended contract is that the same authenticated administrator, with the same effective scopes and policy, has the same Gateway permissions through browser and native UI clients. Client type alone should not determine administrative privilege.

The security considerations reviewed were:

  • Authentication and scope enforcement: Native UI identity alone does not grant authority. The connection must be authenticated as an operator and hold effective operator.admin. Restricted device grants and node connections do not become administrators by claiming a native client name.
  • Explicit policy ceilings: Caller-only automation policy, tool/action restrictions, scope intersections, and service validators remain in force. Native UI administration does not confer direct-local execution authority.
  • Fresh input versus delegated work: Synthetic clients, plugin/runtime calls, spawned requests, and forwarded input cannot manufacture fresh administrator admission. Background work and continuations retain their separately authorized source.
  • Durable automation delegation: Recovery uses recorded delegation and revalidates its source authority. Historical native snapshots without that delegation are not upgraded. Principal-only snapshots cannot acquire it, and timing-only edits cannot silently increase standing authority.
  • Identity, reconnects, and revocation: Reconnect custody remains bound to the authenticated device, profile, role, scopes, and transport facts—not merely a matching name or administrator status. Distinct personal administrators are not treated as interchangeable. Existing revocation checks and final-effect enforcement are preserved.
  • Current lifecycle semantics: The integration preserves main’s distinction between ordinary chat/configuration changes and explicit authority revocation. It does not introduce a native-specific exception to those rules.
  • Related UI operations: Provider-review acknowledgment retains session authorization and exact review/session binding. Mentions, dashboard reads, and task suggestions retain their applicable identity, scope, provenance, and capability checks.
  • Transport and host boundaries: Native clients are not relabeled as browser clients. Browser-origin protections, pairing/authentication controls, and local OS permissions are not relaxed.
  • CI-planner correction: The selected-plan repair removes a redundant job-level worker default only when every retained child explicitly has an equal or narrower limit. Effective worker ceilings, executor intersections, deadlines, capacity, and exact test scope remain preserved; it does not change Gateway permissions.

No weakening of the existing authentication, authorization, caller-policy, or revocation safeguards was identified in the completed review. The change makes existing UI administrator capabilities available through equally authorized native UI connections, including their explicitly recorded continuations; it does not make all native connections privileged.

The required checks and current-head sensitive-security approval are green on the reviewed head. Main CI passed, including the previously failing planner, typecheck, and Android lanes. The refreshed review reports no actionable findings.

This documents the reviewed security rationale. It is not an approval command, a claim of zero risk, or a waiver of enforced checks.

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

Labels

agents Agent runtime and tooling clawtributors PR from a clawtributor docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: L 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.

4 participants