Skip to content

feat: edit personal instructions on multi-user gateways - #155256

Merged
roboclaw-bot merged 13 commits into
mainfrom
fix/personal-user-md-self-edit
Sep 23, 2026
Merged

roboclaw-bot merged 13 commits into
mainfrom
fix/personal-user-md-self-edit

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #155255

What Problem This Solves

Signed-in users can have a personal USER.md but cannot edit it themselves through Profile settings or reliably ask an agent to update it from a project session. Follow-up to #153966.

User Impact

On multi-user Gateways, users can open Settings → Profile → Personal instructions or ask an agent from any authenticated Gateway chat session to create/edit their personal instructions. The chat path works independently of the session owner and project worktree. Both paths use the requesting person’s file with operator.read; shared bootstrap files and other people’s files remain outside that authority.

Single-user Gateways use only the existing workspace-root USER.md (Agents → Files). They get no personal-instructions editor, Settings-search entry, chat tool or catalog entry, personal-file API access, or per-profile prompt overlay. Previously created personal files remain untouched on disk; they are not loaded, deleted, or silently merged into the root file.

Personal files are enabled only by the existing multi-user policy: at least two distinct, unmerged person profiles, excluding the shared Owner from the count. The server rechecks this policy before reads and immediately before writes; Control UI picks up a changed roster policy on reconnect. Within multi-user Gateways, requester binding, session-selected prompt context, local-workspace restrictions, the 4,000-character budget, provenance checks, and normal tool/agent permissions remain. No new configuration option or storage migration is introduced.

Why This Change Was Made

The existing Agents file editor is intentionally admin-only and limited to shared bootstrap filenames. A Profile editor that follows the existing Settings-sidebar agent selection and the personal_instructions chat tool share the same narrow authenticated-self API rather than widening general file-tool access. The canonical profile and path come from the live connection or the exact host-issued original-requester authority of an admitted chat turn—not session ownership, tool arguments, or a copied profile on a synthetic client. Safe filesystem operations reject aliases and recheck the source, run, scope, role, Gateway, and workspace before mutation. Other personal APIs retain their existing synthetic-caller restrictions.

Saves require the loaded content hash and use the existing workspace save queue. Conflicts with independent host editors remain best effort, matching the shared editor: avoid simultaneous UI and host-process edits. Failed requests and transient reconnects retain the draft without exposing it under a different profile or Gateway. Changing the Settings agent retains unsaved drafts separately for each agent; it never retargets an in-flight save.

Evidence

Current follow-up: Profile spacing and startup budget (35636541ffe6bd8e1e252637953c68f5abd7a585)

  • The empty personal editor stays mounted for draft recovery, but its host is now hidden on single-user Gateways. Real Chromium shows 80 → 40 px between Identity and Connected accounts, with unchanged multi-user editor geometry and zero single-user personal-file requests. Matched before/after and exact-head review request.
  • The previous head's performance failure was a 93-byte startup-JS gzip overage. Editor-only English now loads with the Profile component; search metadata remains eager. The complete composed English catalog is byte-identical. The same pinned-base performance comparison passes at 371,031 B, down from 371,425 B, against the unchanged 371,332 B limit. No budgets, allowances or baselines were raised.
  • 122/122 focused tests passed across Profile, Settings search and i18n tooling (44.86 s command wall). UI production types, localization verification, focused lint/format, and fresh P0–P2 autoreview pass. No new recurring tests were added for this small layout correction; real browser geometry verifies the visual contract.
  • Hosted CI: run 35811553649 completed success for exact head 35636541ffe6bd8e1e252637953c68f5abd7a585, including the repaired performance gate and iOS/Android lanes. ClawSweeper: Revision 15 is ready on that same head, with no findings, no security issues, and nothing listed before merge. Older receipts below belong to their named earlier heads. Deployment is not part of this change.

