Skip to content

refactor(placement): move lifecycle and grant preparation to workers - #166444

Merged
steipete merged 16 commits into
mainfrom
dbasync/w6placement
Oct 7, 2026
Merged

steipete merged 16 commits into
mainfrom
dbasync/w6placement

Conversation

@steipete

@steipete steipete commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Placement moves, prepared-environment binding, retirement, and standing-grant preparation still perform SQLite work on the Gateway thread. Awaited persistence must preserve live authority, accepted-write ordering, and successful session deletion when orphan cleanup retires the same placement first.

User Impact

Placement and approval preparation use the existing database workers while retaining revocation and cancellation behavior. No schema, persisted-format, retention, durability, configuration, or environment-variable changes are introduced. Released synchronous SDK signatures remain available; worker failures do not fall back to native persistence. Remaining ordinary getter and policy-preparation callers stay in stacked PR #166445.

Why This Change Was Made

The placement actor owns move/bind/retirement writes, and the approval reader prepares joined grant facts. Transactions remain synchronous. Physical ownership and live authorization are checked after waits and immediately before commit; accepted writes retain FIFO settlement through shutdown. Placement mutations with unknown outcomes are never replayed. New abandonment intents check the live runner against transaction-local source facts, while callers joining an existing durable intent retain its original decision.

The landing repairs preserve refreshed profile authority, invalidate the embedded fallback placement cache when its database owner retires, and keep conditional Move cancellation from replacing the original Stop error. Retirement recognizes an already-absent row inside the worker transaction without publishing a fabricated transition. Present rows still require the exact state, generation, and null claim fields; the released synchronous method remains strict. Successful retirement adds no SQL. The recovery test now uses its existing asynchronous session/Gateway-home cleanup owner instead of closing SQLite prematurely in a competing hook.

Released Gateway/SDK surfaces were checked against v2026.10.1-beta.1 and v2026.9.8. Optional async companions, compatibility records, and type assertions preserve callers until the next SDK major. Standing-grant consume remains the permanent synchronous final transport guard, not a deprecated preparation API.

Retained authority boundaries and follow-up debt

Cross-store reset retirement stays synchronous at src/gateway/worker-environments/session-placement-lifecycle.ts:146 and src/gateway/session-reset-service.ts:816. Destructive worktree cleanup retains narrow live reconciliation reads at src/agents/worktrees/owner-protection.ts:82; final standing-grant consumption retains its joined native query at src/gateway/operator-approval-placement-grants.ts:185. Sharing grants retain pre-existing short indexed reads of the other agent-store owner at src/gateway/session-sharing-worker-grant.ts:149, with source admission prepared before the placement transaction. These guards do not rediscover same-database maintenance admission while its writer lock is held.

Overlap stays focused on these owners: #166102, #165901, #165921, and the entry/auth/binding/discovery/worktree/transcript/profile work. Improvements from #166053 and #166054 remain intact. No other PR branch is changed.

Evidence

Published head: 1b0647535c9cb1a931d0a61f4647ce371362ef36, tree 13f5ff68d3922fa545e8f08dec85355d049bedd6. Real GitHub conflicts required a merge of main 892911ba; the later integration adds main 1b395594318bbd0db6f2467f35b10cc8ac1d30d0 to consume its exact fixes for the remaining inherited failures. Both integrations use merge commits. GitHub confirms the published head is mergeable. The second merge had no conflicts, and the PR patch and review context remain byte-identical to the clean two-pass P2 review. The source interaction audit found no actionable issue: transcript retries retain their existing idempotent ledger recovery and recheck live placement/source authority before persistence and acknowledgment.

All 15 integration gate groups pass on this exact head: core types; all 27 test type graphs (1447.24s); worker retry/live acknowledgment; startup/channel status; Doctor/update; the repaired publication E2E; all four import/build-graph contracts; Madge; formatting; lint; worker/mock/timeout ratchets; and diff validation. Fresh proof across 16 runtime/import files passed 273 cases; the public E2E uses two reporters and is counted once. The fresh local SDK report also passes. ClawSweeper completed this exact head at 12:57 UTC with no actionable code or security findings. Its then-pending local test-type and inclusive SQL requirements are now complete. All 25 focused SQL flows and all three warmed-turn pairs pass against integrated main 1b395594, including maintenance/background work. Warmed all-thread counts are 2268.1→2242.8, 2279.7→2233.4, and 2276.5→2251.4; the median falls from 2276.5 to 2242.8, while host-thread counts remain 28. All workload phases report zero SQL execution or preparation errors. The completed run retains 452 traces and compiled-runtime/source identities; all measured processes stopped and source copies are clean. Exact-head CI remains independently inherited red as described below; landing still requires the native exception admission. Previous-source checks below remain historical evidence.

  • Current CI investigation: run 37624053500 checks synthetic merge d45e1ec6afa772292925e45edabe26636b59acbd, tree bd04566667c7da92dc44593e0679330543db6269, with ordered parents main 86b83b74b4c68e147277b022b517c0d8b5322c16 and this PR head. The run completed with 92 successful jobs, 23 skipped jobs, two failed roots and their downstream failed aggregate, with no cancellations in this CI run. The root failures are four server.sessions-send-owner-continuation.test.ts cases that end before private requester/plugin authority gates, and server.channels.test.ts:100 expects a boolean WhatsApp configured field but receives undefined. Both job logs were retained once. The same two tests also fail in scheduled main CI at ccadf6ace8757f188fe9e40fbbf39d71ccf0928c; both test files are byte-identical on that main revision, the actual CI base, and the tested merge. Five unchanged runs per file on main and five on the tested merge reproduce both failures. The channel test supplies its configured-state fixture through hooks that main no longer calls for non-probing status. One diagnostic run per revision exposed the same requester-owner capability rejection before plugin execution in the continuation family. The exact early gate varies, not every failed case prints the underlying error, and printed successful receipts belong to the passing child-error sibling. The fixture and relevant authority/invocation owners are unchanged across the compared revisions. These are independently inherited failures; the completed evidence is prepared for the native inherited-failure exception without weakening assertions or rerunning CI for green.
  • Prior integration proof (3106f46f): 16 of 17 gate groups passed: all 424 focused/import/compatibility cases across 37 files, core types, 26 of 27 test type graphs, Madge, lint, format, and worker/mock/timeout ratchets. The sole failure was the unchanged UI font fixture's obsolete signal argument; current integrated main contains its one-line fix.
  • Fresh SDK proof: the local report for 1b0647535c9cb1a931d0a61f4647ce371362ef36 versus integrated main 1b395594318bbd0db6f2467f35b10cc8ac1d30d0 is checked and its renderer completed successfully, digest 0179d1d95c492e53f431e79d9c9936f1d40ce1d6948bbd8292c7869fb41f9365. The full diff is identical to the previously audited 3106f46f report, including all 181 affected export records across 30 entrypoints and all 33 distinct declaration-change records. Changes are reachable declarations only; no direct exported declaration or entrypoint is added, removed, or changed. Integration introduces no new reachable callable change; released synchronous contracts and optional async companions remain compatible.
  • Retirement regression: five isolated full-flow runs on 5937396f gave four passes and one exact retirement failure; all five eb1b48c5 baseline runs passed. The test-only worker-queue regression then failed with that exact error while the archive-publication phase passed (56.201s). Repair 624075e4 passed all three full suites with pnpm test <file> --maxWorkers=1: deletion lifecycle 132.250s, real abandonment 97.102s, and reclaim/retirement fences 80.195s. Worker retirement also preserves strict claim/state/generation rejection and clears local conflict state after peer retirement.
  • Static and SDK proof: the local ratchet caught the first repair's shared-kernel query (T1 821→822). Moving the absence check into the existing worker fixed it without changing the inventory allowance. All 14 scoped gates passed on d215c779, including those three full suites, lint, production types, four Gateway test graphs, import boundaries, Madge, and the ratchet. The checked SDK report is bound to production commit bf25462da5cd, digest 7767152bd270dd60da0af296f8c66f664e8483b4937ebc0c778c44d397c08ca0: 181 reachable exports across 30 entrypoints, no export/entrypoint additions or removals. The only delta from the preceding report is an internal retirement-option name; public signatures are unchanged. The subsequent commits through 93f59e77 change tests only; this qualification does not cover the later main integration or claim a new SDK render.
  • Earlier CI: run 37599832488 tested 624075e4 merged with main 5077ad4f: 89 successful jobs, 23 skipped jobs, five failed roots, and the downstream failed aggregate; no cancellations. The PR-caused unbound-method lint is fixed. Recovery passed all five main runs and failed all five tested-merge runs at the premature synchronous cleanup; the exact failing merge plus the minimal fixture repair passes all eight cases (79.49s), and actual 93f59e77 passes all eight (79.76s). Its scoped lint (17.98s), Gateway-server type graph (4.08s), formatting, and diff checks also pass. ClawSweeper completed 624075e4 with no findings; that is prior-head review evidence only.
  • Independently reproduced main failures: Doctor's two multiline-warning assertions reproduce on clean main a2e44be9 (2 failed/10 passed, 136.723s). The update CLI diagnostic expectation also fails on scheduled main. X publication's unchanged anonymous-reader assertion returns 503 instead of 200 on both main and the tested merge: main runs passed [1] and failed [2,3,4,5]; merge runs passed [1,4] and failed [2,3,5]. All five runs per side used clean pinned sources and the same command. A source audit found all scoped Doctor and update test, producer, and diagnostic-renderer files byte-identical to the earlier independent qualification, main 5077ad4f, integrated main 892911ba, and candidate 3106f46f. These records now remain historical attribution evidence: current integrated main contains the exact Doctor fix 0dc209168731, update diagnostic fix 19cc8e6568f2, and stable-public-read fixture fix d641ea18101f, alongside the UI type fix 1d10375ee563. Final CI must exercise those fixes; this candidate does not claim an inherited-failure exception for the old failures. Recovery was PR-exposed and is not classified as inherited.

