Repository navigation
perf(fleet): run registry operations in SQLite workers - #148290
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 18, 2026, 12:08 PM ET / 16:08 UTC (Revision 51). ClawSweeper reviewWhat this changesMoves Fleet’s container registry operations into SQLite workers and updates lease checks, snapshot cleanup, schema validation, and regression coverage. Merge readiness⛔ Blocked before merge - 3 items remain This PR remains useful: current main still performs Fleet registry SQL synchronously. No actionable correctness or security finding was identified. The maintainer’s exact-head disposition resolves the previous review’s outstanding qualification request. Priority: P2 Review scores
Verification
How this fits togetherFleet manages registered OpenClaw containers through CLI commands. Its registry supplies container records and reserves ports, while operation leases coordinate container and filesystem changes. flowchart TD
A[Fleet CLI commands] --> B[Registry and operation scope]
B --> C[Read-only SQLite worker]
B --> D[Shared SQLite writer]
C --> E[Validated container records]
D --> F[Atomic reservations and lease checks]
E --> G[Container and filesystem operations]
F --> G
G --> H[Joined cleanup and command result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1223, Tests +2722, Docs +51, Other +5. Total +4001 across 61 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one worker-backed registry owner with noncreating reads, transactional lease fencing, and acknowledged cleanup, following the recorded compatibility disposition. Do we have a high-confidence way to reproduce the issue? Not applicable as a discrete bug report; source confirms the synchronous main-branch operations that this performance refactor moves into workers. Is this the best way to solve the issue? Yes. Reusing the shared writer and canonical read-admission owners preserves existing storage contracts without adding a schema or configuration migration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3bedfb0ecd4d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (50 earlier review cycles; latest 8 shown)
|
Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change.
Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects.
Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup.
Compose Fleet reader work with canonical main 13a743b while preserving managed-node existing-schema policy. Carry the canonical existingSchemaPath through fixed-read workers, validate native and worker readers through one read-schema owner, and retain the existing cache policy during native custody. Ordinary fixed reads still observe independent committed state without host SQL. Native snapshot preparation, lifecycle cleanup, schema repair ownership, and the canonical catalog performance test remain unchanged. Four real reader regressions fail on the unrepaired union and pass after the repair; 83 focused tests and a fresh P0-P2 review passed.
|
Maintainer disposition for head Exact-head CI passed 142 checks with 14 skips and a successful required gate. The review reports no actionable code or security finding. Buzz qualification: Accept the documented remaining uncertainty for landing this head. The five earlier cold-start timeouts remain unexplained. Unchanged local controls and the single observation-only hosted comparison passed; the latter covered 1,184 tests, including all 15 Buzz cases. Its resource class and observed neighbor overlap differed from CI. Neither those passes nor current green CI establish a historical cause or an unrelated/flaky classification. Original failure evidence is retained, and no Buzz deadline or assertion was weakened. WorkerTaskPool compatibility: Accept the documented close-retry ownership contract. Early request rejection is not resource-retirement acknowledgement. A native termination failure retains the slot, pending completion callbacks, input/capacity charges, and dependent artifacts. The same pool must successfully close or rotate before those resources are released; plugin cleanup must retain its dependencies until then. The optional retirement observer is additive, and its throw/rejection cannot replace the original termination error or release custody. The source and retained cleanup regressions cover failed closure, late host responses, and eventual retry. SDK contract. Stored-data compatibility: The detected paths do not introduce a schema or format migration. The extracted Fleet cell record is byte-identical to its former type, the backup manifest remains the same version-1 shape, and the schema definitions, generated database types, and schema-version owner are unchanged by this PR. The new worker request types are transport metadata. Existing-schema reads reuse the canonical validator without repairing stored schema. The published 2026.9.4 driver qualification remains attributed to predecessor These dispositions retain the normal native review, CI, and mergeability gates. They do not waive a code finding or authorize an unresolved red check. |
|
Merged via squash.
|
…49090-prep * 'main' of https://github.com/openclaw/openclaw: (1719 commits) test: remove redundant catalog benchmark gate (#151892) improve(ai): speed up Unicode message preparation (#151950) improve(logging): reduce filesystem work when polling logs (#151961) fix(cron): preserve scheduled work after creator turns end (#151919) improve(telegram): avoid rescanning expired rich-text spans (#151965) refactor(testing): share plugin assertion file scanner (#151960) fix: publish acknowledged managed task receipts (#151590) fix(qa): preserve denial warnings during A2A finalization (#150556) fix(subagents): clear expired blocks after successful delivery (#151949) test: share fresh CLI output fixtures (#151954) refactor: reuse channel status preparation (#151906) fix(plugins): avoid duplicate initialization and mixed registrations (#151927) fix: updates fail for plugins selected from local load paths (#151851) fix(msteams): reactions target the current inbound message (#151382) fix(state): keep the meeting transcript migration result when stage cleanup fails (#151370) improve(gateway): reduce allocations when selecting sessions by store (#151940) fix: finish Crabbox wrapper cancellation cleanup (#151862) fix(discord): preserve text when replying to bot messages (#151821) perf(fleet): run registry operations in SQLite workers (#148290) fix: keep I/O responsive across busy agent databases (#151909) ...
…51677) * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290. * test(models): cover rejected catalog construction cleanup
* perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290. * fix(test): retain Telegram suite output on subprocess errors * fix(ci): require full compact proof for worker policy guards (openclaw#151427) Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change. * perf(gateway): materialize archived session rows on demand (openclaw#151574) * fix: avoid host-speed failures in catalog performance checks (openclaw#151732) Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects. * test(gateway): match catalog read budget to binding owner * test(codex): synchronize agent-end context scenarios Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup. * docs(state): reconcile Fleet and auth read contracts
…hread (#151829) * perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: #151588, #148290. * fix(test): retain Telegram suite output on subprocess errors * fix(ci): require full compact proof for worker policy guards (#151427) Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change. * refactor(state): move fixed-read snapshot tokens off the main thread * perf(gateway): materialize archived session rows on demand (#151574) * fix: avoid host-speed failures in catalog performance checks (#151732) Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects. * test(gateway): match catalog read budget to binding owner * test(codex): synchronize agent-end context scenarios Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup. * test(state): intercept asynchronous snapshot preparation in lifecycle controls * fix(sqlite): name scoped worker declaration return type
…52500) * perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: #151588, #148290. * fix(test): retain Telegram suite output on subprocess errors * fix(ci): require full compact proof for worker policy guards (#151427) Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change. * refactor(state): move fixed-read snapshot tokens off the main thread * perf(gateway): materialize archived session rows on demand (#151574) * fix: avoid host-speed failures in catalog performance checks (#151732) Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects. * test(gateway): match catalog read budget to binding owner * test(codex): synchronize agent-end context scenarios Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup. * test(state): intercept asynchronous snapshot preparation in lifecycle controls * fix(sqlite): name scoped worker declaration return type * fix(cron): offload read-only inspection outside native exclusions
* perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: #151588, #148290. * fix(test): retain Telegram suite output on subprocess errors * fix(ci): require full compact proof for worker policy guards (#151427) Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change. * refactor(state): move fixed-read snapshot tokens off the main thread * perf(gateway): materialize archived session rows on demand (#151574) * fix: avoid host-speed failures in catalog performance checks (#151732) Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects. * test(gateway): match catalog read budget to binding owner * test(codex): synchronize agent-end context scenarios Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup. * test(state): intercept asynchronous snapshot preparation in lifecycle controls * fix(state): bound and reuse fixed-read workers Reuse healthy Node execution workers while each read retains its source pins through native cleanup. Preserve Bun per-task retirement and the public pool contract with an internal owned-task boundary, exact-slot settlement, and aggregation of independent cleanup failures. Carry snapshot reader leases and existing-schema context from the token foundation. Capture and charge both retained path fields before queueing. Keep best-effort quarantine admission with its existing owner. Validated with 83 focused tests, the full changed-file gate, a normal build, independent P0-P2 review, and five ordinary compiled Node/Bun proof runs. * fix(tooling): complete extracted wrapper dependencies Include the worker pool completion, core, and owned-task modules in the existing PR wrapper component inventory so extracted wrappers reach their normal argument validation with a complete eager import closure. Carry the exact packaging fixture repair from canonical 5741b3c (#151967): copy the existing packed-openclaw-tarballs helper into the no-dependency harness. * fix(test): preserve complete Git test inventories beyond one MiB Carry the exact two-file repair from canonical fd0c00b (#151991). Use the bounded 16 MiB Git inventory capture and reject child-process errors even with status zero. Preserve working-tree/untracked tests and the existing filesystem fallback, with the canonical boundary controls. No unrelated main ancestry or runtime source changes are included. * fix(sqlite): name scoped worker declaration return type
…hread (openclaw#151829) * perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290. * fix(test): retain Telegram suite output on subprocess errors * fix(ci): require full compact proof for worker policy guards (openclaw#151427) Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change. * refactor(state): move fixed-read snapshot tokens off the main thread * perf(gateway): materialize archived session rows on demand (openclaw#151574) * fix: avoid host-speed failures in catalog performance checks (openclaw#151732) Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects. * test(gateway): match catalog read budget to binding owner * test(codex): synchronize agent-end context scenarios Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup. * test(state): intercept asynchronous snapshot preparation in lifecycle controls * fix(sqlite): name scoped worker declaration return type
…enclaw#152500) * perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290. * fix(test): retain Telegram suite output on subprocess errors * fix(ci): require full compact proof for worker policy guards (openclaw#151427) Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change. * refactor(state): move fixed-read snapshot tokens off the main thread * perf(gateway): materialize archived session rows on demand (openclaw#151574) * fix: avoid host-speed failures in catalog performance checks (openclaw#151732) Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects. * test(gateway): match catalog read budget to binding owner * test(codex): synchronize agent-end context scenarios Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup. * test(state): intercept asynchronous snapshot preparation in lifecycle controls * fix(sqlite): name scoped worker declaration return type * fix(cron): offload read-only inspection outside native exclusions
) * perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290. * fix(test): retain Telegram suite output on subprocess errors * fix(ci): require full compact proof for worker policy guards (openclaw#151427) Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites. Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged. Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change. * refactor(state): move fixed-read snapshot tokens off the main thread * perf(gateway): materialize archived session rows on demand (openclaw#151574) * fix: avoid host-speed failures in catalog performance checks (openclaw#151732) Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards. This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files. Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects. * test(gateway): match catalog read budget to binding owner * test(codex): synchronize agent-end context scenarios Own the fixture clock and wait for turn start and ten response progress events before selecting completion, cancellation, or refusal. Keep the five-second budget and require the expected terminal outcome. Restore real timers before cancelling and joining the run so a failed assertion cannot discard cleanup deadlines. Validation: 62 agent-end, deadline, and lifecycle tests; extension test types; scoped lint and format; independent P2 review. A temporary assertion failure also verified cancellation, unsubscribe, and joined cleanup. * test(state): intercept asynchronous snapshot preparation in lifecycle controls * fix(state): bound and reuse fixed-read workers Reuse healthy Node execution workers while each read retains its source pins through native cleanup. Preserve Bun per-task retirement and the public pool contract with an internal owned-task boundary, exact-slot settlement, and aggregation of independent cleanup failures. Carry snapshot reader leases and existing-schema context from the token foundation. Capture and charge both retained path fields before queueing. Keep best-effort quarantine admission with its existing owner. Validated with 83 focused tests, the full changed-file gate, a normal build, independent P0-P2 review, and five ordinary compiled Node/Bun proof runs. * fix(tooling): complete extracted wrapper dependencies Include the worker pool completion, core, and owned-task modules in the existing PR wrapper component inventory so extracted wrappers reach their normal argument validation with a complete eager import closure. Carry the exact packaging fixture repair from canonical e5772b6 (openclaw#151967): copy the existing packed-openclaw-tarballs helper into the no-dependency harness. * fix(test): preserve complete Git test inventories beyond one MiB Carry the exact two-file repair from canonical 78e1224 (openclaw#151991). Use the bounded 16 MiB Git inventory capture and reject child-process errors even with status zero. Preserve working-tree/untracked tests and the existing filesystem fallback, with the canonical boundary controls. No unrelated main ancestry or runtime source changes are included. * fix(sqlite): name scoped worker declaration return type
) * perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * refactor: move plugin blob storage into workers Move all eight asynchronous BlobStore methods onto the existing shared-state mutation and retained read owners. Preserve quotas, transactional accounting, read-source selection, and typed error and cleanup behavior. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: #151588, #148290. * fix(test): retain Telegram suite output on subprocess errors * test: align Blob worker CI inventories Include Diffs in the expected database-worker planner group while retaining exact coverage and duplicate checks. Carry the packaging fixture dependency from canonical main commit 5741b3c (PR #151967), whose one-line patch matches the original 8b58def. No production or build inputs change; compiled runtime and active-writer evidence retain their original commit bindings. * fix(state): clarify blob preparation callback contracts * test(plugins): load Diffs lifecycle fixture through public facade
…claw#151175) * perf(fleet): run registry operations in SQLite workers * fix(state): preserve readonly admission error context * test(gateway): retain catalog root failure diagnostics * fix: preserve uncertain lease outcomes before caller recovery * fix(state): reject retired read scopes and retain wrapper imports Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries. Include the retained-read eager dependencies in the canonical PR wrapper inventory. * test(state): require rejection of retired read scopes Update the three existing disposable-scope variants to expect the canonical admission error while preserving active and unrelated source assertions. * refactor: move plugin blob storage into workers Move all eight asynchronous BlobStore methods onto the existing shared-state mutation and retained read owners. Preserve quotas, transactional accounting, read-source selection, and typed error and cleanup behavior. * fix(state): keep ordinary reads in the SQLite worker Use the existing independent readonly worker for ordinary fixed reads while retaining cached writer custody. Validate captured file identity around opens and acceptance, and bind previously missing paths when their first file appears. Keep selected snapshots and native preparation scopes with their existing owners. * fix: catalog refresh fails when previous discovery finishes Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290. * fix(test): retain Telegram suite output on subprocess errors * test: align Blob worker CI inventories Include Diffs in the expected database-worker planner group while retaining exact coverage and duplicate checks. Carry the packaging fixture dependency from canonical main commit e5772b6 (PR openclaw#151967), whose one-line patch matches the original 8b58def. No production or build inputs change; compiled runtime and active-writer evidence retain their original commit bindings. * fix(state): clarify blob preparation callback contracts * test(plugins): load Diffs lifecycle fixture through public facade
Related: #144592
What Problem This Solves
Fleet registry reads, reservations, and operation leases perform SQLite work on their calling thread.
User Impact
Registry SQL runs in workers while preserving command output, atomic port allocation, and lease fencing. List and lookup stay noncreating and independent of Gateway writable lifecycle admission.
Ordinary fixed reads observe independently committed state while retaining a cached native writer. The custody pin exposes no database and does not query, back up, join, or end that writer's transaction. Reads avoid unrelated native cursors' older snapshots; physical identity is checked around reader open and result acceptance. A previously missing store can be read after external creation without resetting admission.
Managed runtimes retain canonical existing-schema admission across the worker boundary. Readers validate the existing runtime shape before querying; cached handles cannot escape their schema-admission scope.
Explicit snapshot selection remains authoritative. Artifact-preserving, canonical-mutation, and source-exclusion preparation retain their native owners and transaction refusal, including calling-thread snapshot token SQL. Those special preparation paths, generic native callbacks, and synchronous cleanup are outside the ordinary-read off-thread claim. Schema, retention, configuration, versions, and backup payloads are unchanged.
Why This Change Was Made
Mutations reuse the shared-state actor and synchronous transaction kernels. The original scope spans lease acquisition, currentness checks, renewal, archive-probe drainage, and exact-owner release. Container operations preserve inspected identities and restoration behavior; Fleet Doctor remains inspection-only.
Read custody retains selected snapshot/disposable sources through settlement. Closing scopes reject new reads instead of falling back to live state. Cleanup joins accepted workers, callbacks, and their tails; failed close keeps source files protected. Cancellation retains snapshot context and the caller's abort reason. Discovery preserves typed invalidation, and original read/schema errors remain primary when cleanup also fails. Existing dispatch, error, and native-section settlement contracts remain intact.
Evidence
Current head
2bafa19badds only a documentation union to qualified runtime sourcea000b6bf, preserving both Fleet and newly landed Auth text. That runtime source resolved the schema-policy integration and passed 83 tests across 12 schema-policy, fixed-reader, native-reader, writer, and lifecycle files; selected repository checks; fresh P0–P2 review; and a normal exact-head build. Four new controls failed on the unrepaired union; all five pass after the repair, including fresh/cached shape rejection, restricted cached-handle custody, expired scope rejection, and native admission before callback execution. The catalog performance test preserves canonical main’s foreground-work ownership.Node 24.21.0 and Bun 1.4.2 source-facade calls through the newly built worker passed cached/fresh ordinary reads with all six parent SQL counters at zero and missing-store noncreation. Source, artifacts, runtime, and driver postflights matched. This is source-facade/compiled-worker proof, not a fully compiled facade. Build metadata records actual committed HEAD
a000b6bfand tree6221756d; no build identity was rewritten.Predecessor
3752b3c2passed 42 archive/catalog/Fleet/Codex integration cases. Its complete canonical #151574 carry was proved to remove two transcript metadata reads per list in the existing fixture, preserving binding checks and zero worker/file/payload I/O. The Codex fixture now controls its clock, waits for ten processed responses, checks terminal outcomes, and joins cancellation cleanup. Its 5,000 ms budget is unchanged; 62 component tests and an assertion-failure cleanup control passed. These controls do not prove the historical CI cause. Unchanged Fleet operation kernels and callers retain their separately attributed 145-case qualification from0f3f48ff; changed read/admission owners were rechecked above.Predecessor
df51d4ffCI failed the catalog budget, Codex iteration-context test, and five Buzz cold-start cases. The Buzz timeouts remain unexplained. Unchanged local merge/main controls passed. One observation-only Linux Node 24.19 diagnostic passed all 39 files/1,184 tests, including all 15 Buzz cases, with no automatic retry and successful postflight/disposal. It used two-CPU affinity on an observed four-CPU/15.4 GiB host, and Buzz overlapped a different neighbor fixture. It was not an exact CI resource/interleaving reproduction and establishes neither a cause nor an unrelated/flaky classification. No Buzz runtime change is claimed. Exact-head CI passed 142 checks with 14 skips and a successful required gate. The maintainer disposition accepts the documented residual uncertainty, close-retry ownership contract, and compatibility evidence while retaining normal native landing gates.The unchanged Blob active-writer case passed on Linux Node 24.19.0 on Blob composition
0ac465c1, which includes predecessoradf9b6cc. It verifies committed visibility while a native writer holds uncommitted changes; this integration case makes no zero-host-SQL claim. Postflight, joined cleanup, and terminal lease disposal passed.Published-driver qualification of predecessor
adf9b6ccbuilt and packaged actualadf9b6ccon Linux, independently attested the published 2026.9.4 driver before updating, and matched all 10,043 installed application payload records to the frozen candidate. The update completed in 89.724 seconds with outcomesuccess, no recovery, and no follow-up repair. The private canary executed the synthetic plugin Doctor contract and runtime registration; fresh inspection loaded the retained plugin with unchanged source and enablement. Source postflight and verified archive capture preceded terminal lease disposal. The fixture's synthetic-auth Doctor advisory remained informational. This covers retained plugin update continuity; live providers and Fleet container operations are outside this cell.Predecessor
3991401aCI passed. The preceding Telegram Node-suite stall remains under investigation; the inherited #151675 diagnostic keeps child output without changing deadlines or pass/fail predicates. Historical evidence remains separately attributed: the6933527fFleet Docker run passed create, upgrade, backup/restore, health, and removal; it is not current-head container proof. Earlier CI exposed repaired upstream fixtures and an unexplained first-signin timeout, plus an unexplained memory timing failure. That updater preparation encountered a source-transfer timeout and a local Git-object lookup failure before application execution; a self-contained checkout and small source capsule resolved preparation. Original evidence is retained, and the first actual updater cell passed without an application-test retry.