Final landing audit (September 23; unchanged head 35636541ffe6)

  • Test-audit: Reviewed all 17 changed test suites and the extracted handshake test helper. Retained cases protect real file effects, live authority/revocation, bootstrap selection, protocol/tool discovery, and observable draft/agent/profile transitions. No low-value deletion or new test-only production seam was identified; no new sleep/polling or per-test Gateway boot was added.
  • Deslop: Inspected the full merge-base-to-head diff; no actionable behavior-neutral cleanup found, and no source was changed. The existing exact-head P0–P2 autoreview and ClawSweeper Revision 16 remain applicable; the fresh direct landing review also has no findings.
  • Flake triage: Earlier CI failures, bounded investigations, suspected boundaries, and unresolved uncertainty are preserved below and tracked in the follow-up checklist. A later green run or isolated passing replay is not claimed as a fix. No retry, timeout, assertion, mock or performance-budget relaxation was used to manufacture green.
  • E2E scope: Actual Chromium production-component read/edit/save uses a mock Gateway. The separate real in-process chat-tool/Gateway/filesystem regressions verify persistence and authorization. Single-user UI sends no personal-file calls and shows the normal 40 px gap. This is compositional boundary proof, not a single live browser → running Gateway → model conversation test. Remote workspaces remain explicitly unsupported, and simultaneous independent host edits retain the documented best-effort conflict contract.
  • Current base: The exact head composes conflict-free with main 5706a0626359b52daa5feb12fe98c260153525c3; the Profile heading and shell callback changes remain intact. Live rules do not require strict up-to-date status; required CI is green, with no pending/failed check.
Measured cost of all changed test suites

All 17 suites passed again with pnpm test <file> --maxWorkers=1 (172.99 s total sequential command wall). Local wall includes wrapper/compiler/import/setup cost and mixed cold/warm compiler generations. Hosted numbers below sum the rounded per-case durations reported by the completed exact-head CI run; they exclude job setup/import/teardown and are not directly comparable to local wall time. The extracted reconnect helper runs within the existing handshake suite and adds no separate CI invocation.

Suite Local command wall (s) Hosted test bodies (s) Hosted cases
src/agents/bootstrap-files.memory-core.test.ts 32.15 0.420 1
src/agents/bootstrap-files.personal.test.ts 25.06 0.775 13
src/agents/openclaw-tools.registration.test.ts 14.33 5.315 61
src/agents/sandbox-explain.test.ts 5.79 0.006 5
src/agents/subagents/requester-cron-authority.test.ts 11.44 0.037 30
src/agents/tool-catalog.test.ts 1.35 0.000 10
src/gateway/method-scopes.test.ts 13.60 0.207 191
src/gateway/server-methods-list.test.ts 13.31 0.037 34
src/gateway/server-methods/tools-catalog.test.ts 6.25 0.059 13
src/gateway/server-methods/users-personal-file.test.ts 8.02 0.119 41
src/gateway/server/ws-connection/message-handler.post-connect-health.test.ts 23.41 11.989 59
src/state/user-profile-list.test.ts 5.83 0.131 2
ui/src/lib/agents/tool-catalog.test.ts 2.45 0.066 8
ui/src/pages/config/settings-search.test.ts 2.05 0.393 43
ui/src/pages/config/settings-targets.test.ts 2.19 0.227 20
ui/src/pages/profile/personal-instructions.test.ts 2.44 0.157 18
ui/src/pages/profile/profile-page.test.ts 3.32 1.178 19

The real in-process dispatch and safe-filesystem suite justifies integration cost by exercising requester forwarding and the actual filesystem mutation guard; mocking that boundary would not prove it. UI races use deferred promises rather than timers. Existing handshake cases reuse their existing harness; the PR adds authentication assertions rather than extra Gateway boots. Cold bootstrap compilation accounts for 93% of the 30.28 s Vitest duration in the Memory Core proof, versus approximately 2% test-body time; no runner tuning is proposed.

Test-performance check: Same-host, same-command handshake-suite baseline on current main passed 59/59 in 40.23 s wall; the PR passed the same 59 cases in 23.41 s wall. Compiler generations/cache warmth differ, so the 16.82 s wall difference is not claimed as a product speedup. The changed owner-reconnect case remains in the existing suite (0.805 s on the PR); no new server lifecycle or recurring test invocation was introduced. No source or runner changes were made during this diagnostic.

Earlier single-user correction (head: 3b50236)

The branch is synchronized with main 1dd82fa0d398e24f6885baae7e0b437e3cbb0ea0. Main's profile-reader extraction and binding/catalog lifetime changes are preserved; the multi-user facade uses the resident catalog and the SQL selector lives with the new read owner. All 15 focused suites passed on the combined candidate (103.55 s command wall), including main's resident-profile regressions. The final extraction also passed 27 focused identity/bootstrap tests and the two-case count test. Core/UI production and affected test types, scoped lint, import cycles, formatting and the file-size ratchet pass. The captured Profile component and profile.css are unchanged by this synchronization.

The full-candidate review raised an empty-scope shared-owner P2; source tracing disproved its premise. The dispatcher still requires explicit method scopes, and device-less shared authentication deliberately clears unbound scopes. System-role attribution bypasses named-role policy, not method scopes. Granted owner flows and rejected zero-scope callers are covered; no permission check was loosened to satisfy that finding.

  • 11 focused suites passed across six routed test shards (72.66 s command wall). Coverage includes the built-in Owner and one named user loading only root USER.md, API rejection before creating any personal file, revocation at the filesystem mutation boundary, resident-catalog/merge parity, conditional tool registration, hidden single-user UI/search, and retained multi-user editing.
  • Real Chromium, 1280×1000/light theme, synthetic one-person Profile: editor absent and zero users.personalFile.* requests. The same production UI with the multi-user policy enabled completed the read/edit/save flow. Matched single-user before/after.
  • Catalog follow-up: 31/31 tests in three suites passed (28.44 s command wall), covering the real tools.catalog handler, explicit multi-user visibility, and capability-unknown UI fallback. The broader core/UI typechecks, all core-test type graphs, lint, format, dead-export, storage, and import-cycle checks passed for the first correction; production and affected test types/lint are checked again for this follow-up.
  • Fresh independent P0–P2 autoreviews for both corrections: scoped-clean. Single-user and multi-user tests use isolated state, not the running Team Gateway.
  • Final catalog follow-up: core/UI production types, affected agent/Gateway/UI test graphs, scoped lint, import-cycle checks, formatting and diff checks all pass.
  • Current-head hosted CI/review: pending for 3b50236877e; prior-head green checks are not attributed to this head. Earlier CI/review receipts below belong to their named historical heads, not this correction. This PR remains unmerged.
Earlier implementation and UI verification (historical heads)

The latest UI correction dbd6704fd4c removes the duplicate selector and follows the existing Settings-sidebar agent selection. The inspected before/after correction shows the one-selector result. Fourteen focused editor tests pass (2.09 s command wall), including agent switches, separate unsaved drafts, identity clearing and stale responses. UI production/test types, localization, targeted lint and Control UI build pass; isolated autoreview found no P2+ issue. The full UI CI on dbd6704fd4c found an older Profile test fixture missing the app-owned Settings selector. Commit 75ce28e5cbb supplies that fixture: the identical local suite failed before repair, then both focused Profile suites passed 33/33 in 3.07 s command wall. No product or authorization change followed dbd6704fd4c. ClawSweeper Revision 7 then identified an undo-and-switch draft-cache defect introduced by the UI correction. Commit 9a9c4a83799 fixes it by consuming restored cache entries and deleting clean outgoing entries. The new repeated A→B→A undo→B→A regression and both Profile suites pass 34/34 (3.09 s command wall), with UI production/test types, formatting, focused lint, and fresh isolated P2 autoreview clean. Current UI follow-up f0e9a97139f keeps the seven-row Profile textarea at its existing 142 px default while 2,954 characters scroll inside it; a real Chromium drag of the native handle grows it to 237 px. The existing auto-load runs when Profile opens or the Settings agent changes, without an additional request. The routine Reload button is hidden; a recovery Reload remains after a read/save error and still asks before discarding a draft. The focused Profile suites pass 36/36; UI production/test types, scoped lint, stylelint, formatting, local scoped review and actual browser geometry proof pass. Exact-head CI run 35802229691 completed success (156 jobs, zero failed; openclaw/ci-gate green), and the PR check rollup is clean. ClawSweeper Revision 11 reviewed f0e9a97139fcb20b943b935517bc1152df724e42 as ready for maintainer review with no actionable findings. Previous green checks and reviews below remain attributed only to their own commits.

Historical UI polish bb5798db513 removes the repeated visible heading inside the Profile editor card while retaining a translated accessible name and guidance for the textarea. The production component’s mocked read/edit/save flow and 35/35 focused Profile tests pass; production/test UI types and targeted lint pass. Exact-head CI run 35799432463 completed success, all 148 jobs and openclaw/ci-gate green. ClawSweeper Revision 9 reviewed exact head bb5798db5134015d3e44f0faa68f17f8039ec39c as ready for maintainer review, with no actionable findings. That previous head’s check rollup had no failures. Historical checks and reviews below are attributed only to their own heads.

Historical evidence: ClawSweeper Revision 8 reviewed exact head 9a9c4a837996dfb81e1329ff140217c03f8a283f: the P2 is resolved and there are no actionable findings. Exact-head CI run 35796428474 completed failure (openclaw/ci-gate is red), so that prior head was not CI-green or ready to land. The three underlying failures are outside the changed paths: new-session GitHub-project E2E timed out waiting for a mocked Gateway request; local isolated replay stopped at the environment’s loopback HTTP 502 preflight, without reaching the test (proxy policy was not weakened). Plugin-state overlap failed two timing assertions, while an isolated single-worker replay passed 15/15; session-groups rename observed a competing state-lifecycle owner instead of the expected changed-state error, while an isolated single-worker replay passed 28/28. None of those isolated passes proves a fix; the test sources are unchanged by this PR. No unrelated implementation or guard was changed to manufacture green CI.

The superseded dbd6704fd4c CI run also saw two other failures outside this UI diff: plugin-state worker overlap assertions in a compact shard (job) passed all 15 tests in a single-worker local replay but are not claimed fixed; the macOS native suite (job) reported the unrelated “browser sign-in cookie is installed before the first dashboard navigation” failure in its retained Swift log, which was not runnable on this Linux host. Neither suite has changed in this PR. A later superseded head 75ce28e5cbb had an unrelated Discord durable-ingress duplicate-send assertion in an extensions shard (job); that unchanged suite passed both tests in a single-worker replay (26.14 s command wall). Neither isolated replay proves a fix; current-head CI will provide the next comparable result.

The preceding head d5cb33c922c passed the full CI run and ClawSweeper Revision 4 found no actionable findings. The prior head c515323c9cf resolved subsequent main conflicts on 2e07e9a5de86: existing method order is preserved, Kotlin is regenerated, and the owner-reconnect test retains upstream’s awaited attachment fixture plus the reviewed authority assertions. Range-diff confirms the chat implementation and requester-lifetime fix are patch-identical. All 132 focused personal-file, protocol-list, and handshake tests pass after this rebase (56.55 s command wall); full protocol generation/vintage checks and focused type-aware lint also pass. Prior-head verification (c515323c9cf) complete: CI run 35701457006 passed, including the iOS simulator checks; openclaw/ci-gate is green. ClawSweeper Revision 5 reviewed c515323c9cf02bf87fad0c002acd830c4c705636 and reports no actionable correctness or security findings.

The remaining Gateway failures were repaired at their owners: metadata-only internal handoffs no longer inspect transport fields before checking the authentication attestation; an explicitly yielded requester now retains its original operator restriction until its committed child cohort settles. Revocation, reset, failed persistence, and repeated denied retries release/fence that source rather than falling back to unrestricted dispatch. This does not grant Cron management permission.

The real chat.reset-visible-yield.test.ts reproduced the expired-source failure, then passed both reset and completion cases in the same approved offline container. Source-only lifetime/revocation regressions pass (30 cases), including repeated denied retries and failed-persistence cleanup. Production/targeted test types, protocol generation/vintage/order, import-cycle checks, scoped lint, and a full frozen-source pnpm build pass (3m 39.6s). The Matrix Doctor case also passed in that isolated refreshed candidate (44.57 s test execution); that is a bounded replay, not a claimed fix for the prior timeout.

  • 39 backend tests cover canonical create/read/update, bootstrap consumption, rejected target injection, alias rejection, live revocation, limits, and conflicting saves. The actual chat tool → in-process Gateway → real filesystem path is exercised from main/shared/worktree session identities; copied source authority without its live run is refused.
  • The chat extension passed 374 tests across eight focused suites (91.77 s test-command wall). The subsequent authority repairs passed 167 focused Gateway/handshake/sandbox regressions, plus a fresh owner-reconnect check after extracting its unchanged assertions. Production types, all 25 core-test type graphs, and focused lint pass. Coverage includes tool assembly with only personal_instructions allowed and general write/exec tools absent.
  • Actual Chromium UI proof uses synthetic Alex data with only operator.read, edits and saves through the production component, and checks that the wire request contains only agent, content, and expected hash. No live Gateway state was changed.
  • Core/UI/test typechecking, protocol registry/method-vintage checks, dead-export checks, Android Kotlin lint, stylesheet lint, and the remaining storage/media/import/auth guards passed. Full core lint identified two test-only patterns; both were repaired and their focused type-aware lint passed (zero errors/warnings). The hosted CI and ClawSweeper verification in this historical item apply only to prior head c515323c9cf; the current exact-head results are linked above.
  • Both follow-up chat-authentication findings were reproduced before repair: non-admin operator.write scope attenuation and authenticated local-owner ingress. The repair binds verified source+subject across narrower grants, retains both liveness checks, and captures shared-owner identity only from authenticated real transport ingress. Read/write/admin callers, device-token reconnects, source retirement, and anonymous/synthetic/node rejection are covered.
  • The previous revision’s CI defects (missing tool-display metadata/resource and the sandbox memory-group expectation) are fixed; their exact local checks pass.
  • ClawSweeper’s delayed-identity reconnect finding is reproduced and fixed: offline → connected/no profile → same profile now restores the private draft, while a different confirmed profile replaces it. The regression failed before the fix and passed afterward.
  • The initial implementation received independent precommit review through P2. The expanded chat boundary was reviewed directly; the latest exact-head ClawSweeper review is linked above. Atomic compare-and-swap against independent shell writers is not claimed: the existing file owner guarantees serialized Gateway saves, with that limitation documented.

Measured single-worker cost (pnpm test <file> --maxWorkers=1): backend suite 27.11 s wall with a cold compiler cache (22 tests, under 0.2 s test execution); editor suite 3.73 s wall (12 tests, under 0.2 s test execution). The combined 54-test UI run took 4.52 s wall. Expanded chat-boundary suite: 30 tests, 23.17 s command wall, including 3.13 s for the first real in-process dispatch and milliseconds for subsequent cases. That one-time dispatch cost verifies the actual authority-forwarding path rather than only a mocked handler.

Initial-head CI exposed two separate failures: chat-model-controls.e2e.test.ts (account-picker viewport bound) and Matrix doctor-contract-api.account-state.test.ts (100-second child-exit guard). Logs were inspected. The Matrix failure did not reproduce on the unchanged base (1 test passed, 100.75 s command wall; child test 49.65 s), which does not prove a fix. The UI replay was blocked before execution by the host loopback proxy, then by the approved isolated launcher’s native-pnpm compatibility check; no proxy or isolation policy was weakened. Current-head CI status is noted above.

Before

Profile before personal instructions editing

After

Profile editor using only the global Settings agent selector

Follow-up: remove the repeated label inside the editor

Before

Before: section heading repeated inside the editor card

After

After: single section heading with no duplicate label in the card

Follow-up: bounded editor and contextual reload

Before

Before: long instructions scroll in a bounded editor with a routine Reload button

After

After: same editor height with native scrolling, but no routine Reload button

Worked on by

Work sessions

Final recovery, verification, and publication continued directly in the original discussion after the implementation session was archived.


View the OpenClaw team session

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 21, 2026 23:03
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 35636541ffe6bd8e1e252637953c68f5abd7a585
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/agents/subagents/requester-cron-authority.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/gateway/methods/core-descriptors.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/operator-run-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection/connect-session.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 P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 11:24 PM ET / September 23, 2026, 03:24 UTC (Revision 16).

ClawSweeper review

What this changes

Adds Profile and chat-based editing of personal instructions on multi-user Gateways, while keeping single-user Gateways on the workspace-root USER.md.

Merge readiness

✅ Ready for maintainer review

This remains useful work: current main lacks authenticated self-service editing, and the earlier bootstrap PR does not replace it. No blocking correctness or security finding remains in the reviewed head.

Priority: P2
Reviewed head: 35636541ffe6bd8e1e252637953c68f5abd7a585

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent implementation with useful visual evidence, focused boundary coverage, and successful hosted validation on the reviewed head.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chromium captures demonstrate the Profile editor corrections, with the matching body recording production-component save behavior. Authorization was assessed separately through source, the verified filesystem guard contract, and reported real-filesystem boundary regressions covering allowed, forbidden, and revoked callers. The latest spacing media fetch limitation does not invalidate the supplied evidence; no stored-data format changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected Chromium captures demonstrate the Profile editor corrections, with the matching body recording production-component save behavior. Authorization was assessed separately through source, the verified filesystem guard contract, and reported real-filesystem boundary regressions covering allowed, forbidden, and revoked callers. The latest spacing media fetch limitation does not invalidate the supplied evidence; no stored-data format changes.
Evidence reviewed 11 items Pinned review scope: Reviewed the introduced merge-base-to-head changes. Checkout and original PR head are 3563654; the supplied stale test merge was not used to infer removal of main-branch behavior.
Full discussion evidence recovered: Read the complete 21,470-unit PR body through GitHub. Its SHA-256 matches the supplied snapshot, d0a6403c8fff845258188b403900c5f1d50d4fc6d0a576cad8eb445a0e4186cb, including historical boundary verification omitted from the prompt. No maintainer-notes directory exists in this checkout.
Current-main necessity: Current main's Profile page has no personal-instructions editor, and its tool catalog lacks the new tool. The existing shared-file editor is restricted to bootstrap filenames and administrator scope, so it does not supply the requested self-service path.
Findings None None.
Security None None.

How this fits together

The Gateway resolves authenticated users and controls access to their agent-workspace instructions. Profile settings and an agent tool share a guarded file API; subsequent eligible turns load the saved instructions through the existing bootstrap loader.

flowchart TD
  A[Profile settings] --> C[Personal instructions API]
  B[Authenticated chat tool] --> C
  C --> D[Check current requester and multi-user policy]
  D --> E[Check file version and safe path]
  E --> F[Requester's personal USER file]
  F --> G[Existing prompt bootstrap]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +956, Tests +1271, Docs +44, Other +6. Total +2277 across 53 files.

View PR surface stats
Area Files Added Removed Net
Source 30 1016 60 +956
Tests 18 1295 24 +1271
Docs 2 47 3 +44
Config 0 0 0 0
Generated 0 0 0 0
Other 3 6 0 +6
Total 53 2364 87 +2277

Review metrics

Metric Value Why it matters
New capability surface 2 Gateway methods, 1 agent tool, 0 new configuration options Both user entry points share the same authenticated-self owner.
Production and test growth Production/tooling net +962 lines; tests/support net +1,271 lines Production growth implements the editor and authority-bound API; regression coverage concentrates on authorization and draft lifetimes.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #155255
Summary: This PR implements the paired self-service editing request; earlier bootstrap loading and the separate size-cap request remain distinct.

Members:

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

Technical review

Best possible solution:

Keep one authenticated-self file API shared by Profile and chat, preserving live requester checks, conflict detection, and the existing bootstrap format.

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

Not applicable as a defect reproduction: this adds a capability that the inspected main Profile page and tool catalog do not provide.

Is this the best way to solve the issue?

Yes. Sharing a requester-bound API avoids widening administrator-only shared-file editing or general filesystem access.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded multi-user usability feature without an established urgent production regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected Chromium captures demonstrate the Profile editor corrections, with the matching body recording production-component save behavior. Authorization was assessed separately through source, the verified filesystem guard contract, and reported real-filesystem boundary regressions covering allowed, forbidden, and revoked callers. The latest spacing media fetch limitation does not invalidate the supplied evidence; no stored-data format changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected Chromium captures demonstrate the Profile editor corrections, with the matching body recording production-component save behavior. Authorization was assessed separately through source, the verified filesystem guard contract, and reported real-filesystem boundary regressions covering allowed, forbidden, and revoked callers. The latest spacing media fetch limitation does not invalidate the supplied evidence; no stored-data format changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected Chromium captures demonstrate the Profile editor corrections, with the matching body recording production-component save behavior. Authorization was assessed separately through source, the verified filesystem guard contract, and reported real-filesystem boundary regressions covering allowed, forbidden, and revoked callers. The latest spacing media fetch limitation does not invalidate the supplied evidence; no stored-data format changes.

Evidence

What I checked:

  • Pinned review scope: Reviewed the introduced merge-base-to-head changes. Checkout and original PR head are 3563654; the supplied stale test merge was not used to infer removal of main-branch behavior. (35636541ffe6)
  • Full discussion evidence recovered: Read the complete 21,470-unit PR body through GitHub. Its SHA-256 matches the supplied snapshot, d0a6403c8fff845258188b403900c5f1d50d4fc6d0a576cad8eb445a0e4186cb, including historical boundary verification omitted from the prompt. No maintainer-notes directory exists in this checkout. (35636541ffe6)
  • Current-main necessity: Current main's Profile page has no personal-instructions editor, and its tool catalog lacks the new tool. The existing shared-file editor is restricted to bootstrap filenames and administrator scope, so it does not supply the requested self-service path. (ui/src/pages/profile/profile-page.ts:389, ff2736533bed)
  • Release and related implementation: The latest supplied release's method registry lacks users.personalFile methods. GitHub confirms feat: personalize USER bootstrap with authenticated profiles #153966 merged as d61156b; it provides personal bootstrap loading, not this editing feature. The paired request Allow users to edit their personal USER.md in Profile settings #155255 remains open. (src/gateway/methods/core-descriptors.ts, ec9c1a13db89)
  • Authority and final filesystem effects: The API derives the canonical profile from a current connection or matching host-issued requester authority, checks current scopes and agent access, rejects remote workspaces, and supplies its live guard to fs-safe. Boundary regressions verify requester-only writes, unchanged shared files, rejected target injection, copied authority, revocation, reassignment, aliases, and conflicting saves. These tests were inspected, not executed during this read-only review. (src/gateway/server-methods/users-personal-file.test.ts:286, 35636541ffe6)
  • Verified filesystem dependency contract: The affirmative dependency is users-personal-file.ts passing assertBeforeMutation through src/infra/fs-safe.ts to @openclaw/fs-safe 0.18.1. Verified the dependency repository and release tag; Root.write composes the guard, and staged publication invokes it immediately before rename. (src/pinned-write-staged.ts:109, fb70418d8cbd)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (15 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-22T23:22:27.741Z sha 9a9c4a8 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T00:03:24.667Z sha bb5798d :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T00:24:34.344Z sha bb5798d :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T00:39:12.097Z sha f0e9a97 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T01:07:16.829Z sha f0e9a97 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T02:17:59.474Z sha eeab2ed :: needs changes before merge. :: none
  • reviewed 2026-09-23T02:29:23.918Z sha 3b50236 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T02:55:55.448Z sha 3563654 :: needs maintainer review before merge. :: none

@roboclaw-bot roboclaw-bot changed the title feat: let users edit their personal USER.md in Profile settings feat: let users edit personal instructions from Profile or any chat Sep 21, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Updated head: 2fedcaee94da67e1cada3922ce0055f51ae100d8. Fixed the delayed-identity reconnect finding with a reproduced failing test followed by passing same-profile restoration/different-profile isolation coverage.

At the requester’s direction, the same PR now includes chat-based editing from any authenticated Gateway session. A dedicated tool reuses the existing file owner and the exact live original-requester authority; it does not derive identity from the session owner or grant generic filesystem access. Real tool → in-process Gateway → filesystem tests cover main/shared/worktree session identities and revoked/missing run authority.

374 tests across 8 suites, production/core-test/UI typechecks, scoped type-aware lint, import-cycle and dead-export checks pass. The PR body records scope, initial CI failures/replay limits, and preserved visual evidence. Please review the expanded boundary on this exact head.

@clawsweeper

clawsweeper Bot commented Sep 21, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Sep 22, 2026
@openclaw-barnacle openclaw-barnacle Bot added docker Docker and sandbox tooling agents Agent runtime and tooling labels Sep 22, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Updated head: f49893468a95b6c54503b0379e74bd4c58d689bb. Both Revision 2 findings were reproduced and repaired.

  • Scope attenuation: verified source identity and subject are preserved across the dispatcher’s narrower grant; both live authorities remain checked. Real-dispatch read/write/admin cases pass.
  • Shared owner: the existing run-authority owner now captures authenticated transport ingress for the durable shared-owner profile, including device-token reconnects. Anonymous, synthetic, agent-tool, node, unprofiled, invalidated, and retired sources remain rejected. Handshake tests verify the server-only attestation is absent for auth=none.

167 targeted authority/handshake/sandbox tests pass, plus the owner-reconnect test after extracting its full assertions to respect the line cap. Production/core-test typechecks, scoped lint, line-cap guard, and tool-display generation/check pass. Both previous-head CI defects (display metadata and sandbox group expectation) are fixed. PR body retains the scope limits and evidence.

@clawsweeper

clawsweeper Bot commented Sep 22, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added 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 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 22, 2026
Hide the dormant personal editor host without losing reconnect drafts. Load editor-only English with the Profile component so startup stays within the unchanged bundle budget.

Co-authored-by: VACInc <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 23, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Please review exact head 35636541ffe6bd8e1e252637953c68f5abd7a585. The single-user Profile keeps the personal editor mounted but hides its host, removing the empty flex item: actual Chromium spacing is 80 → 40 px, while the multi-user editor remains visible with unchanged geometry and reconnect-draft behavior.

This also fixes the prior head's Control UI performance failure: editor-only English now loads with the Profile component; search title/description remain eager. Full composed English catalog JSON is byte-for-byte unchanged. The same base comparison passes at 371,031 B startup JS gzip, down from 371,425 B, against the unchanged 371,332 B limit. No budget, allowance, or baseline was raised.

122 focused Profile/search/i18n tests pass (44.86 s command wall), as do UI types, i18n verification, scoped lint/format, and fresh P0–P2 local review. Current-head CI is pending; earlier checks/reviews are not attributed to this head. Captures are matching crops of the real production Profile UI with synthetic data, light theme, and a 1280×1000 viewport. No Gateway deployment or PR merge.

Before

Before: single-user Profile has a doubled section gap

After

After: single-user Profile restores normal section spacing

@clawsweeper

clawsweeper Bot commented Sep 23, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@roboclaw-bot
roboclaw-bot merged commit bdd47f2 into main Sep 23, 2026
255 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/personal-user-md-self-edit branch September 23, 2026 12:55
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

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

Enable authenticated users to edit their personal instructions from Profile or chat on multi-user Gateways. Keep single-user Gateways on the workspace-root USER.md.

Preserve requester-bound authority, safe local writes, conflict checks, reconnect drafts, normal Profile spacing, and the startup performance budget.

Co-authored-by: VACInc <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: web-ui App: web-ui docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

Allow users to edit their personal USER.md in Profile settings

2 participants