Repository navigation
feat(openclaw-id): link your OpenClaw ID so your owner devices connect as you - #197628
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR links OpenClaw ID accounts to personal profiles so owner devices connect as that person while retaining certificate-based owner authority. Example: Alice links her OpenClaw ID account to her personal profile and reconnects an owner device.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed feature addresses a real identity gap, and the previous stored-role finding is fixed. No additional definite blocking code defect was established. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI proves the account and personal profile, the existing profile worker stores their link, and Gateway connection admission uses it for attribution while certificate authority governs owner access. flowchart LR
A[Personal sign-in] --> B[Control UI link action]
C[OpenClaw ID issuer] --> B
B --> D[Profile identity worker]
D --> E[Gateway connection admission]
F[Owner device certificate] --> E
E --> G[Personal attribution and owner access]
Technical reviewBest possible solution: Use the existing profile identity store for attribution and preserve certificate-based owner authority across the existing Gateway consumers. Do we have a high-confidence way to reproduce the issue? Current-main connection admission attributes OpenClaw ID owner devices to the shared owner, establishing the reported identity gap from source; no runtime reproduction was performed during this read-only review. Is this the best way to solve the issue? The design separates personal attribution from owner authorization and reuses existing sign-in, profile persistence, and certificate owners; the prior stored-role repair now covers all three identified comparisons. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 46350dafd299. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +860, Tests +883, Docs +14, Other +4. Total +1761 across 50 files. Added test files: 5. View PR surface stats
Preflight sourceSource 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
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed November 12, 2026, 10:22 AM ET / 15:22 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
5f6001b to
5bfe343
Compare
be82b88 to
d777cdb
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
d777cdb to
bc7c8ed
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
…ices arrive as you
… authority, keep merged links
…y refresh, recovery grants, backgrounds and skills
…e connection that started it
…e in personal APIs; seed session skills with it
…row keeps its place and retries - users.setRole publishes a role-only change; linked owner runs, recovered runs, cron streams and owner sockets recheck instead of being revoked. Merges still revoke. - The Profile OpenClaw ID row renders from first paint while Labs is on: loading, unavailable on ineligible connections, failed with Retry, or Link/Unlink. - Session skill seeding is tested by the seeded skills, not the mock's arguments.
…xes for role-only publication - Run capture, recovery and cron streams skip the stored-role comparison for a current owner certificate; identity and certificate checks still apply. - The accepted-work regression persists the role change through the profile writer. - users.setRole test expects the role-only publication; link handler mocks keep real exports. - Record the test-line growth for the linked-owner authority tests.
bc7c8ed to
3a06517
Compare
|
Merged via squash.
|
…t as you (openclaw#197628) * feat(openclaw-id): link your OpenClaw ID to your profile so owner devices arrive as you * fix(openclaw-id): fence link writes, keep linked owner devices' owner authority, keep merged links * fix(openclaw-id): keep linked owner authority through dispatch, policy refresh, recovery grants, backgrounds and skills * fix(openclaw-id): a linked sign-in releases its token only to the live connection that started it * fix(openclaw-id): owner exemption only for a current owner certificate in personal APIs; seed session skills with it * fix(openclaw-id): role-only changes keep linked owner work; identity row keeps its place and retries - users.setRole publishes a role-only change; linked owner runs, recovered runs, cron streams and owner sockets recheck instead of being revoked. Merges still revoke. - The Profile OpenClaw ID row renders from first paint while Labs is on: loading, unavailable on ineligible connections, failed with Retry, or Link/Unlink. - Session skill seeding is tested by the seeded skills, not the mock's arguments. * fix(openclaw-id): stored role changes keep linked owner work; test fixes for role-only publication - Run capture, recovery and cron streams skip the stored-role comparison for a current owner certificate; identity and certificate checks still apply. - The accepted-work regression persists the role change through the profile writer. - users.setRole test expects the role-only publication; link handler mocks keep real exports. - Record the test-line growth for the linked-owner authority tests.
Related: #197559 (stacked on it; review that first)
What Problem This Solves
When you connect to your claw from one of your OpenClaw ID owner devices, the Gateway shows you as "Shared owner" rather than as your own profile.
User Impact
With OpenClaw ID Labs on, you can link your OpenClaw ID account to your own personal profile (Profile → Identity → Link). After that, your owner devices connect as you, while keeping full owner authority. Linking and unlinking affect only future connections. A linked owner device is never limited by the named role on the profile it's linked to.
Why This Change Was Made
users.setRolepublishes a role-only change. A linked owner device's runs, recovered runs, cron streams and socket are rechecked, not revoked, because its certificate is unchanged. A merge is still an identity change and still revokes them.Where owner authority is preserved
Profile row states (Labs on): the OpenClaw ID row is there from first paint. It shows Loading, then Link/Unlink on a personal sign-in. On other connections it says "Link over a personal sign-in, such as Tailscale", with no action. If loading fails, it shows an error with Retry. With Labs off the row is absent.
Link and unlink writes are fenced through to commit. They check the live personal connection, the profile and the Labs switch at commit time.
Known limitations (fail closed: they deny, never grant)
Both are tracked as follow-ups blocked by this PR and are intentionally not fixed here.
Evidence
Focused tests pass, including a real-Gateway test with a linked owner whose role is
talker(a role with no read access). It checks profile attribution, admin scope, personal APIs, backgrounds, My Skills, and a config refresh that does not drop the connection.Regression tests for each review finding fail without its fix:
be82b88:users.setRolekeeps a linked owner's captured run (an identity change still revokes it), and keeps its real-Gateway socket and admin access;be82b88: session skill seeding, checked by the actual seeded skills rather than mock arguments;be82b88: the Profile row is present while loading, and a failed load recovers through Retry.bc7c8ed: a stored role change (written through the profile writer, asusers.setRoledoes) keeps a linked owner's run. Run capture, recovery and cron streams no longer compare the stored role for a current owner certificate; identity and certificate checks still apply. This test fails without the fix.Affected files rerun together after
be82b88(role, merge, request context, run authority and recovery, cron streams, identity scopes, linked owner, Profile UI): 15 files pass.pnpm tsgo:core,tsgo:ui,tsgo:test:src,tsgo:test:ui, oxlint,ui:i18n:verifyandcheck:control-ui-controllerspass.Test lines:
config/test-lines-allocations/197628-openclaw-id-link-profile.txtrecords 483 lines over the allowance. These are the regression tests for each review finding on linked-owner authority: dispatch, policy refresh, recovery, stored-role changes, personal APIs, skill seeding, fenced link writes and the Profile row.Restacked on feat(openclaw-id): sign in with OpenClaw ID over a verified personal sign-in #197559's boot-size change: the link option of the device sign-in now lives in the lazily loaded
device-sign-in.ts.Accepted CI failure —
control-ui-performance(+68 B): startup ("new"/"chat" boot) JS grows 68 B gzip against feat(openclaw-id): sign in with OpenClaw ID over a verified personal sign-in #197559's head; main is already over this cap, so only 64 B of build variance is allowed. None of this PR's code is incontrol-ui-boot-shared.js; the only change there is one extra preload-map entry (claw-name) for the Profile page's identity row. Two UI-only workarounds made it larger (+426 B, +228 B). Josh accepted the 68 B on 2026-11-12.Live proof against staging OpenClaw ID
Real Gateways built from this branch, with headless Chromium. The personal identity comes from a trusted proxy on the same host, and approvals happen on the staging issuer.
Upgrade from stable
2026.11.3→ headbe82b88(fsn1, throwaway Gateway and state):openclaw doctor --fixran the standard migrations. Agent database schema 27 comes from main; this PR adds no schema.users.listbefore = after)link_statusreturns the linked account without its account IDOpenClaw ID testnet, head
63ee6b00. Thegatewaylab host ran a throwaway Gateway; the claw's live service wasn't touched. It passed the same link → refuse → unlink checks. A testnet rerun atbe82b88was stopped when an SSM port forward stalled, sobe82b88was proven by the upgrade run above.Not covered live: a real owner-device reconnect over the OpenClaw ID tunnel after linking. Enrolling an owner device needs Discovery enrollment and the tunnel, so the real-Gateway integration test covers that path.
5f6001b): no OpenClaw ID row