Skip to content

feat: invite members as existing people on a claw - #198773

Merged
jalehman merged 1 commit into
mainfrom
openclaw-550a/invite-profile
Nov 14, 2026
Merged

jalehman merged 1 commit into
mainfrom
openclaw-550a/invite-profile

Conversation

@jalehman

@jalehman jalehman commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Inviting someone who already has a personal profile on a claw currently gives them a second profile instead of keeping their name and conversations together.

User Impact

With the OpenClaw ID lab enabled, the Gateway owner can choose Existing person on this claw when inviting someone. The approval card says Will join as that person. The owner's choice and approval are sufficient: no member confirmation or matching profile email is required. Shared-owner, already-linked and externally delegated profiles cannot be selected. Unbound invitations work as before.

If the selected profile is removed, merged or claimed before approval, the member joins through the normal profile path and Access explains why. Membership permissions still come from the approved role, not the selected profile. No migration or setup change is required.

Why This Change Was Made

Keep the selection in the Gateway's existing local invitation report, then use the canonical profile linker before committing the signed approval. The selection never enters the signed invite, published authority or Discovery payload. Existing report cleanup owns its lifetime.

Evidence

  • 65 focused tests passed: 25 People UI tests and 40 Gateway/state tests. UI regressions failed on the base before implementation.
  • Persistence tests cover restart, invalid signatures, exact-profile linking, deleted/merged/taken selections, existing-account preservation, unbound behavior and exclusion from Discovery publication.
  • Core, plugin and affected test typechecks passed; changed-file lint, formatting and diff checks passed.
  • Independent Astra review found one P2: exclude externally delegated profiles. Verified and fixed with a real-worker regression; no remaining verified findings.
  • Full builds and native tunnel build passed on an isolated Mac Studio checkout. Before/after captures below are from the real Gateway, not UI mocks.
  • Exact-head live proof passed: real Chromium through the deployed staging loader. Selected profiles retained identity, display and an existing conversation without duplicates; taken-profile fallback showed its reason; unbound approval created a new profile. Desktop and 400px mobile inspected.
  • v2026.11.3-to-head upgrade proof passed: verified backup, pinned source update and Doctor preserved all authored settings, 3 profiles, both session IDs/owners and exact transcript messages. Real deployed-loader admission then linked the member to a pre-upgrade profile, preserving its preference and conversation with profile count 3 → 3. The stable release predates OpenClaw ID, confirmed by its missing implementation and unknown-method response. Five sanitized screenshots render on GitHub; all throwaway resources were cleaned up.

Before

Before: invitations always create a new person

After

After: the owner can choose an existing personal profile

Simplification and focused checks

Reuses the invitation-report store/lifetime, authority serializer and canonical profile linker. No new schema, cache, retry, migration or signed protocol fields. Both registration transports share one metadata decoder. The smallest coherent stage is the complete owner-selected invitation path.

Against the merge base: production +263/-30, tests/support +327/-3, docs +18/-0. Necessary growth is the picker, local metadata, atomic exact-target refusal handling and distinct identity/persistence regressions; no test infrastructure was added.

pnpm test extensions/openclaw-id-access/browser/people-page.test.tsx --maxWorkers=1
pnpm test src/gateway/openclaw-id/member-profiles.persistence.test.ts src/state/user-profile-openclaw-id.test.ts src/gateway/openclaw-id/service.invites.test.ts src/gateway/openclaw-id/tunnel-api.test.ts src/gateway/openclaw-id/account-link-handler.test.ts --maxWorkers=1
pnpm tsgo:core
node scripts/run-tsgo.mjs -p extensions/openclaw-id-access/tsconfig.json --noEmit

🦞 Made with OpenClaw

@clawsweeper

clawsweeper Bot commented Nov 14, 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 docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime plugin: openclaw-id-access size: L labels Nov 14, 2026
@github-actions

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: 47ca52bae53777288c27ac7587f6ad701d76bbe1
  • 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.

@jalehman

jalehman commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Real-product proof — 47ca52b

