Skip to content

feat(openclaw-id): owners can approve a member's new browser - #200088

Merged
jalehman merged 10 commits into
mainfrom
feat/ocf-551-owner-approves-member-browser
Nov 16, 2026
Merged

jalehman merged 10 commits into
mainfrom
feat/ocf-551-owner-approves-member-browser

Conversation

@jalehman

@jalehman jalehman commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Related: OCF-551 (Linear) · companion PRs: openclaw/discovery#18, openclaw/claw-loader#37

What Problem This Solves

Fixes: a member who loses their only approved browser (site data cleared, new machine) is locked out of the claw until the owner sends a new invite.

User Impact

User impact: a current member can ask the owner to approve a new browser for their existing account. The owner gets an Inbox item ("Browser request from …", marked unverified) and approves by typing the six-digit code the member reads to them over a channel they trust. The member keeps the same account, role and access; no new invite is needed. Owners who are not on their own Control UI can follow the Inbox link to the loader approval page.

Why This Change Was Made

Discovery's sender metadata is untrusted, so a one-click approval based on it would let a compromised Discovery impersonate a member. The claimed account is bound into the SAS commitment and the owner must enter the code the member reads; the owner never sees the code. Approval reuses add_member_device, so role and owner lineage are unchanged and membership/owner capability are rechecked at commit time. The Inbox notice is display-only: bounded per member (one live notice, three accepted request IDs per rolling 30 minutes), refused for non-members and removed members, retired on approval, denial or removal, and grants nothing. Denial and cancellation always retire the request and send the SAS abort before best-effort notice cleanup.

Landing order (three repos): openclaw → discovery → claw-loader. Discovery and the loader vendor the OpenClaw ID protocol synced byte-for-byte from openclaw 8b0ce1f85d901502a4099905d9609d601c521d0f; the protocol change is an unshipped v1-draft addition (new member_account_id SAS binding and a display-only member_browser_request notice), with no version bump and no change to signed statements, certificates, admission rules or Discovery grants. Recovery kit (OCF-552) PRs will follow and rebase onto these.

Evidence

  • Mac Studio acceptance at b307684bdb5a, with suites run serially and workers capped at eight: Gateway/protocol 709 passed (101 files; 23 tests in two files skipped); scoped UI/Inbox 273 passed, three isolated lazy-import regressions passed, and the retention E2E passed; dedicated Chromium presentation 31 passed across three files. UI production types, changed test-graph types, changed-file lint/format, all baseline ratchets, additional boundaries, import-cycle/madge and Kysely checks passed.
  • Startup performance passed on the same Studio against a97d3d4f033a, without changing performance budgets. pnpm ui:check-performance:base a97d3d4f033a258136c963f8c7d1fc55ee6cae92: chat boot gzip 1,313,429 → 1,312,751 B (-678 B); new boot 815,897 → 815,219 B (-678 B); initial startup 91,024 B unchanged. Largest ordinary JS is 558.2 KiB gzip. Existing base CSS ceiling warnings and chat request-count excess remain inherited; the same-base gate passes. Owner Inbox actions load only on activation, with captured presentation/client lifetime checks and recovery refresh covering even an outer chunk-load failure.
  • Actual-main database upgrade proof on the Studio: main 6f5d3b399b31855501cc3f38f1221f7165554c59 used its real compiled state worker to create a physical state DB with OpenClaw ID data, an unrelated sentinel and a profile. Candidate b307684bdb5a opened that DB, accepted a member-browser notice, closed/reopened, cancelled it, and closed/reopened again. The plugin_state_entries table/index SQL, all eight prior logical plugin-state rows, and the one profile remained unchanged; the new notice key persisted and retired correctly. The temporary proof harness ran under the existing database-worker test project; original tests were restored afterward.
  • Independent reviews of each repo and the UI repair delta; verified findings fixed with regressions, including the configured-base-path Access link and the outer lazy-import failure's recovery refresh. Earlier lifecycle races, notice-before-abort ordering, stale cached requests and post-expiry admission remain covered.
  • Earlier end-to-end proof, before these UI review repairs: an isolated Gateway on fsn1 with production loader/Discovery and native iroh passed 9/9 stages — invite, member site-data wipe and request, local Control UI deny, member cancel→retry, remote owner deny→retry, typed-code approval through Inbox → loader (same account/profile/role/scopes; one browser added), removed-member refusal, and rate limiting while direct SAS still works. This is historical cross-repository flow proof, not a claim that the entire live flow was rerun at the final UI head. The later review corrections were validated on the Studio above; protocol bytes are unchanged from 8b0ce1f85d90.
  • Screenshots of owner Inbox, owner code entry (no code shown), and member screens were reviewed at 390 and 1440, light/dark; the mounted owner approval and Inbox presentation suites pass on the final head.
  • Gaps: browser proof is Chromium only. Linux WebKit rejects some valid X25519/Ed25519 keys (OCF-553, upstream WebKit issue); real Safari remains unverified. Hosted CI is separate from the local Studio evidence.