The attempted 93f59e77 SQL run was superseded by the required conflict integration after completing only the old baseline's stop/handoff family (69.692s). Its raw traces, source identities, and interruption receipt are preserved. No candidate samples, warmed-turn samples, or candidate-versus-main comparison were produced by that run; it supplies no passing SQL qualification. The current exact-head comparison above supplies the required integrated-source qualification.

The 5937396f strict SQL no-growth gate failed and remains disclosed. Commentary counted four extra periodic-checkpoint statements over ten observations (+0.4 each); the pooled 30-observation control remained +4 total (+0.1333 each). Background and maintenance statements remain counted. A baseline raw-audit SQLITE_BUSY recovered through the existing owner retry and remains in the evidence. The current exact-head comparison now passes all 25 flows and all three warmed pairs against integrated main. The old failure remains historical evidence; no samples, maintenance statements, or thresholds were excluded to obtain the current pass.

Original failures and earlier proof retained

The original CI failure was PR-caused: sharing preparation retained initial profile facts instead of the pending-input owner's refreshed facts. It failed on all five PR runs and passed on all five baseline runs; the unchanged regression now passes, including subsequent revocation. Original fail-fast cancellations were downstream fallout.

Fallback-cache and Move-cancellation regressions likewise failed all five original-PR Linux runs while all five baseline runs passed. Stale async fixtures and a test-path ordering error were repaired. Earlier agent-admission failures reproduced on both main and PR; main's borrower repair resolved the representative case. Mac timeout noise was retained and proof moved to isolated Linux without weakened deadlines. Main fixed the earlier CallBrief export failure in #166147.

Earlier passing checks are not substituted for final-head gates. Integrated de6e0a7f passed 101 behavior cases across 11 files (551.359s), planner/import boundaries, production types, all 27 core-test type graphs (402.045s), Madge, and CI. Earlier owner-only SQL grew by +5.5/+2.9/+1.5 statements per warmed turn and failed. A later 8c6d5cec series passed all 25 flows and warmed pairs: main-thread 28→28, all-thread median 2442.9→2397.9, no SQL errors. Neither supersedes the newer no-growth failure. The broader target of fewer than 500 statements per warmed turn remains unmet.

The published-driver cell passed from published 2026.9.8 to the earlier persistence-owner source, proving readiness, durable/incognito preservation, and service cleanup. It is retained update-path evidence, not final validation of the subsequent repairs.

Release-note context: move placement and approval preparation off the Gateway thread while preserving released SDK compatibility, live abandonment authority, and deletion completion when orphan cleanup has already retired the placement.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts size: XL labels Oct 7, 2026
@steipete
steipete marked this pull request as ready for review October 7, 2026 04:08
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 1b0647535c9cb1a931d0a61f4647ce371362ef36
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/exec-approval-manager.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/gateway/exec-approval-manager.types.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/gateway/session-sharing-authorization.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/worker-environments/placement-authorization.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/worker-environments/placement-turn-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/worker-environments/placement-turn-authority.types.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 7, 2026, 10:33 AM ET / 14:33 UTC (Revision 13).

ClawSweeper review

What this changes

Moves session placement lifecycle operations and standing-approval preparation into existing database workers while preserving released synchronous plugin interfaces.

Merge readiness

⛔ Blocked before merge - 3 items remain

The refactor remains necessary, and no actionable code or security defect was found. The updated evidence resolves the previous SQL-budget and local typecheck blockers; inherited-red CI still requires native landing admission.

Priority: P2
Reviewed head: 1b0647535c9cb1a931d0a61f4647ce371362ef36

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent worker cutover with completed current-head proof and no actionable findings; native CI-exception admission remains separate.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The complete captured body records exact-head Gateway/worker workloads exercising placement and grant preparation, inclusive SQL recovery measurements, and focused revocation/retirement regressions. Both prior proof requests are completed; no stored schema or format changes were found, and released synchronous adapters remain supported. These are recorded results, not tests executed by this read-only review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The complete captured body records exact-head Gateway/worker workloads exercising placement and grant preparation, inclusive SQL recovery measurements, and focused revocation/retirement regressions. Both prior proof requests are completed; no stored schema or format changes were found, and released synchronous adapters remain supported. These are recorded results, not tests executed by this read-only review.
Evidence reviewed 8 items Pinned introduction and necessity: Inspected the introduced delta from 1b39559 to the exact original head. Current main still uses native placement move operations, retirement, and grant preparation, so the central cutover remains useful. The supplied test merge has different base parentage and was not used to infer removals from current main.
Worker admission preserves live authority: The production worker requests transaction admission before mutation and commit admission before settlement. The host mutation owner checks physical database custody and caller grant authority at both stages; uncertain outcomes invalidate publication rather than replaying writes.
Final transport authority remains synchronous: Asynchronous grant resolution supplies preparation facts only. The node dispatch authorization callback still consumes the grant through a fresh joined placement/environment/parent-approval read immediately before transport authorization.
Findings None None.
Security None None.

How this fits together

Session placement decides where OpenClaw runs a session and coordinates moves, retirement, and prepared workers. Gateway requests and approval decisions enter this subsystem; committed placement facts and authorization checks feed subsequent worker launches and session cleanup.

flowchart TD
  A[Gateway session request] --> B[Current caller authority]
  B --> C[Placement database worker]
  C --> D[Transaction and commit checks]
  D --> E[Committed placement facts]
  E --> F[Worker launch or session cleanup]
  G[Standing approval preparation] --> H[Final node transport authorization]
  E --> H
Loading

Before merge

  • Complete next step (P2) - Complete native inherited-failure exception admission for the pinned head and CI attempt, verifying the retained baseline and failure logs.
  • 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
Inclusive warmed SQL Recorded median 2276.5→2242.8 statements per turn; host thread 28→28 The completed exact-head comparison addresses the prior no-growth blocker while retaining background statements.
Implementation growth Production/tooling net +1296 lines; tests/support net +1029 lines The growth has a stated purpose: worker command adapters, authority transfer, compatible SDK companions, and lifecycle regressions.

Stored data model

Persistent data-model change detected: unknown-data-model-change: scripts/database-worker-inventory.mjs, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one worker owner for placement persistence, preserve live final-effect guards and released SDK adapters, and leave the remaining read-caller migration to the stacked follow-up.

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

Not applicable as a standalone bug report; current-main source establishes the native SQLite preparation paths this refactor targets, and the recorded worker comparisons exercise the replacement paths.

Is this the best way to solve the issue?

Yes. The branch extends existing database workers, keeps transactions synchronous, and preserves authority checks and shipped SDK contracts rather than introducing another persistence owner.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The complete captured body records exact-head Gateway/worker workloads exercising placement and grant preparation, inclusive SQL recovery measurements, and focused revocation/retirement regressions. Both prior proof requests are completed; no stored schema or format changes were found, and released synchronous adapters remain supported. These are recorded results, not tests executed by this read-only review.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 other: Current PR review merge-risk labels are merge-risk: 🚨 compatibility.

Label justifications:

  • P2: This is a bounded internal placement and approval preparation improvement without an established urgent user-facing regression.
  • merge-risk: 🚨 compatibility: Gateway plugin-facing interfaces gain async companions, with the accepted compatibility window preserving released synchronous signatures and completion behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The complete captured body records exact-head Gateway/worker workloads exercising placement and grant preparation, inclusive SQL recovery measurements, and focused revocation/retirement regressions. Both prior proof requests are completed; no stored schema or format changes were found, and released synchronous adapters remain supported. These are recorded results, not tests executed by this read-only review.
  • proof: sufficient: Contributor real behavior proof is sufficient. The complete captured body records exact-head Gateway/worker workloads exercising placement and grant preparation, inclusive SQL recovery measurements, and focused revocation/retirement regressions. Both prior proof requests are completed; no stored schema or format changes were found, and released synchronous adapters remain supported. These are recorded results, not tests executed by this read-only review.

Evidence

What I checked:

  • Pinned introduction and necessity: Inspected the introduced delta from 1b39559 to the exact original head. Current main still uses native placement move operations, retirement, and grant preparation, so the central cutover remains useful. The supplied test merge has different base parentage and was not used to infer removals from current main. (src/gateway/worker-environments/placement-store.ts, cb04039f21de)
  • Worker admission preserves live authority: The production worker requests transaction admission before mutation and commit admission before settlement. The host mutation owner checks physical database custody and caller grant authority at both stages; uncertain outcomes invalidate publication rather than replaying writes. (src/gateway/worker-environments/placement-lifecycle.worker.ts:44, 1b0647535c9c)
  • Final transport authority remains synchronous: Asynchronous grant resolution supplies preparation facts only. The node dispatch authorization callback still consumes the grant through a fresh joined placement/environment/parent-approval read immediately before transport authorization. (src/gateway/operator-approval-placement-grants.ts:341, 1b0647535c9c)
  • Revocation and retirement regression coverage: Reviewed real SQLite worker regressions covering transaction/commit revocation, runner reconnection before abandonment, foreign membership/schema changes, strict generation and claim fences, and deletion succeeding when peer retirement wins the worker queue. These assertions inspect surviving database state and retained intents. (src/gateway/worker-environments/placement-dispatch-move-recovery.test.ts:48, 1b0647535c9c)
  • Released SDK compatibility and accepted cutover: Read the v2026.9.8 placement reader and standing-grant runtime through GitHub source APIs. The branch retains their synchronous signatures, adds optional async companions, and documents the next-major compatibility window. The maintainer-authored body explicitly preserves synchronous final grant consumption; this accepted scope does not require a new API-direction decision. (src/plugin-sdk/gateway-placement-compat.test.ts:6, 1b0647535c9c)
  • Complete captured proof body and prior blockers: Inspected the full 15,029-unit body, including the omitted middle range, and verified SHA-256 6b0d15dfb2f31f34ab8f7e562bc396339aeac762f0ca3868f5d1be07ac946e96 matches the captured snapshot. It records completion of all 27 local test-type graphs, all 25 inclusive focused SQL flows, and three warmed workload pairs on the exact head versus integrated main. All-thread pairs are 2268.1→2242.8, 2279.7→2233.4, and 2276.5→2251.4, with background work included and zero SQL execution/preparation errors. Historical failures remain disclosed. (1b0647535c9c)

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 (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-07T07:12:34.843Z sha de6e0a7 :: blocked before merge. :: none
  • reviewed 2026-10-07T07:47:49.040Z sha 5937396 :: blocked before merge. :: none
  • reviewed 2026-10-07T09:25:20.858Z sha 624075e :: blocked before merge. :: none
  • reviewed 2026-10-07T09:37:05.872Z sha 624075e :: blocked before merge. :: [P2] [P2] Move the missing-row probe into the worker-only owner
  • reviewed 2026-10-07T10:42:19.362Z sha 93f59e7 :: blocked before merge. :: none
  • reviewed 2026-10-07T11:21:08.879Z sha 93f59e7 :: blocked before merge. :: none
  • reviewed 2026-10-07T12:43:14.953Z sha 93f59e7 :: blocked before merge. :: none
  • reviewed 2026-10-07T12:57:13.451Z sha 1b06475 :: blocked before merge. :: none

@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. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Oct 7, 2026
…tion

Merge main at 520db50 without rebasing. Read pending-input profile facts from their current owner when sharing consumers run, preserving valid collected input after non-revoking profile changes and retaining final revocation checks.

Extend the existing placement SDK compatibility record and type assertions for the released synchronous Gateway contracts. No schema, stored-data, retention, or environment-name changes.
@steipete

steipete commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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 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 7, 2026
…rrors

Invalidate the embedded placement cache when its physical database owner retires, keeping previously retained stores revoked. Return an explicit no-change receipt when conditional move cancellation loses its local generation so the original abort remains visible and no stale intent is deleted or published.

Restore the canonical ordering of worker test paths. Existing user-flow regression assertions remain unchanged; the internal conditional cancellation test now asserts false and preserved intent.
Model the asynchronous placement readers, move lookup, and retirement methods consumed by the worker cutover. Preserve existing destination, recovery publication, and session-event assertions.
Merge eb1b48c without rebasing to include the independently landed fresh-borrower config-generation repair and retained integrity proof. The placement PR patch remains byte-identical relative to the new baseline. Fresh P2 integration review is clean; post-integration type, behavior, and SQL gates remain bound to the merged tree.
@steipete

steipete commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 7, 2026
@steipete
steipete merged commit af18444 into main Oct 7, 2026
192 of 197 checks passed
@steipete
steipete deleted the dbasync/w6placement branch October 7, 2026 14:34
@steipete

steipete commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

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

scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 7, 2026
One upstream commit (openclaw#166444, placement lifecycle and grant preparation moved
to workers). The only conflict is the generated
docs/reference/database-schemas/worker-access-inventory.md, regenerated from
the merged tree with `node scripts/database-worker-inventory.mjs --write`
(`--check` is current).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jhynq2GVpzuVQQieebEubg
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 7, 2026
…scope

Upstream openclaw#166444 (af18444) moved `latestEntry` into the prepare step, where it
exists only when no maxLines trim is requested. The feature's post-trim
release of staged post-compaction delegates fell back to that name and broke
typecheck (TS2448/TS18048). It now falls back to the row this request read
before the lifecycle fence (`entry`) and skips the release when no row exists.

Gates: tsgo core clean. Canonical runner: server.sessions.compaction(.continuation,
-read-errors) 20+5+6, sessions-sharing(.authority) 15+4,
subagent-spawn.attachments/authority/claim-handoff 26+4+6.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jhynq2GVpzuVQQieebEubg
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 7, 2026
…nt row

9a37d5b fell back to the request's pre-fence `entry` when the post-trim
current-row read failed or no longer matched the compacted session (session id,
lifecycle revision, work-start). Before upstream openclaw#166444 that fallback was a
row read under the lifecycle fence; afterwards it was not. A stale row could
then reach the delegate release with its compaction count. Review: 🌻 Elliott
and 🕯 Emeric, independently.

The release now runs only from the row read after the trim. Without one, the
staged delegates stay staged.

Fossil: server.sessions.compaction.continuation.test.ts "keeps delegates staged
when the post-trim row no longer matches" replaces the session row right after
the real trim (trim seam spreads the real module). Patch-coupled: with the
fallback restored it fails (release runs, delegate count 0); with this change
the suite passes 6/6. The gateway-server test typecheck shard is clean; the
mock-export ratchet is unchanged at 559.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jhynq2GVpzuVQQieebEubg
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
…penclaw#166444)

* refactor(placement): run lifecycle and grant preparation in workers

* test(placement): retain lifecycle boundaries in worker fixtures

* test(placement): align startup and recovery owner lifetimes

* perf(placement): avoid single-query projection transactions

* fix(placement): retire cached stores and preserve move cancellation errors

Invalidate the embedded placement cache when its physical database owner retires, keeping previously retained stores revoked. Return an explicit no-change receipt when conditional move cancellation loses its local generation so the original abort remains visible and no stale intent is deleted or published.

Restore the canonical ordering of worker test paths. Existing user-flow regression assertions remain unchanged; the internal conditional cancellation test now asserts false and preserved intent.

* test(placement): update worker lifecycle fixture contracts

Model the asynchronous placement readers, move lookup, and retirement methods consumed by the worker cutover. Preserve existing destination, recovery publication, and session-event assertions.

* fix(sdk): keep final grant consumption out of deprecation metadata

The consume method remains the synchronous final authorization boundary and has no async replacement. Keep its compatibility type assertion while removing the incorrect deprecated-surface marker.

* fix(gateway): settle concurrent placement retirement

Treat an already-absent placement as a completed worker retirement while preserving state, generation, and live-claim fences. Keep released synchronous retirement strict and avoid publishing a fabricated state change.

* fix(gateway): keep retirement absence checks in worker

* test(gateway): bind retirement regression to its placement owner

* test(gateway): let recovery fixture settle work before closing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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.

1 participant