Skip to content

fix: cloud workers work with trusted-proxy browser auth - #121671

Merged
steipete merged 9 commits into
mainfrom
steipete/upbeat-greider-ef8777
Aug 11, 2026
Merged

steipete merged 9 commits into
mainfrom
steipete/upbeat-greider-ef8777

Conversation

@steipete

@steipete steipete commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users opening the Control UI through trusted-proxy authentication, including a fresh Safari session behind Cloudflare Access, could see “Cloud workers need a secure browser context” and lose the Cloud destination even though the page was served over HTTPS and the browser supported Web Crypto.

The affected surface is New session → Where → Cloud worker. A fully authorized trusted-proxy browser can authenticate without exposing a device or shared token to page JavaScript, so the previous client-derived recovery scope was empty and the UI misdiagnosed the connection as insecure.

Why This Change Was Made

The Gateway now records the authoritative recovery namespace in hello-ok as an opaque auth.recoveryScope. Verified canonical human identity owns the scope when available; device/shared-auth identity provides the non-human fallback.

Legacy migration is separately authorized by the Gateway. auth.recoveryMigrationAllowed appears only when the destination scope is device-token-owned, so a shared browser cannot move one person's pending task into another trusted-proxy principal's namespace. Principal-owned sessions preserve unproven legacy rows untouched. Older compatible v4 Gateways that omit the new scope retain the exact shipped credential-derived fallback.

The browser consumes those Gateway facts instead of inferring ownership. Authorized migration loads through a tiny deferred runtime boundary so normal Gateway startup remains lean and cycle-free. The old generic tracker module remains deleted, and the unsupported-connection message describes recovery availability rather than blaming HTTPS or Safari.

Production LOC: +92/−92 (net 0) | Tests/test support: +421/−37 | Generated contract: +19/−19 (hash-only)

User Impact

Cloud workers appear normally in authorized Safari and other trusted-proxy browser sessions without requiring browser settings, a client-visible token, or a previously paired browser profile. Recovery remains isolated by canonical user identity, current clients retain cloud recovery against older v4 Gateways, and credential-owned pending tasks migrate only when the Gateway proves the destination has the same owner.

Evidence

Sanitized real trusted-proxy browser result (fixture data only; the original Safari screenshot was not uploaded because it contains real session context):

Trusted-proxy browser connected with the patched Gateway

  • Regression proof against pre-fix production: server.auth.trusted-proxy-device-autoapprove.test.ts failed exactly at the missing auth.recoveryScope assertion (1 failed, 11 passed). Restoring the fix passed all 12 tests.
  • Principal-switch regression: a browser retaining user A's credential cannot migrate or resume A's pending task after trusted-proxy user B authenticates; the legacy source row remains untouched and B receives only B's principal scope.
  • Upgrade regressions: an older v4 hello without recoveryScope retains the exact shipped SHA-256-hex credential scope; an authorized device-token migration moves a seeded pre-upgrade pending row and resumes it through the existing cloud-startup consumer.
  • Migration safety: exact gateway/scope rows only; occupied destinations, write failures, and clear failures preserve the source task; canonical same-scope promotion still succeeds under no-duplicate-capacity storage; a stale handshake can neither publish nor migrate recovery state.
  • Identity isolation: canonical human profile identity remains stable across credential rotation, differs for another profile on the same device, and never emits migration authorization.
  • Final focused proof: 17 Gateway, 74 UI recovery/client/storage, and 9 real-browser E2E tests passed.
  • Real Gateway + trusted-proxy + Chromium transport E2E proved a credential-less browser receives a non-secret opaque recovery scope and no credential-migration authorization.
  • The unrelated config-safe-write shard timeout was stress-tested 20/20 clean and classified as an isolated CI flake; no timeout or assertion was weakened.
  • pnpm protocol:check: protocol registry, generated schema, Swift/Kotlin parity, and protocol-since guard passed.
  • node scripts/check-changed.mjs -- <touched paths>: format, API baseline, boundaries, dead exports, i18n, typecheck, lint, schema guards, and import-cycle checks passed. Remote providers were unavailable, so the repository-approved trusted-source local fallback ran.
  • Control UI performance remains under budget: startup 317.7 KiB gzip (319.0 KiB limit); migration is a deferred 0.18 KiB gzip chunk; runtime and Madge cycle checks report zero cycles.
  • The SDK API baseline remains a hash-only transitive closure refresh with no declaration/export/import/kind change beyond the additive HelloOk.auth fields.
  • Codex autoreview after the final security repair: TruffleHog clean; no accepted/actionable findings.
  • git diff --check: passed.

