Skip to content

feat(gateway): durable owner profile for single-user gateways - #136819

Merged
steipete merged 2 commits into
mainfrom
claude/account-display-rename-ux-3c0d44
Sep 3, 2026
Merged

steipete merged 2 commits into
mainfrom
claude/account-display-rename-ux-3c0d44

Conversation

@steipete

@steipete steipete commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

On a single-user Gateway (token or password auth, the default install) the Control UI sidebar footer showed the literal fallback Account, the footer menu had no profile entry, and Settings → Profile rendered no Identity section at all. There was no way to set a display name or avatar. Only trusted-proxy and Tailscale sign-ins produced a user profile, so the overwhelmingly common single-operator setup had no identity to name and no explanation of why.

Why This Change Was Made

The unidentified operator on a shared-secret Gateway is the owner. Instead of leaving that connection profile-less, the Gateway now ensures one durable local owner profile for it (provider gateway.local, subject owner, stored through the existing user_profile_identities table; no schema change, no config option). The profile is seeded once from the host account's full name (macOS id -F / dscl, Linux GECOS; never the login name, so service accounts do not leak into labels) and is editable through the normal Identity section. All tabs and devices using the shared secret, including device-token reconnects, resolve to the same profile, so the name follows the person.

Gate: operator role, no authenticated user id, and either no gateway.roles configured or a token/password method (the existing shared-secret owner notion). Node, ephemeral CLI/backend/probe, and synthetic clients are excluded. Owner attribution never grants scopes; identity scopes still use only the verified upstream user id. If profile storage fails the connection continues unidentified exactly as before.

Consumers that gated on an email user id now key on the attached profile: users.self, presence projection, presence refresh, online timing. The shared-secret "system actor" marker no longer blocks My GitHub when an owner profile is attached (a system actor without a person stays ineligible).

UI: the fallback label is now Owner (only reachable for genuinely unidentified connections), the identity menu always shows the profile header so Profile stays reachable, and the Profile page explains an unidentified connection instead of rendering nothing.

Attribution-only contract (second commit): the owner profile has the canonical id gateway-owner. Operator-role policy, implicit operator actors, and session-sharing identity exclude that id, so shared-secret, device-token, and no-auth connections keep their pre-existing owner-equivalent visibility and never pick up person-role sandbox requirements; the hello recovery principal derives only from an upstream-verified identity; and the shared-secret system actor is recorded once at the HTTP auth boundary and carried into tool dispatch and session creation instead of being re-derived from "no profile". Checkpoint branches and restart recovery stamped with the owner creator inherit the source sandbox requirement.

Opportunistic: http-auth-utils.ts and connect-session.ts crossed the 700-line lint limit, so their profile-resolution owners moved to http-auth-user-profile.ts and connect-user-profile.ts.

User Impact

  • Single-user Gateways show a real name in the sidebar footer and menu (seeded from the host account), editable under Settings → Profile → Identity; the name persists across tabs, devices, and Gateway restarts.
  • Per-profile preferences (appearance, notification account defaults) now follow the owner across devices.
  • The owner can connect My GitHub; teams sharing one secret share that owner identity, which the docs now call out with per-person sign-in as the alternative.
  • Roles-configured Gateways: only token/password operators get the owner profile; other unidentified connections see an explanation in Identity.

Docs: docs/concepts/user-model.md, docs/web/control-ui.md, docs/concepts/multi-user.md, docs/web/notifications.md, docs/cli/skills.md, docs/start/teams.md.

Evidence

Root cause: connect-session.ts derived authenticatedUserId only from authResult.user; profile-page renderIdentity() returned nothing without a self user; the identity menu omitted its header. Architectural owner: connection identity admission (connect-session.ts / http-auth-user-profile.ts) plus the profile store (user-profiles.ts).

Production LOC: +311 −124 in the feature commit (host-account lookup, owner ensure, shared gate, two owner-boundary file splits) and +84 −54 in the attribution-only fix. Tests +955 −144 and +750 −521. Docs +18 −9.

Local proof (worktree, Node 26):

  • node scripts/run-vitest.mjs src/state/user-profiles src/gateway/server/ws-connection src/gateway/http-auth-utils src/gateway/server-methods/users src/gateway/authenticated-presence-user src/infra/host-account-name src/gateway/server/client-presence src/gateway/server-request-context → 29 files / 368 tests + 14 passed
  • node scripts/run-vitest.mjs src/gateway/server-methods/users-github src/gateway/github-personal-publication src/gateway/http-auth-utils src/gateway/server-request-context src/gateway/server/ws-connection/connect-device-pairing.test.ts → 5 files / 130 passed
  • node scripts/run-vitest.mjs ui/src/components/app-sidebar ui/src/pages/profile → 6 files / 356 passed
  • node scripts/check-changed.mjs → pass (format, typecheck, lint, dead-export scan)
  • pnpm build → clean
  • Autoreview (Codex) → scoped-clean on the feature commit and again on the full branch
  • Exact-head CI run 33712714858 on 667ed8b63b6 → all 161 jobs green (11 skipped)
  • Pre-fix reproduction: the real-server regression in connect-device-pairing.test.ts fails on the starting source with FORBIDDEN: users.self requires an authenticated user; the My GitHub owner checks fail pre-fix with My GitHub requires a current authenticated human Gateway connection.

Data-model compatibility: no schema change and no schema-version bump. The owner profile is one ordinary row in the existing user_profiles table plus one row in the existing user_profile_identities table (provider gateway.local, subject owner), written through the same ensureProfileForProviderIdentity transaction Tailscale identities use. It is created lazily on the first eligible connect, so no migration or doctor --fix step is needed. Older Gateway builds reading the same state database treat it as one more provider identity they never resolve, and a downgrade leaves the rows inert; deleting them only causes a fresh owner profile on the next connect. src/state/user-profiles.owner.test.ts covers the durable mapping, seed-only-when-empty, and provider separation from Tailscale's dotless provider namespace. The host-account-name lookup caches its result in process memory only; nothing about it is serialized or persisted.

Live proof on an isolated dev Gateway (OPENCLAW_STATE_DIR scratch dir, own port, token auth, no model configured): footer seeded with the host account's full name; rename through the Identity form; reload reconnects via the cached device token and shows the new name; the name survives a Gateway restart; users.github.status succeeds for the owner.

Before

Sidebar footer Footer menu Profile page
Before: footer shows Account Before: menu has no profile entry Before: no Identity section

After

Sidebar footer Footer menu Profile page
After: footer shows the owner name After: menu shows the profile header After: editable Identity section

Follow-up (not in this PR): the Identity rows "GitHub account: Refresh to retry" and "Git co-author credit: Refresh to retry" read as retryable for profiles that never get GitHub-backed sign-in (owner, plain email proxies); the copy predates this change.

Token/password (and other unidentified) operator connections had no user
profile, so the Control UI footer showed the literal "Account", the footer
menu had no profile entry, and Settings > Profile rendered no Identity
section. Only trusted-proxy and Tailscale sign-ins produced a profile.

Root cause: connect-session derived authenticatedUserId only from
authResult.user; profile-page renderIdentity() returned nothing without a
self user; the identity menu omitted its header.

Owner: connection identity admission (connect-session / http auth user
profile) plus the profile store.

Fix: ensure one durable local owner profile (provider gateway.local,
subject owner, existing user_profile_identities table; no schema change,
no config option) for operator connections with no authenticated user id,
limited to token/password when gateway.roles is configured. Seed an unset
display name once from the host account's full name (macOS id -F/dscl,
Linux GECOS; never the login name); edits are never overwritten. Device
token reconnects resolve to the same profile. users.self, presence
projection/refresh, online timing, and the personal GitHub gate now key on
the attached profile; a shared-secret system actor with an owner profile
is the person and may use My GitHub. Owner attribution grants no scopes;
identity scopes still use only the verified upstream user id. Profile
resolution failure continues unidentified.

UI: "Owner" fallback label, identity menu always shows the profile header,
Profile page explains unidentified connections.

Split http-auth-user-profile.ts and connect-user-profile.ts out of their
700-line owners.

Proof: focused gateway/state/UI vitest suites, check-changed, build,
Codex autoreview scoped-clean, real-server regression failing pre-fix
with "users.self requires an authenticated user", live rename +
device-token reload + gateway restart on an isolated dev gateway.
@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review September 3, 2026 01:50
@steipete
steipete requested a review from a team as a code owner September 3, 2026 01:50
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 2, 2026, 11:55 PM ET / September 3, 2026, 03:55 UTC.

ClawSweeper review

What this changes

This PR gives eligible single-user Gateway connections one durable local owner profile, surfaces it in the Control UI, and preserves existing shared-secret system authority through HTTP, tools, and session paths.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open. Current main still lacks the durable owner-profile behavior, and the prior HTTP-authority blocker is repaired at this head; the remaining merge decision is whether shared-secret holders should intentionally share one durable profile and its personal GitHub connection.

Priority: P2
Reviewed head: 667ed8b63b687c1cd2a05b5c807721f8e09c9941
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has a coherent owner boundary and focused coverage, with one maintainer-owned compatibility decision remaining.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable to the external-contributor proof gate because Repository State identifies this as a MEMBER-authored PR; the supplied body additionally reports isolated Gateway and UI evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to the external-contributor proof gate because Repository State identifies this as a MEMBER-authored PR; the supplied body additionally reports isolated Gateway and UI evidence.
Evidence reviewed 5 items Current main lacks the requested behavior: Current main returns no HTTP profile for an unidentified shared-secret request, so it does not implement the durable-owner behavior in this PR.
HTTP authority is separated from attribution: The introduced request-auth result retains a system actor for token/password authentication independently of the newly attached owner profile.
Prior P1 is covered on OpenAI-compatible paths: Both real-server suites exercise configured roles with a shared-token operator allowed on a foreign session and a trusted-proxy guest rejected.
Findings None None.
Security None None.

How this fits together

Gateway authentication establishes the connection facts used by the profile store, session policy, and Control UI. This change adds a durable local profile for single-user shared-secret operators while keeping authorization decisions separate from that attribution.

flowchart LR
  A[Shared-secret operator] --> B[Gateway authentication]
  B --> C[Owner profile resolver]
  C --> D[Profile storage]
  C --> E[HTTP and WebSocket clients]
  E --> F[Session and GitHub policy]
  E --> G[Control UI profile]
Loading

Decision needed

Question Recommendation
Should token/password operators on a single-user Gateway share one durable owner profile, including its My GitHub connection, rather than remain profile-less? Adopt shared owner semantics: Accept one owner profile and one personal GitHub connection for all shared-secret holders, with per-person sign-in remaining the team alternative.

Why: This is a deliberate default identity and credential-ownership model for existing shared-secret deployments, not a mechanical correctness choice.

Before merge

  • Resolve merge risk (P1) - Merging intentionally makes every holder of a shared token or password share one durable profile, its preferences, and its My GitHub connection; that upgrade semantic needs explicit maintainer acceptance.
  • Complete next step (P2) - Confirm the shared-secret owner-profile and My GitHub ownership contract before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +217, Tests +1040, Docs +9. Total +1266 across 70 files.

View PR surface stats
Area Files Added Removed Net
Source 28 392 175 +217
Tests 36 1705 665 +1040
Docs 6 18 9 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 70 2115 849 +1266

Review metrics

Metric Value Why it matters
Production versus test delta production +392/-175; tests +1,705/-665; docs +18/-9 The broad owner-boundary implementation has substantial focused regression coverage, while production growth is tied to the new durable identity capability.
Persisted identity shape 1 provider/subject mapping added; 0 schema-version changes The new owner is stored through existing profile tables, so upgrade semantics matter even without DDL or a migration.

Stored data model

Persistent data-model change detected: serialized state: src/infra/host-account-name.ts, unknown-data-model-change: src/infra/host-account-name.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the shared-owner upgrade contract (recommended)
    Confirm that existing token/password users should converge on one shared durable profile and personal GitHub connection.
  2. Pause the feature direction
    Keep the established profile-less shared-secret behavior until a different identity model is selected.

Technical review

Best possible solution:

Adopt the owner-profile flow only with explicit acceptance that shared-secret access is one shared trust domain; retain the separate system-actor authority path and the documented per-person sign-in alternative.

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

Yes from source: current main leaves unidentified shared-secret HTTP connections profile-less, while this branch attaches the durable owner profile; this read-only review did not execute the UI flow.

Is this the best way to solve the issue?

Unclear pending product direction. The implementation keeps attribution separate from authority and repairs the prior HTTP regression, but maintainers must choose whether the shared-owner identity model is the desired default.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This improves the common single-user setup and default Control UI experience but is not an active availability or data-loss incident.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to the external-contributor proof gate because Repository State identifies this as a MEMBER-authored PR; the supplied body additionally reports isolated Gateway and UI evidence.
  • remove P1: Current review triage priority is P2, so this older priority label is no longer current.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This improves the common single-user setup and default Control UI experience but is not an active availability or data-loss incident.
  • merge-risk: 🚨 compatibility: Existing shared-token/password installations change from profile-less access to one shared durable profile and credential owner.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to the external-contributor proof gate because Repository State identifies this as a MEMBER-authored PR; the supplied body additionally reports isolated Gateway and UI evidence.

Evidence

What I checked:

  • Current main lacks the requested behavior: Current main returns no HTTP profile for an unidentified shared-secret request, so it does not implement the durable-owner behavior in this PR. (src/gateway/http-auth-utils.ts:151, ae21338266a7)
  • HTTP authority is separated from attribution: The introduced request-auth result retains a system actor for token/password authentication independently of the newly attached owner profile. (src/gateway/http-auth-utils.ts:573, 667ed8b63b68)
  • Prior P1 is covered on OpenAI-compatible paths: Both real-server suites exercise configured roles with a shared-token operator allowed on a foreign session and a trusted-proxy guest rejected. (src/gateway/openai-http.test.ts:3836, 667ed8b63b68)
  • History limitation is pre-existing, not an introduced finding: The history client omits the system actor, but the same helper is present in the PR base and fetched main; base shared-secret requests reached the same configured-role filtering outcome. (src/gateway/sessions-history-http.ts:110, 667ed8b63b68)
  • Relevant feature history: Merged main-history commits by steipete cover personal shared-Gateway libraries and personal GitHub accounts, the adjacent profile and authorization surfaces. (src/state/user-profiles.ts:321, 75bcd267f5e7)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Record maintainer acceptance that shared-secret holders intentionally share the local owner profile and its My GitHub connection.

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 (2 earlier review cycles)
  • reviewed 2026-09-03T01:58:20.550Z sha edb48b1 :: blocked before merge. :: none
  • reviewed 2026-09-03T02:18:21.667Z sha edb48b1 :: blocked before merge. :: [P1] Preserve shared-secret HTTP system authority

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed P2 Normal backlog priority with limited blast radius. 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. labels Sep 3, 2026
Owner attribution displaced principal recovery, system-actor authority, and
identityless sharing semantics, causing person-role sandbox and visibility
policy to affect shared-secret and no-auth operators.

Use gateway-owner for newly inserted owner profiles while retaining the
existing provider/subject identity lookup and idempotent reuse. Exclude that
attribution from person roles and sharing identity. Carry HTTP authentication's
system actor into nested dispatch, and retain inherited sandbox requirements
for owner-attributed checkpoint branches and restart recovery.

Remove sandbox actor threading and the redundant sessions-list cache key.
Preserve owner presence, sender/creator attribution, profile preferences,
personal GitHub eligibility, and the existing Control UI size trims.

PR #136819. No schema, budget, or baseline changes.

Validation: requested owner/WS/HTTP/session/UI suites passed 1,599 tests
before four redundant cache cases were removed. Final cache suite: 31;
recovery suite: 29; repaired neighboring mocks: 55. All 63 changed core/UI
TypeScript files passed typed lint. Full check-changed passed, and fresh
Codex autoreview reported no actionable P0 findings.
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 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 Sep 3, 2026
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer decision (recording the ClawSweeper rank-up move and the four "before merge" items):

Shared owner semantics: accepted. On a single-user Gateway every holder of the shared token or password is the same person, so they intentionally share one durable owner profile: its display name, avatar, per-profile preferences, and, if the owner connects one, the My GitHub connection. This is the default we want for the out-of-box path. Teams that need per-person identity use Cloudflare Access, Tailscale Serve, or a trusted proxy; the docs in this PR say so explicitly (docs/concepts/user-model.md, docs/start/teams.md, docs/concepts/multi-user.md).

My GitHub contract: the owner profile is a person and may connect My GitHub. A system actor without a profile stays ineligible; synthetic and agent-tool callers stay excluded. Owner attribution never grants scopes, never changes operator-role policy, sandbox requirements, recovery scope, or session-sharing visibility (second commit, canonical id gateway-owner).

Data-model compatibility: no schema change and no schema-version bump. The owner is one row in the existing user_profiles table plus one row in user_profile_identities (provider gateway.local, subject owner), created lazily on the first eligible connect through the same transaction Tailscale identities use. Older builds treat it as an unresolved provider identity; a downgrade leaves the rows inert; deleting them only recreates the owner on the next connect. No migration or doctor --fix step. The host-account-name lookup caches in process memory only.

Follow-ups recorded, not blockers: admin email linking can merge into or out of the reserved owner profile (merge policy decision); catalog visibility counts profiles independently of sharing identity; the Identity rows' "Refresh to retry" copy predates this change.

@steipete
steipete merged commit 847ad18 into main Sep 3, 2026
234 checks passed
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the claude/account-display-rename-ux-3c0d44 branch September 3, 2026 04:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 3, 2026
…aw#136819)

* feat(gateway): durable owner profile for single-user gateways

Token/password (and other unidentified) operator connections had no user
profile, so the Control UI footer showed the literal "Account", the footer
menu had no profile entry, and Settings > Profile rendered no Identity
section. Only trusted-proxy and Tailscale sign-ins produced a profile.

Root cause: connect-session derived authenticatedUserId only from
authResult.user; profile-page renderIdentity() returned nothing without a
self user; the identity menu omitted its header.

Owner: connection identity admission (connect-session / http auth user
profile) plus the profile store.

Fix: ensure one durable local owner profile (provider gateway.local,
subject owner, existing user_profile_identities table; no schema change,
no config option) for operator connections with no authenticated user id,
limited to token/password when gateway.roles is configured. Seed an unset
display name once from the host account's full name (macOS id -F/dscl,
Linux GECOS; never the login name); edits are never overwritten. Device
token reconnects resolve to the same profile. users.self, presence
projection/refresh, online timing, and the personal GitHub gate now key on
the attached profile; a shared-secret system actor with an owner profile
is the person and may use My GitHub. Owner attribution grants no scopes;
identity scopes still use only the verified upstream user id. Profile
resolution failure continues unidentified.

UI: "Owner" fallback label, identity menu always shows the profile header,
Profile page explains unidentified connections.

Split http-auth-user-profile.ts and connect-user-profile.ts out of their
700-line owners.

Proof: focused gateway/state/UI vitest suites, check-changed, build,
Codex autoreview scoped-clean, real-server regression failing pre-fix
with "users.self requires an authenticated user", live rename +
device-token reload + gateway restart on an isolated dev gateway.

* fix(gateway): keep the owner profile attribution-only

Owner attribution displaced principal recovery, system-actor authority, and
identityless sharing semantics, causing person-role sandbox and visibility
policy to affect shared-secret and no-auth operators.

Use gateway-owner for newly inserted owner profiles while retaining the
existing provider/subject identity lookup and idempotent reuse. Exclude that
attribution from person roles and sharing identity. Carry HTTP authentication's
system actor into nested dispatch, and retain inherited sandbox requirements
for owner-attributed checkpoint branches and restart recovery.

Remove sandbox actor threading and the redundant sessions-list cache key.
Preserve owner presence, sender/creator attribution, profile preferences,
personal GitHub eligibility, and the existing Control UI size trims.

PR openclaw#136819. No schema, budget, or baseline changes.

Validation: requested owner/WS/HTTP/session/UI suites passed 1,599 tests
before four redundant cache cases were removed. Final cache suite: 31;
recovery suite: 29; repaired neighboring mocks: 55. All 63 changed core/UI
TypeScript files passed typed lint. Full check-changed passed, and fresh
Codex autoreview reported no actionable P0 findings.
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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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