🦞 Made with OpenClaw

@clawsweeper

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

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: b307684bdb5a585e32241f007d08dc9c89231bfd
  • Maintainer: @jalehman
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/openclaw-id/authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Lets owners approve an existing member’s new browser through an unverified Inbox request and a member-read verification code.

Example: Alice, an operator, clears her only approved browser’s site data.

  • Before: The owner must invite Alice again.
  • After: Alice requests approval and reads code 482917 to the owner, who approves another browser under her existing account and role.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The earlier defects are repaired and exact-head CI passes, but the supplied artifacts do not establish the changed shipped approval behavior.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A current member who loses their last approved browser cannot return without another invitation.
Reason: The maintainer-authored direction supplies a useful recovery path while preserving account identity, role, and existing admission authority.

Merge readiness

✅ Ready for maintainer review

This PR adds useful, maintainer-approved recovery behavior that main lacks; all four earlier findings are resolved, and no new correctness defect was verified.

Priority: P2
Reviewed head: b307684bdb5a585e32241f007d08dc9c89231bfd

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: An inspectable shipped local-owner Inbox-to-approval trace and before/after approval screenshots are missing; red-before/green-after execution of the review-repair regressions is not shown.
Agent review details

How this fits together

Discovery relays browser requests to the Gateway and owner browser; the existing signed membership authority decides admission, persists state, and publishes membership.

flowchart LR
  A[Member browser] --> B[Discovery mailbox]
  B --> C[Gateway notice store]
  C --> D[Owner Inbox]
  B --> E[Owner SAS approval]
  D --> E
  E --> F[Signed membership authority]
  F --> A
Loading

Technical review

Best possible solution:

Keep the existing SAS, signed admission, and atomic storage owners, with bounded notices serving only discovery and presentation.

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

Current-main source and enrollment documentation establish that losing every approved member browser requires another invitation; no target code was executed during this review.

Is this the best way to solve the issue?

The implementation appropriately extends the existing account-bound SAS and member-device admission paths rather than introducing another authority.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4940240568f1.

Provenance checked

  • Member recovery and owner SAS changes intended behavior with a stated reason (2c8ffdc: Member self-approval reused SAS but deliberately required another invitation after every device was lost; this PR explains owner-assisted recovery and binds the claimed account into comparison.)
  • Approval presentation and uncertain outcomes keeps the original intent (3492199: Expired and uncertain approvals become inactive and direct users to device management; member requests now retain that intent with an Access destination.)
  • Gateway state ownership keeps the original intent (428ca7d: The Gateway owns serialized membership and publication state; new display metadata uses the same writer without entering signed authority.)
  • Canonical member profile retention keeps the original intent (e741fd0: Member display belongs to canonical profiles rather than expired invitation reports; the new views read that existing owner and startup preserves its normalization.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Reviewed scope and current state: The introduced merge-base-to-head diff was inspected separately from base movement; GitHub reports the reviewed head mergeable and clean, and the checkout remains clean. (b307684bdb5a)
  • Earlier recovery findings resolved: Newer idle member attempts replace abandoned ones while submitted admissions remain protected; uncertain member outcomes now link to Access using the configured base path, and confirmation follows denial. (ui/src/lib/openclaw-id/owner-approval.ts:270, b307684bdb5a)
  • Exact-head checks: The exact-head openclaw/ci-gate, control-ui-performance, and security-fast checks succeeded, clearing the earlier attributed asset-budget failure. (b307684bdb5a)
  • Existing authority remains authoritative: The account claim is covered by the SAS commitment and transcript; typed-code approval signs the existing add_member_device operation, whose verifier checks manage_members and whose authority rejects unknown accounts without changing their roles. (ui/src/lib/openclaw-id/owner-approval.ts:513, b307684bdb5a)
  • Persistence compatibility: member-browser-requests chunks use the existing atomic plugin-state replacement owner without SQL schema changes; predecessor-row reopen coverage preserves existing values, and the body records an actual-main worker upgrade preserving prior rows and a profile. (src/gateway/openclaw-id/claw-store.persistence.test.ts:159, b307684bdb5a)
  • Current main still needs this capability: Current-main enrollment documentation explicitly requires another invitation after all member devices are lost, and its owner approval implementation only creates owner devices. (packages/openclaw-id-protocol/docs/enrollment.md:205, 4940240568f1)

Likely related people:

  • Josh Lehman: Raw commit e29577b adds ui/src/lib/openclaw-id/owner-approval.ts:105 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e29577b7d7df; files: ui/src/lib/openclaw-id/owner-approval.ts)
  • Vyctor H. Brzezowski: Raw commit 3492199 adds ui/src/components/openclaw-id/owner-approval-dialog.tsx:61 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 3492199a84ff; files: ui/src/components/openclaw-id/owner-approval-dialog.tsx)

PR surface

Source +635, Tests +1172, Docs +40, Other +9. Total +1856 across 44 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 24 763 128 +635
Tests 16 1182 10 +1172
Docs 3 50 10 +40
Config 0 0 0 0
Generated 0 0 0 0
Other 1 9 0 +9
Total 44 2004 148 +1856

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.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This adds owner-assisted recovery to an opt-in remote-access feature with limited blast radius.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Attach the scoped live-flow evidence and UI screenshots described in realBehaviorProof.

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 (1 earlier review cycle)
  • reviewed 2026-11-16T12:23:16.480Z sha 83e4427 :: blocked before merge. :: [P2] Allow a fresh member request to replace an abandoned attempt | [P2] Send uncertain member admissions to member-device management | [P2] Bring the added UI assets within the enforced budget | [P3] Keep the confirming action last in the approval dialog

Reviewed November 16, 2026, 1:11 PM ET / 18:11 UTC (Revision 2).

@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 16, 2026
@jalehman
jalehman merged commit 1ce9df6 into main Nov 16, 2026
110 checks passed
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@jalehman
jalehman deleted the feat/ocf-551-owner-approves-member-browser branch November 16, 2026 23:00
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
…w#200088)

* feat(openclaw-id): bind member owner-approval claims in SAS

* feat(openclaw-id): approve current member browsers with compared codes

* feat(openclaw-id): define display-only member browser notices

* feat: surface bounded member browser requests in owner Inbox

* fix(openclaw-id): retire denied browser before notice cleanup

* docs: explain member browser request assertion safety

* fix: preserve member browser recovery and approval ownership

* test: account for member approval review regressions

* perf: defer owner inbox action implementation

* test: clarify owner inbox mock isolation
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 gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. security-sensitive-changed size: XL 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.

1 participant