Exact PR merge-tree CI on the pushed head is the remaining gate and will be recorded before landing.

Provenance: the client-side recovery derivation shipped with cloud workers in #107670 on 2026-07-14. This change replaces that inference with Gateway-owned facts rather than adding a Safari-specific workaround.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Aug 10, 2026
@steipete
steipete marked this pull request as ready for review August 10, 2026 17:08
@steipete
steipete requested a review from a team as a code owner August 10, 2026 17:08
@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from b87c697 to 9cc2e3f Compare August 10, 2026 17:59
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord labels Aug 10, 2026
@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from 9cc2e3f to b3784c3 Compare August 10, 2026 18:09
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 10, 2026, 8:58 PM ET / August 11, 2026, 00:58 UTC.

ClawSweeper review

What this changes

The PR makes Control UI Cloud-worker recovery use an opaque Gateway-issued scope for trusted-proxy browser authentication and migrates eligible older credential-scoped recovery records.

Merge readiness

⛔ Blocked by patch quality or review findings - 8 items remain

Keep open: the compatibility migration can move a pending Cloud-worker task from a cached device credential into a different trusted-proxy user’s recovery namespace.

Priority: P1
Reviewed head: 841ac53f26084bfad76b97b803877de6a3d51b62

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The real behavior evidence is useful, but the remaining cross-principal migration defect blocks merge.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The PR body provides a sanitized trusted-proxy browser result and reports a real Gateway plus Chromium transport E2E; the remaining gap is adversarial ownership coverage, not missing proof.
Patch quality 🦪 silver shellfish (2/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body provides a sanitized trusted-proxy browser result and reports a real Gateway plus Chromium transport E2E; the remaining gap is adversarial ownership coverage, not missing proof.
Evidence reviewed 5 items Unverified migration source: The browser derives a legacy scope from a hello device token or its locally selected device/shared token, then migrates that scope into the Gateway-provided principal scope.
Trusted-proxy bypasses device-token verification: Once trusted-proxy authentication has set authOk, the device-token candidate path returns without verifying the credential supplied by the browser.
Gateway destination is principal-derived: The new scope is derived from the authenticated profile or auth user, so an unverified cached credential can be promoted into another authenticated principal's namespace.
Findings 1 actionable finding [P1] Prevent cross-principal recovery migration
Security Needs attention Unverified credential-to-principal migration: The client promotes a cached credential-scoped recovery record after trusted-proxy authentication without proof that the credential belongs to that proxy-authenticated user.

How this fits together

The Gateway authenticates Control UI browsers and returns a recovery scope in its hello response. The New Session Cloud-worker flow uses that scope to isolate and resume pending dispatches stored in browser session storage.

flowchart LR
A[Control UI browser] --> B[Gateway authentication]
B --> C[Hello recovery scope]
C --> D[Recovery record migration]
D --> E[Session storage]
E --> F[Cloud worker resume]
Loading

Before merge

  • Prevent cross-principal recovery migration (P1) - Trusted-proxy authentication succeeds before a browser-supplied device token is verified, but this path hashes that cached token and migrates its pending task into the proxy-authenticated user's scope. In a shared browser that changes from user A to user B, user A's task can resume for B. Require Gateway-attested source ownership or skip this promotion, and add the A-to-B regression.
  • Resolve security concern: Unverified credential-to-principal migration - The client promotes a cached credential-scoped recovery record after trusted-proxy authentication without proof that the credential belongs to that proxy-authenticated user.
  • Resolve merge risk (P1) - A shared trusted-proxy browser can authenticate user B while still submitting user A’s cached device token, allowing A’s pending task to be migrated and resumed for B.
  • Resolve merge risk (P1) - The current exact-head merge tree is dirty and its UI E2E shard is failed; rerun exact-head CI after the ownership repair.
  • Complete next step (P2) - A narrow mechanical repair can eliminate unverified credential-to-principal recovery promotion.
  • Improve patch quality - Require Gateway-attested ownership or skip trusted-proxy principal migration.
  • Improve patch quality - Add a shared-browser user-A-to-user-B regression.
  • Improve patch quality - Re-run the failed exact-head UI E2E merge-tree check.

Findings

  • [P1] Prevent cross-principal recovery migration — ui/src/api/gateway.ts:543-556
  • [high] Unverified credential-to-principal migration — ui/src/api/gateway.ts:543
Agent review details

Security

Needs attention: The migration can associate pending task content with the wrong authenticated principal.

PR surface

Source +14, Tests +301, Generated 0. Total +315 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 12 106 92 +14
Tests 7 337 36 +301
Docs 0 0 0 0
Config 0 0 0 0
Generated 1 19 19 0
Other 0 0 0 0
Total 20 462 147 +315

Review metrics

Metric Value Why it matters
Production vs test delta production +92/-92 (net 0); tests/test support +351/-36 (net +315); generated +19/-19 The PR adds substantial regression coverage while keeping production size neutral.

Stored data model

Persistent data-model change detected: migration/backfill/repair: ui/src/api/gateway.node.test.ts, serialized state: src/gateway/server.auth.trusted-proxy-device-autoapprove.test.ts, serialized state: src/gateway/server/ws-connection/connect-hello.ts, serialized state: ui/src/api/gateway.node.test.ts, serialized state: ui/src/lib/sessions/cloud-recovery.ts, serialized state: ui/src/pages/new-session/cloud-recovery.test.ts. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #107670
Summary: This PR is a candidate repair for credential-scoped Cloud-worker recovery introduced by the original merged Control UI feature.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Prove source ownership before promotion (recommended)
    Only migrate a credential-scoped recovery record when the Gateway can attest that its source credential belongs to the authenticated trusted-proxy principal.
  2. Skip principal-scope legacy migration
    Retain old-v4 fallback but do not promote legacy credential rows into trusted-proxy principal scopes until an ownership proof is available.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Require Gateway-attested ownership for credential-to-principal recovery migration and add the shared-browser user-A-to-user-B regression.

Technical review

Best possible solution:

Keep Gateway-issued recovery ownership, but require Gateway-attested source ownership before promotion or skip legacy promotion when the destination is a trusted-proxy principal scope.

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

Yes. Source shows trusted-proxy auth bypasses device-token verification while the browser derives and promotes recovery from its cached device token.

Is this the best way to solve the issue?

No. Gateway-owned recovery scope is the correct boundary, but the compatibility migration needs proof that the source credential belongs to the current authenticated principal.

Full review comments:

  • [P1] Prevent cross-principal recovery migration — ui/src/api/gateway.ts:543-556
    Trusted-proxy authentication succeeds before a browser-supplied device token is verified, but this path hashes that cached token and migrates its pending task into the proxy-authenticated user's scope. In a shared browser that changes from user A to user B, user A's task can resume for B. Require Gateway-attested source ownership or skip this promotion, and add the A-to-B regression.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 32894a3ba508.

Labels

Label justifications:

  • P1: The defect can resume a pending Cloud-worker task under a different authenticated user.
  • merge-risk: 🚨 session-state: The PR migrates pending Cloud-worker dispatch records between recovery namespaces.
  • merge-risk: 🚨 security-boundary: The migration crosses from browser-held credential identity to Gateway-authenticated principal identity.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body provides a sanitized trusted-proxy browser result and reports a real Gateway plus Chromium transport E2E; the remaining gap is adversarial ownership coverage, not missing proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides a sanitized trusted-proxy browser result and reports a real Gateway plus Chromium transport E2E; the remaining gap is adversarial ownership coverage, not missing proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body provides a sanitized trusted-proxy browser result and reports a real Gateway plus Chromium transport E2E; the remaining gap is adversarial ownership coverage, not missing proof.

Evidence

Security concerns:

  • [high] Unverified credential-to-principal migration — ui/src/api/gateway.ts:543
    The client promotes a cached credential-scoped recovery record after trusted-proxy authentication without proof that the credential belongs to that proxy-authenticated user.
    Confidence: 0.98

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/api/gateway.node.test.ts ui/src/pages/new-session/cloud-recovery.test.ts src/gateway/server.auth.trusted-proxy-device-autoapprove.test.ts.
  • [P1] pnpm test ui/src/e2e/control-ui-auth-transports.e2e.test.ts ui/src/e2e/new-session-page.cloud-startup.e2e.test.ts.

What I checked:

  • Unverified migration source: The browser derives a legacy scope from a hello device token or its locally selected device/shared token, then migrates that scope into the Gateway-provided principal scope. (ui/src/api/gateway.ts:543, 841ac53f2608)
  • Trusted-proxy bypasses device-token verification: Once trusted-proxy authentication has set authOk, the device-token candidate path returns without verifying the credential supplied by the browser. (src/gateway/server/ws-connection/auth-context.ts:279, 841ac53f2608)
  • Gateway destination is principal-derived: The new scope is derived from the authenticated profile or auth user, so an unverified cached credential can be promoted into another authenticated principal's namespace. (src/gateway/server/ws-connection/connect-hello.ts:80, 841ac53f2608)
  • Prior blocker continuity: The previous ClawSweeper review identified cross-principal recovery migration; the final head still contains the client-side promotion path, while its new tests cover principal scope generation but not a shared-browser user-A-to-user-B migration. (src/gateway/server/ws-connection/connect-hello.update-scope.test.ts:222, 841ac53f2608)
  • Current-main inspection limitation: The local checkout is behind origin and its partial clone required unavailable GitHub network access, so no current-main equivalence or release conclusion is asserted.

Likely related people:

  • Peter Steinberger: Authored the current PR commits and the earlier merged Cloud-worker Control UI feature. (role: feature owner and recent area contributor; confidence: high; commits: 3ebbf954424f, 841ac53f2608, 4f0e131cd270; files: ui/src/api/gateway.ts, src/gateway/server/ws-connection/connect-hello.ts, ui/src/lib/sessions/cloud-recovery.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-08-10T18:59:51.619Z sha b3784c34b4ef5bc9d2af692ad445eb3bb01a6d87 :: found issues before merge. :: [P1] Preserve recovery for older v4 Gateways
  • reviewed 2026-08-10T19:51:13.328Z sha 4cc584d8344dab4a952bee232ace981941a15cfa :: needs changes before merge. :: [P1] Preserve recovery for older v4 Gateways | [P1] Migrate existing recovery records to the new scope
  • reviewed 2026-08-10T20:03:23.925Z sha 06ae4a2a26848c2cfefd0e13afa474a2b5d51519 :: found issues before merge. :: [P1] Preserve recovery for older v4 Gateways | [P1] Migrate pending recovery records to the new scope
  • reviewed 2026-08-10T21:51:02.326Z sha 221dd72 :: needs changes before merge. :: [P1] Do not rekey a credential-owned row to another human
  • reviewed 2026-08-10T22:57:25.401Z sha fa13b40bb43486028d1e21895129e4c8c7787b01 :: needs changes before merge. :: [P1] Do not rekey a credential-owned row to another principal
  • reviewed 2026-08-11T00:02:27.731Z sha f84f5d90d24437a63994f6e620b4be851287913d :: found issues before merge. :: [P1] Prevent cross-principal recovery migration

@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from 1ae9a19 to 4cc584d Compare August 10, 2026 19:25
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 10, 2026
@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from efd4f10 to 9b96646 Compare August 10, 2026 21:36
@openclaw-barnacle openclaw-barnacle Bot removed the channel: discord Channel integration: discord label Aug 10, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Both prior P1 findings are addressed on 9b9664646dbacf46ead4aec58ea8375bf6815c8d:

  • Older compatible v4 Gateways that omit auth.recoveryScope retain the exact shipped credential-derived SHA-256-hex scope.
  • When a new Gateway scope is present, the same current handshake credential proves and migrates exact pending recovery rows before readiness. The migration is write-before-delete, preserves source state on collision/write/delete failure, and scans no unrelated gateway or scope.

Added regressions cover old-v4 fallback, seeded pre-upgrade recovery resumption, collision/write failure preservation, stale handshake rejection, and canonical human-principal isolation. Final production LOC is net −2. Focused tests, browser E2Es, build, protocol/SDK checks, test types, changed gates, and final autoreview are green.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from 9b96646 to 221dd72 Compare August 10, 2026 21:43
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final upgrade-compatible head: 221dd72da40423ccf31ebfac3a35072bd71d7266. The prior request preceded the compatibility commits/rebase; please evaluate this head. Both P1s now have focused unit and browser-E2E regressions, and production LOC is net −2.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 11, 2026
@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from 3a62ba7 to 841ac53 Compare August 11, 2026 00:16
@clawsweeper clawsweeper Bot added 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. labels Aug 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The prior cross-principal migration finding is addressed on the new head: the Gateway now authorizes legacy migration only for device-token-owned recovery scopes, and a shared-browser principal-switch regression proves an authenticated user cannot inherit a stale credential owner's pending task.

@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch 4 times, most recently from 8006826 to 61be24d Compare August 11, 2026 02:42
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at exact head 61be24d4fc742a5abc735db99674cc573b203e7c.

  • Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/31453167540 — green, including the corrected compact Gateway shard.
  • Focused proof: 17 Gateway tests, 74 UI recovery/client/storage tests, and 9 browser E2Es passed; protocol parity, SDK API baseline, changed-path gate, and final Codex autoreview are clean.
  • Architecture: the Gateway owns the opaque recovery scope and authorizes legacy migration only for device-token-owned scopes; the shared-browser principal-switch regression proves a stale credential owner’s task is neither moved nor resumed for another trusted-proxy principal.
  • Production LOC: +92/-92, net 0.
  • Remote proof backend was unavailable during the changed gate, so the documented trusted-source local fallback ran. Signed-in Safari capture remains unavailable because the browser relay was offline; real Gateway + trusted-proxy + Chromium proof passed.

@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from 61be24d to b1c2226 Compare August 11, 2026 03:19
@steipete

steipete commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready proof for final head 17998024b6d86911d59163610b561dc957ea291c.

  • Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/31455813394 — green, including the corrected compact Gateway shard.
  • Focused proof: 17 Gateway tests, 74 UI recovery/client/storage tests, and 9 browser E2Es passed; protocol parity, SDK API baseline, changed-path gate, and final Codex autoreview are clean.
  • Architecture: the Gateway owns the opaque recovery scope and authorizes legacy migration only for device-token-owned scopes; the shared-browser principal-switch regression proves a stale credential owner’s task is neither moved nor resumed for another trusted-proxy principal.
  • Production LOC: +92/-92, net 0.
  • Remote proof backend was unavailable during the changed gate, so the documented trusted-source local fallback ran. Signed-in Safari capture remains unavailable because the browser relay was offline; real Gateway + trusted-proxy + Chromium proof passed.

Merged as 7dbc2916a30cb32348cb7e512b78c5010382c265.

Allow trusted-proxy and other authorized browser sessions to use cloud workers without deriving recovery ownership from client-visible credentials or Web Crypto. The Gateway now emits an opaque principal-bound recovery scope.
Keep the shipped credential-derived scope for older v4 Gateways and migrate credential-proven pending recovery rows to the Gateway-owned namespace before publishing readiness.
@steipete
steipete force-pushed the steipete/upbeat-greider-ef8777 branch from b1c2226 to 1799802 Compare August 11, 2026 03:34
@steipete
steipete merged commit 7dbc291 into main Aug 11, 2026
125 checks passed
@steipete
steipete deleted the steipete/upbeat-greider-ef8777 branch August 11, 2026 03:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 11, 2026
)

* fix(ui): make cloud recovery scope gateway-owned

Allow trusted-proxy and other authorized browser sessions to use cloud workers without deriving recovery ownership from client-visible credentials or Web Crypto. The Gateway now emits an opaque principal-bound recovery scope.

* test(gateway): type recovery scope fixture

* fix(ui): preserve cloud recovery across upgrades

Keep the shipped credential-derived scope for older v4 Gateways and migrate credential-proven pending recovery rows to the Gateway-owned namespace before publishing readiness.

* perf(ui): lazy-load recovery migration

* fix(ui): preserve canonical recovery promotion

* test(ui): use deterministic provider navigation

* fix(ui): authorize recovery scope migration

* build(plugin-sdk): refresh recovery compatibility baseline

* test(gateway): expect recovery migration authorization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant