Skip to content

refactor(state): run profile setters in the state worker - #162571

Merged
steipete merged 14 commits into
mainfrom
dbasync/profiles-2
Oct 1, 2026
Merged

steipete merged 14 commits into
mainfrom
dbasync/profiles-2

Conversation

@steipete

@steipete steipete commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Related: #162414, #162446

What Problem This Solves

Display-name and avatar RPCs still execute profile SQL on the Gateway thread.

Why This Change Was Made

Route both setters through the existing admitted state worker, and register the UserProfile domain through the typed operation registry. The domain handler table consumes synchronous writer kernels from the worker implementation; the old host setter exports and command guards/dispatchers are removed.

After awaiting a write, Gateway handlers recheck requester authority before refreshing connected profiles. Refreshes consume current committed catalog rows so a delayed result cannot replace a newer display. A committed self-merge still returns its receipt after revoking its own connection, while skipping an unauthorized refresh.

User Impact

Profile RPC shapes and stored values are unchanged. The real Gateway-handler test demonstrates zero calling-thread SQLite operations for display-name and avatar edits; before the cutover it observed 16 prepare calls.

  • Selected src/state/user-*.ts inventory: T1 90 → 79, T2 12 → 12, W 5 → 14. user-profiles.ts alone drops 16 → 5 T1 sites. These are static primitive-call counts, separate from the runtime proof.
  • Production PR delta: +633 / -628 / net +5 lines, across eight production files, against merge base 0e5da43ea5c3b5db7409eb1f9610351520384bab. Tests, test support, and docs are excluded.
  • No inventory classification was changed. Runtime writes reach the async host adapter, the shared-state worker broker, the userProfiles registry handlers, and then the synchronous worker kernels. Kernel exports have production consumers in that handler table; test fixtures also exercise their transaction semantics directly.

Remainder: getUserProfileRole and the synchronous operator-role-policy fallback remain migration debt. Completing them requires carrying prepared role/catalog lifetimes through cold HTTP, cron, plugin, and retained policy guards, including the excluded GitHub/model-account owners. That work is estimated at roughly +120–200 net production lines and exceeds this lane's remaining allowance. Preferences and account-store runtime code are outside this PR.

Evidence

  • node scripts/database-worker-inventory.mjs --json, filtered to src/state/user-*.ts, on the pinned base and integrated candidate: counts above.
  • pnpm check:database-worker-ratchet --base e2e4a34c9828f1230d906567c0eacb7b1e1fe185: passed after merging main.
  • node scripts/check-changed.mjs --base 0e5da43ea5c3b5db7409eb1f9610351520384bab: passed (all selected checks, including core/root/UI typechecks, lint, unused-export scans, docs, and ratchets).
  • git diff --check: passed.
  • Repository Codex autoreview, branch mode against that merge base: scoped-clean, no accepted/actionable findings at the requested P0 threshold.

The post-merge focused run passed 148 tests in 10 files. After the final handler-table ownership correction, this additional command passed 17 tests, wall 149.18s:

OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=1800000 pnpm test src/gateway/server-methods/users-enumeration.worker.test.ts src/state/user-profile-writes.role.test.ts src/state/user-profiles-multi-account.test.ts src/state/openclaw-state-worker-registry.test.ts --maxWorkers=1

Coverage includes delayed writes, rejection, lost/current requester authority, newer committed display facts, worker routing, role settlement, aliases, and committed self-merge responses. The earlier broader focused proof passed 409 distinct tests across 17 files. Import-only fixture updates also passed the full core/root/UI typechecks; their remaining full suites were not rerun.

Measured test command wall times

Each row ran OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=1800000 pnpm test <file> --maxWorkers=1.

Post-merge focused proof:

Test file Wall time Result
src/gateway/server-methods/users.test.ts 118.13s passed
src/gateway/server-methods/users-enumeration.worker.test.ts 40.11s passed
src/state/user-profiles-multi-account.test.ts 31.39s passed
src/gateway/server-methods.users-merge.test.ts 85.08s passed
src/state/user-profile-writes.role.test.ts 87.26s passed
src/state/user-profiles.test.ts 52.93s passed
src/state/user-profile-aliases.test.ts 25.71s passed
src/gateway/server-methods.authorization.test.ts 45.40s passed
src/state/user-profiles.avatar-worker.test.ts 74.41s passed
src/state/openclaw-state-worker-registry.test.ts 10.95s passed

Additional sibling/fixture-extraction proof before the main merge:

Test file Wall time Result
src/gateway/server-methods/approval.test.ts 83.08s passed
src/gateway/server-methods/themes.test.ts 135.07s passed
src/gateway/server/plugins-http.runtime-scopes.test.ts 86.15s passed
src/gateway/server/ws-connection/message-handler.post-connect-health.test.ts 84.14s passed
src/gateway/sessions-history-http.test.ts 147.85s passed
src/state/user-channel-identities.test.ts 36.43s passed
src/gateway/github-user-identity.test.ts 63.79s passed

Wall times include worker compilation/transforms on a heavily loaded host. Existing approval, theme, history, and identity suites retain their real persistence/lifecycle coverage; fixture extraction added no assertions or per-case boots. Five coherent fixture moves keep import changes within existing line caps. Existing coverage was preserved, and no baseline allowance was expanded. CI timing is unavailable at PR creation.

The line-cap gate initially rejected small import growth in oversized test files; existing fixtures were moved into test-support owners. The assertion-safety baseline shrank by one after removing the avatar MIME cast. The production unused-export gate then identified kernels exported only for tests; moving the handler table to the existing domain registry gave those exports real production consumers. Both production and full-tree unused-export scans now pass without exceptions.

Compatibility retained

No synchronous host compatibility shim was added. setDisplayName, setAvatar, linkEmail, mergeProfiles, syncGitHubIdentity, and setUserProfileRole are removed from the host module and retained as synchronous worker kernels. isUserProfileCommand, executeUserProfileCommand, and isUserProfileWriteCommand are deleted. Existing synchronous schema/migration/boot owners retain their T2 contract; the unchanged role-policy reader is the explicit remainder above. Public RPC and plugin SDK contracts are preserved.

Update behavior

No schema, stored-state format, retention, durability, configuration, or permission change. No updater/Doctor behavior or migration is added.

Scanner correction and main integration

The exact-review scanner includes both endpoint blobs and the complete diff, so fixing only the PR head left the synthetic URI visible in the merge-base file and a removed patch line. The fixture-only correction landed directly on main as 9ced5fc07daee9af43fa2a7542f7543bdd651648, then main was merged into this branch as b15d9dc7ca5c201816ddd9635d036ccb0bb23c96. The sole merge conflict retained every main worker domain alongside this branch's UserProfile registration.

The runtime URL is byte-for-byte unchanged, with identical assertions. No scanner ignore/allow entry was added. The question fixture now matches main; this PR retains only its profile-kernel import change in that file.

Validation:

  • TruffleHog 3.97.4 with filesystem --results=verified,unknown,unverified --fail --fail-on-scan-errors --no-update --json --no-color --no-verification: zero findings in the corrected file and in the merged PR's complete source bundle (331 unique endpoint blobs plus raw diff and full binary patch, 333 inputs). Bundle endpoints were 9ced5fc07daee9af43fa2a7542f7543bdd651648 and b15d9dc7ca5c201816ddd9635d036ccb0bb23c96. This reproduces the source inputs that caused the refusal; hydrated GitHub prompt text was not regenerated locally.
  • pnpm test src/gateway/server-methods/question.test.ts --maxWorkers=1: 30 passed, 47.79s wall on the final main candidate. Earlier runs before main advanced passed in 66.27s and 54.74s. One direct push was rejected because main advanced; the single local commit was rebased and retested before the successful fast-forward push.
  • Repository single-commit Codex autoreview: scoped-clean, zero findings at P0. Both rebases preserved the reviewed patch byte-for-byte.
  • File formatting, repository type-aware lint, and git diff --check: passed. Post-merge lint also covered the combined worker registry.
  • Post-merge focused tests: 178 passed across 11 files, 177.17s wall:
OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=1800000 pnpm test src/gateway/server-methods/users.test.ts src/gateway/server-methods/users-enumeration.worker.test.ts src/state/user-profiles-multi-account.test.ts src/gateway/server-methods.users-merge.test.ts src/state/user-profile-writes.role.test.ts src/state/user-profiles.test.ts src/state/user-profile-aliases.test.ts src/gateway/server-methods.authorization.test.ts src/state/user-profiles.avatar-worker.test.ts src/state/openclaw-state-worker-registry.test.ts src/gateway/server-methods/question.test.ts --maxWorkers=1
  • pnpm check:madge-import-cycles: 0 cycles, 32.66s wall.
  • pnpm check:database-worker-ratchet --base e2e4a34c9828f1230d906567c0eacb7b1e1fe185: passed, 9.73s wall.

The direct-main fixture worktree and local branch were removed after verifying the commit on remote main. Production remains +633 / -628 / net +5 lines against the new merge base, excluding tests and test support.

CI project-discovery fixture repair

Repair commit: a4587132c54e75de75b341032375f3bdad40f95c.

The failed job 110326159434 failed src/gateway/server-methods/projects.test.ts:87, test projects.list coalesces concurrent observed Git discovery and refreshes later reads, with eight total Git launches versus a four-launch single-pass baseline. This is a total-work assertion, not the Git worker's process-concurrency limit.

Classification: inherited scheduling-sensitive test fixture. The test and discovery implementation are identical on PR head b15d9dc7ca5c201816ddd9635d036ccb0bb23c96 and the comparison main d64730851269b8ca5e82d9778810aa0669eb2e3e. The test was introduced by 703cbf2fdffc, before this PR. This request carries no profile identity and does not invoke the changed profile setters.

projects.list independently awaits registry and session SQLite preparation before identity discovery. git-read-cache.ts deliberately shares only pending identity operations, deleting each entry on settlement so later discovery observes external Git changes. Starting ten RPCs with Promise.all does not guarantee their Git operations overlap. An early pass can finish before later RPCs reach discovery.

The unmodified failure did not recur in three ordered six-file shard replays and three standalone project-file runs on either revision. A temporary promise-controlled diagnostic then held the last five discovery admissions until the first five settled. It reproduced exactly 8 > 4 on both PR and main, without sleeps, timers, assertion changes, or production changes. The diagnostic traces showed admissions 1–5, settlements 1–5, then admissions 6–10 and settlements 6–10. The original CI log has no equivalent admission trace; this proves the matching race mechanism, rather than claiming to reconstruct its exact scheduler interleaving.

The fixture now waits for all ten RPCs at the existing discovery-service boundary before calling through to the real implementation. The registered handler, cache, worker, Git processes, spawn assertion, and later remote-change/deleted-checkout assertions remain intact. Early RPC settlement releases the barrier so failures cannot strand other callers. The spy is restored before the later freshness checks. Only this test file changed: +19/-1 test lines, 0 production lines; no cap or assertion was changed.

The log was fetched once. Its six-file reported order was:

  1. src/gateway/session-row-projection.invalidation.test.ts
  2. src/gateway/server-methods/sessions-sharing.test.ts
  3. src/gateway/server-methods/projects.test.ts
  4. src/gateway/update-run-notice-target.test.ts
  5. src/gateway/session-utils.queued-collector-narrow-abort.test.ts
  6. src/gateway/session-delivery-clock-jump.integration.test.ts

A temporary BaseSequencer replay config extended test/vitest/vitest.gateway-database-workers.config.ts, sorting these paths in that order with one worker. It was used equally on PR and main, outside the repository. The hosted shard config permitted two workers; local serial ordering explicitly exercised the preceding-file state. Local evidence is macOS arm64/Node 26.10.0; CI used Linux x64/Node 24.19.0. No remote CI jobs were rerun manually.

Unchanged-source replay wall times (seconds):

Revision Six-file shard, 58/58 each Project file, 20/20 each
PR b15d9dc 204.56, 93.54, 91.57 26.44, 32.60, 39.03
Main d647308 222.15, 110.27, 95.87 40.41, 30.50, 31.99

All local test commands used OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=1800000. Replays used node scripts/run-vitest.mjs --config "$ORDERED_CONFIG" <paths in the order above> --maxWorkers=1, with the same command restricted to projects.test.ts for standalone runs. Concurrent validation commands used separate OPENCLAW_VITEST_FS_MODULE_CACHE_PATH directories.

Post-fix validation:

  • pnpm test src/gateway/server-methods/projects.test.ts --maxWorkers=1: 20/20, 41.89s wall. The initial run spent about 18 seconds executing tests; wall time includes source transformation and worker preparation.
  • 20 clean standalone file runs total (400 test executions), including the initial command and 19 additional runs through the repository wrapper. Additional run wall times: 85.01s, 54.80s, 63.14s, 36.66s, 40.65s, 34.16s, 43.44s, 36.53s, 33.05s, 51.64s, 26.35s, 28.76s, 27.25s, 30.20s, 56.32s, 37.62s, 30.42s, 27.72s, 30.16s.
  • Three clean ordered shard replays, 58/58 each (174 test executions); wall times: 214.25s, 115.01s, 130.33s.
  • node scripts/check-changed.mjs --base b15d9dc7ca5c201816ddd9635d036ccb0bb23c96 -- src/gateway/server-methods/projects.test.ts: passed, including the Gateway-methods typecheck, lint, formatting, applicable ratchets, and all unused-export scans (363.99s wall).
  • pnpm check:madge-import-cycles: 0 cycles, 36.73s wall.
  • pnpm check:database-worker-ratchet --base e2e4a34c9828f1230d906567c0eacb7b1e1fe185: passed, 12.50s wall.
  • Repository Codex autoreview of the local fixture diff, with the existing Git cache supplied as context: scoped-clean, no findings at P0.

No runtime, schema, updater, permission, or scanner-policy change. The comparison worktree and temporary timing probes were removed. Post-fix CI timings are not yet available.

Move the remaining Gateway email acquisition and canonical profile selection
callers onto existing state worker operations. Retain request and profile
authority across waits and recheck it before writes, network effects, and
metadata publication. Remove the synchronous Gateway access helpers.

Keep schemas, stored data, permissions, and update behavior unchanged.
Remaining profile reads/setters and account stores follow in a second slice.
Isolate session-catalog fixture writes from background reclamation so request
cleanup assertions remain deterministic across the worker wait.
Profile acquisition now rejects discovery snapshots before model catalog loading. Preserve zero credential and HTTP effects while testing the direct handler rejection; WebSocket dispatch owns the error response.
Synchronize the concurrency fixture on all reader callbacks entering after asynchronous profile preparation. Preserve the original unrelated-creation, response, and cleanup assertions without timers or polling.
Infer shared-state worker command contracts from lazy per-domain handler tables. Migrate Web Push, APNs, worktree registry operations, and fleet registry while preserving the existing broker and transaction owners.
Keep the shared post-await authority assertion before catalog effects and the final publication check, without duplicate session path validation. Migrate authorization fixtures to the async profile owner contracts and remove their retired resolver mock. Existing real Gateway freshness budgets and permission assertions remain unchanged.
Move profile writer kernels behind the typed worker registry and route display-name and avatar RPCs through admitted worker writes. Recheck requester authority before refreshing connected profiles, use current committed display facts, and preserve committed self-merge responses. Keep role-policy reads as follow-up migration work; schemas and update behavior are unchanged.
…ync/profiles-2

# Conflicts:
#	src/fleet/registry.types.ts
#	src/fleet/registry.worker.ts
#	src/gateway/server-methods.authorization.test.ts
#	src/gateway/server-methods/chat-metadata-handler.test.ts
#	src/gateway/server-methods/users.test.ts
#	src/gateway/server-methods/users.ts
#	src/infra/push-web-store.worker.ts
#	src/state/openclaw-state-worker-registry.ts
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling size: XL labels Oct 1, 2026
@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 1, 2026, 7:41 AM ET / 11:41 UTC (Revision 3).

ClawSweeper review

What this changes

The branch moves profile name and avatar writes into the existing state worker, consolidates profile operation dispatch, preserves current display publication, and updates affected fixtures and tests.

Merge readiness

⛔ Blocked before merge - 2 items remain

The PR remains useful: current main still executes profile name and avatar setters synchronously. No actionable introduced defect was found, and GitHub now reports the pinned head as mergeable, resolving the previous conflict blocker.

Priority: P2
Reviewed head: cea40170998393c519b89ecdcf98e1416ad643f2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused worker cutover with meaningful boundary coverage and no actionable findings; the previous conflict concern is resolved.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a maintainer-authored internal refactor, so the ordinary external-contributor proof gate does not apply. The production Gateway-handler/real-worker test and reported negative control support the execution cutover; mocked delay and revocation cases are supplemental. No stored-data contract changes require migration proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a maintainer-authored internal refactor, so the ordinary external-contributor proof gate does not apply. The production Gateway-handler/real-worker test and reported negative control support the execution cutover; mocked delay and revocation cases are supplemental. No stored-data contract changes require migration proof.
Evidence reviewed 9 items Current main still needs the setter cutover: At the fetched main revision, users.setDisplayName and users.setAvatar still call the synchronous host setters. The merged acquisition and registry precursors do not implement these setter changes.
Pinned introduction and worker ownership: The pinned base-to-head diff registers the UserProfile domain lazily, removes its former central dispatcher, and routes both setters through synchronous kernels inside the existing worker mutation owner.
Authority remains checked before commit: Both new adapters reuse the existing writer admission callback, which checks physical-store admission and captured requester authority before transaction and commit grants. Gateway handlers additionally check authority before connected-client refresh; committed self-merges retain their response receipt without an unauthorized refresh.
Findings None None.
Security None None.

How this fits together

Gateway profile RPCs authorize requests and submit mutations to OpenClaw’s shared-state worker. Committed SQLite results update the profile catalog, connected clients, and RPC responses.

flowchart TD
 A[Profile edit request] --> B[Gateway authorization]
 B --> C[State worker broker]
 C --> D[Transaction and commit admission]
 D --> E[Profile SQLite mutation]
 E --> F[Committed profile catalog]
 F --> G[Connected clients and RPC response]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test growth Production net +6 lines; tests and support net +344 lines The pinned diff largely relocates production kernels; its small net growth supports worker adapters and current-display publication.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep profile mutations under the existing worker admission and commit-publication owner while preserving RPC results and current catalog displays.

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

Not applicable as a new user-facing bug reproduction; source confirms the current-main setters perform synchronous SQL, and the PR supplies a focused handler-boundary negative control.

Is this the best way to solve the issue?

Yes: extending the existing admitted worker and migrating internal callers preserves one mutation owner without introducing another store, protocol, or public API.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded runtime database ownership improvement with no demonstrated urgent user-facing regression.
  • 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: The supplied repository state identifies a maintainer-authored internal refactor, so the ordinary external-contributor proof gate does not apply. The production Gateway-handler/real-worker test and reported negative control support the execution cutover; mocked delay and revocation cases are supplemental. No stored-data contract changes require migration proof.

Evidence

What I checked:

  • Current main still needs the setter cutover: At the fetched main revision, users.setDisplayName and users.setAvatar still call the synchronous host setters. The merged acquisition and registry precursors do not implement these setter changes. (src/gateway/server-methods/users.ts:301, bb69e5fbb24d)
  • Pinned introduction and worker ownership: The pinned base-to-head diff registers the UserProfile domain lazily, removes its former central dispatcher, and routes both setters through synchronous kernels inside the existing worker mutation owner. (src/state/user-profiles.worker.ts:112, cea401709983)
  • Authority remains checked before commit: Both new adapters reuse the existing writer admission callback, which checks physical-store admission and captured requester authority before transaction and commit grants. Gateway handlers additionally check authority before connected-client refresh; committed self-merges retain their response receipt without an unauthorized refresh. (src/state/user-profile-writes.ts:113, cea401709983)
  • Production boundary regression coverage: The added test invokes both registered Gateway handlers with real worker-backed state, checks returned and refreshed profile facts, and asserts zero calling-thread SQL operations. The body reports a pre-cutover negative control with 16 prepare calls, focused passing runs, and delayed-result/revocation coverage; these runs were not executed by this read-only reviewer. (src/gateway/server-methods/users-enumeration.worker.test.ts:18, cea401709983)
  • Previous conflict blocker resolved: The live GitHub read retained the exact reviewed head and returned mergeable=true, mergeable_state=blocked, merged=false. Raw local parent records identify the head as a merge of the previous reviewed head and pinned base; the introduced registry diff preserves all pinned-base domains and adds UserProfile routing. Blocked metadata does not establish a remaining merge conflict. (src/state/openclaw-state-worker-registry.ts:65, cea401709983)
  • Complete captured body recovered: The fetched full body matched the captured SHA-256 a63af39db1474832d01d54d39f254edea123344e30ef5fcb219e09066deca57b. Its omitted tail documents the project-discovery admission barrier, unchanged production behavior and assertions, 20 standalone passes, and three ordered shard passes. (cea401709983)

Likely related people:

  • steipete: 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 (2 earlier review cycles)
  • reviewed 2026-10-01T10:30:38.540Z sha b15d9dc :: blocked before merge. :: none
  • reviewed 2026-10-01T11:29:02.742Z sha a458713 :: blocked before merge. :: none

@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Preserve the UserProfile worker cutover alongside newly registered main domains and retain async session-metadata fixture cleanup.\n\nValidation: core types, zero import cycles, database-worker ratchet, 103 focused tests, and scoped autoreview.
@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit ed961d5 into main Oct 1, 2026
88 of 130 checks passed
@steipete
steipete deleted the dbasync/profiles-2 branch October 1, 2026 11:53
@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…2571)

* refactor(state): resolve Gateway profiles in state workers

Move the remaining Gateway email acquisition and canonical profile selection
callers onto existing state worker operations. Retain request and profile
authority across waits and recheck it before writes, network effects, and
metadata publication. Remove the synchronous Gateway access helpers.

Keep schemas, stored data, permissions, and update behavior unchanged.
Remaining profile reads/setters and account stores follow in a second slice.
Isolate session-catalog fixture writes from background reclamation so request
cleanup assertions remain deterministic across the worker wait.

* test(gateway): assert snapshot rejection at handler boundary

Profile acquisition now rejects discovery snapshots before model catalog loading. Preserve zero credential and HTTP effects while testing the direct handler rejection; WebSocket dispatch owns the error response.

* test(gateway): await concurrent metadata reader admission

Synchronize the concurrency fixture on all reader callbacks entering after asynchronous profile preparation. Preserve the original unrelated-creation, response, and cleanup assertions without timers or polling.

* refactor(state): register worker operations once per domain

Infer shared-state worker command contracts from lazy per-domain handler tables. Migrate Web Push, APNs, worktree registry operations, and fleet registry while preserving the existing broker and transaction owners.

* fix(gateway): retain one catalog acquisition authority check

Keep the shared post-await authority assertion before catalog effects and the final publication check, without duplicate session path validation. Migrate authorization fixtures to the async profile owner contracts and remove their retired resolver mock. Existing real Gateway freshness budgets and permission assertions remain unchanged.

* refactor(state): run profile setters in state workers

Move profile writer kernels behind the typed worker registry and route display-name and avatar RPCs through admitted worker writes. Recheck requester authority before refreshing connected profiles, use current committed display facts, and preserve committed self-merge responses. Keep role-policy reads as follow-up migration work; schemas and update behavior are unchanged.

* refactor(state): let profile handlers own kernel dispatch

* test(gateway): assemble synthetic question URL credentials

* test(gateway): synchronize concurrent project discovery
vincentkoc added a commit that referenced this pull request Oct 7, 2026
Give fixtures owned private directories, resolved session-store paths, a valid runtime executable and explicit reply policy. Preserve real dispatch, lifecycle cleanup, negative cases and production path guards; use the existing npm JSON parser.

Reuse the exact canonical memory admission, project-read coordination and enrollment retry fixture changes from ad183c8 (#162574), ed961d5 (#162571), and 178005d (#162721).

Co-authored-by: Peter Steinberger <[email protected]>
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: web-ui App: web-ui cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime 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