Passed in real Chromium through the deployed staging loader, issuer, Discovery and relay, with an isolated Mac Studio Gateway built at this exact head. No mocked membership, direct database identity injection during admission, local loader override or model/provider key.

Setup used three pre-existing personal profiles created through the production canonical Tailscale-profile writer against offline isolated state. The owner created and assigned an existing conversation through the Gateway API before inviting. All accounts were throwaway @mailbox.openclaw-id-staging.test accounts. The old local profile email intentionally differed from the invitation email.

Scenario Observed result
Owner selects Mia Existing; real member redeems; owner approves Member users.self resolved to pre-existing profile ec7b3f12-523b-43bc-ae12-7e5de6fa8495; Settings retained “Mia Existing”; existing conversation remained visible and owned by that profile. Total profiles stayed 4 → 4.
Two invitations select Sam Existing before either approval First real member claimed 4004e0c0-3cc4-4352-80e1-ff7cc2675b6e; count stayed 4. The second was admitted as new profile e9f54682-6b23-4206-8d03-4d37961bbf5a; count became 5. Sam stayed with the first account.
Taken-profile explanation Owner saw: “The selected profile is now linked to another OpenClaw ID account. The member joined with their OpenClaw ID profile instead.” The approved invite retained that reason.
Default/unbound invitation Real redemption and approval created distinct profile b9249b4e-4e5c-42d6-ad40-a033fea79487, count 5 → 6, with no selected-profile metadata.
Eligibility and responsive UI Picker listed only the three unlinked personal profiles, never the shared owner. Desktop and 400px mobile inspected; no horizontal overflow.

The member identity probe opened an actual signed Gateway connection through the loader's browser transport and called users.self / sessions.list; it did not use the loopback owner's identity. The existing conversation was opened in the admitted member's real UI. No generated response was needed.

Owner approval names the existing person

Pending approval: Will join as Mia Existing

The admitted member retains their profile

Member profile still named Mia Existing

Their existing conversation remains available

Member can open Existing project notes

Taken-profile fallback is explained

Owner sees fallback explanation while both existing people retain their profiles

Invite capabilities are redacted; screenshots contain only throwaway identities. Before/after PR body images were also verified to load and render in Chromium.

Evidence retained locally: reports/ocf-534-invite-profile-live/proof/result.json, inspected proof/*.png, pr-media-render.json, and exact-head build/Gateway logs. Cleanup is verified: all five throwaway issuer sessions signed out; the proof claw was retired, with zero claw/member/relay-key/unretired-hostname rows; the hostname tombstone remains. Owned Gateway and tunnel processes exited, both ports closed, Studio worktree/state and local credentials/recovery kit removed, and a fresh nonblocking flock verified release of the staging lock. Mailbox records are intentionally left by the retirement script. Personal app, normal profile, Keychain and running Gateway were untouched.

All six published images were checked in Chromium on this PR: visible, fully loaded, nonzero intrinsic dimensions.

@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR lets owners invite OpenClaw ID members into existing personal profiles while retaining their names and conversations.

Example: The owner invites a member as Mia Existing, who already owns a conversation.

  • Before: Approval creates a separate OpenClaw ID profile.
  • After: Approval links the account to Mia Existing, preserving the conversation and leaving the profile count unchanged.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Complete, focused feature with shipped-entry-point and upgrade evidence, no actionable finding, and no remaining review blocker.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Exact-head Chromium proof exercises owner selection, real redemption and approval, authenticated member identity and conversation access, taken-profile fallback, and unbound admission; the subsequent stable-to-head report covers persisted invite metadata and canonical identity-link compatibility while preserving settings, profiles, preferences, sessions, and transcript messages.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Inviting someone who already has a personal profile separates their new remote identity from their existing name and conversations.
Reason: The maintainer-authored direction provides clear value while retaining the existing default, Labs gate, storage lifetime, and profile owner.

Merge readiness

✅ Ready for maintainer review

This maintainer-authored feature is useful and ready for landing; the previous upgrade blocker is resolved, and no actionable patch defect was found.

Priority: P2
Reviewed head: 47ca52bae53777288c27ac7587f6ad701d76bbe1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Access plugin sends the owner's profile selection to Gateway invitation registration; signed approval then uses the canonical state worker to link the account and publish the outcome.

flowchart TD
  A[Owner Access page] --> B[Gateway invite registration]
  B --> C[Local invitation report]
  D[Signed member approval] --> E[Membership authority]
  C --> E
  E --> F[Canonical profile worker]
  F --> G[Existing profile and conversations]
Loading

Technical review

Best possible solution:

Land the existing owner-selected invitation path using the current invitation store and canonical profile linker.

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

Current-main profile creation follows the OpenClaw ID account identity and lacks this invitation selection; the supplied real-product proof demonstrates the new path without executing target code during review.

Is this the best way to solve the issue?

The patch is a coherent, focused implementation: selected approval preserves the exact profile, unavailable selections use the existing member path with an explanation, and membership authority remains signed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0dbfc6e1c45f.

Provenance checked

  • Invitation display and registration keeps the original intent (improve(ui): polish the Remote access people page #196686: Keep invitations easy to scan and preserve signed operations, role limits, operation feedback, and independent node controls.)
  • Member-profile retention and invitation cleanup keeps the original intent (428ca7d: Retain canonical member profiles independently of expiring invitation reports and publish authority only after persistence.)
  • Canonical OpenClaw ID linking authorization changes intended behavior with a stated reason (feat(openclaw-id): link your OpenClaw ID so your owner devices connect as you #197628: Personal self-linking originally proves both identities on one connection; this maintainer-authored feature explicitly adds owner selection and signed member approval as another authorized caller.)
  • Missing-profile link outcome keeps the original intent (07c8e14: The linker refuses redirection after a merge; returning profile_changed for a deleted target extends that exact-target refusal contract to invitation fallback.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced changes: The pinned introduction adds the picker, local invitation metadata, canonical linking, fallback explanations, and focused persistence coverage without changing dependencies or signed protocol fields. (47ca52bae537)
  • Approval and identity ownership: Signed approval is validated before retainMemberProfiles invokes the existing canonical linker; its transaction preserves exact-target, shared-owner, existing-account, and already-linked-profile checks. (src/gateway/openclaw-id/member-profiles.ts:94, 47ca52bae537)
  • Eligibility and persistence: Candidate reads exclude shared-owner, merged, OpenClaw ID-linked, and delegated profiles; optional existingProfile metadata uses the existing invite-reports storage and cleanup lifetime. (src/state/user-profile-openclaw-id.read.ts:154, 47ca52bae537)
  • Exact-head product proof: The author's live report documents real Chromium admission through the deployed loader, preserved profile identity and conversation, taken-profile fallback, and ordinary unbound approval; four prepared before/after and live screenshots were directly inspected. feat: invite members as existing people on a claw #198773 (comment). (47ca52bae537)
  • Previous upgrade blocker resolved: The new exact-head upgrade report documents verified backup, same-state upgrade from v2026.11.3, preserved settings and three profiles, exact transcript equality, and successful admission into a pre-upgrade profile with count 3 → 3. feat: invite members as existing people on a claw #198773 (comment). (47ca52bae537)
  • Stable compatibility boundary: The latest stable tree contains neither the OpenClaw ID Gateway implementation nor its Access plugin, supporting the upgrade report's use of existing personal profiles rather than unavailable stable invitation state. (847611dcaa3b)

Likely related people:

  • Josh Lehman: Raw commit 07c8e14 adds src/state/user-profile-openclaw-id.worker.ts:128 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 07c8e1411b79; files: src/state/user-profile-openclaw-id.worker.ts)

PR surface

Source +233, Tests +324, Docs +18. Total +575 across 22 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 17 263 30 +233
Tests 4 327 3 +324
Docs 1 18 0 +18
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 22 608 33 +575

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 P2: A useful identity-continuity improvement confined to the opt-in OpenClaw ID Labs invitation flow.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A useful identity-continuity improvement confined to the opt-in OpenClaw ID Labs invitation flow.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • 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 (1 earlier review cycle)
  • reviewed 2026-11-14T09:02:35.419Z sha 47ca52b :: blocked before merge. :: none

Reviewed November 14, 2026, 4:44 AM ET / 09:44 UTC (Revision 2).

@jalehman

Copy link
Copy Markdown
Contributor Author

Upgrade compatibility proof — passed

From: shipped tag v2026.11.3 (847611dcaa3bf0e2783335f961dd1fd0580e4d9f).
To: exact PR head 47ca52bae53777288c27ac7587f6ad701d76bbe1.

Real pre-upgrade state

On an isolated Mac Studio source installation, two synthetic people authenticated through the real Gateway's trusted-proxy path. Product RPCs created their display names, saved preferences, two owned sessions and one retained transcript message per session. No raw SQL, fabricated membership or storage mocks were used. Chromium rendered the old conversation before upgrading.

The released tag has no OpenClaw ID Gateway implementation or Access plugin; its running Gateway returns unknown method: openclawId.people. Therefore a linked claw/invite/member cannot be created on this release. The proof covers the personal data it actually supports, then creates ID state after upgrading.

Supported same-state upgrade

Used the documented manual source-update sequence: stop the owned foreground Gateway; openclaw backup create --verify; move the same checkout to the pinned candidate; frozen install; the supported pnpm build:runtime variant plus pnpm build:iroh; openclaw doctor --fix --yes; restart against the same HOME, profile, config, workspace and state directory. Backup verification, both candidate builds and Doctor completed successfully.

Verified before enabling ID on the candidate:

  • All 3 profiles preserved, including both personal IDs and display names.
  • Both session IDs, owner identities and assignment facts preserved.
  • Both chat.history message arrays exactly equal before and after.
  • Every previously authored config setting preserved. Writer/Doctor metadata and version-dependent effective defaults are not user settings.
  • The existing conversation still renders in Chromium. Added avatar URLs are presentation, not changed ownership.

Selected-profile admission on the upgraded data

The owner selected Mia Before Upgrade, then a throwaway member redeemed the actual invitation in Chromium through the deployed staging loader. The owner approved the real pending request.

The member's authenticated users.self resolved to the original profile 17402495-a72a-4087-bd4a-06e5b716a77f; Profile settings still showed Mia's old name and email. The member could open the pre-upgrade conversation and read the original saved preference (preserve-existing). Profile count stayed 3 → 3: no duplicate. The member's account email differed from the old profile email.

No compatibility defect was found; no branch changes were needed. Exact-head PostgreSQL conformance (all three shards and pg16 smoke) and openclaw/ci-gate are green.

Inspected screenshots

Before upgrade: conversation saved on v2026.11.3

Released-version conversation before upgrade

After upgrade: the same conversation

Same conversation after upgrading to the PR head

Owner approves the pre-upgrade person

Owner approval selects Mia Before Upgrade

Member arrives as the existing profile and opens its conversation

Admitted member retains the pre-upgrade profile

Admitted member reads the pre-upgrade conversation

Isolation and cleanup

Separate HOME, profile, state, config, workspace, temporary/cache paths and port. Josh's app, normal state, Keychain and personal Gateway were not used or changed. Staging use held the exclusive lock throughout. Both issuer sessions were signed out; the throwaway claw was retired and absence verified; the Gateway and tunnel stopped; owned remote state, backup, checkout and local credentials were removed; the lock was released and checked. Screenshots were inspected and cropped/redacted before upload.

@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 14, 2026
@jalehman
jalehman merged commit e741fd0 into main Nov 14, 2026
158 of 162 checks passed
@jalehman
jalehman deleted the openclaw-550a/invite-profile branch November 14, 2026 14:53
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 14, 2026
* commit 'e741fd0d21ff7f9857a9c49f91d95166beaae83f':
  feat: invite members as existing people on a claw (#198773)
  fix(anthropic): report owner loss after a broken CLI input pipe (#198778)
  feat(browser): support experimental Kitesurf browsing (#198833)
  fix(bench): require the state-reader task counter (#198912)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
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 P2 Normal backlog priority with limited blast radius. plugin: openclaw-id-access proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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.

1 participant