Skip to content

refactor(logbook): run SQLite operations in owned workers - #144982

Merged
steipete merged 2 commits into
mainfrom
codex/sqlite-worker-logbook-final
Sep 11, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/sqlite-worker-logbook-final

Conversation

@steipete

@steipete steipete commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Related: #144592

What Problem This Solves

Logbook's awaitable store still executes SQLite on the application event loop. Database startup, lock contention, timeline queries and retention can stall Gateway work. Moving metadata reads to workers also requires preserving their relationship with frame files while capture and pruning continue.

Why This Change Was Made

Move Logbook's complete typed database operations, connection setup, schema handling, prepared statements, transactions, WAL maintenance and close into the shared bounded SQLite worker broker. Reuse fixed Kysely plans for repeated writes and reads.

A bounded queue for each canonical frame directory owns capture, preview, batch-image reading and pruning through completion. File payloads use asynchronous file I/O; metadata queries stay in the worker. This preserves valid multi-image analysis without imposing a new aggregate image limit. Service shutdown retains accepted operations before closing its worker client. Automatic keyframe selection now runs inside the existing card-replacement transaction, so retention cannot invalidate a selected frame between lookup and publication. Explicit caller-supplied keyframes retain their original atomic rollback behavior.

User Impact

SQLite work no longer blocks the application's event loop. Previews and analysis finish reading their frame files before retention removes them. Existing database placement, schema, retention policy, query order, file permissions and RPC payloads stay compatible.

Evidence

  • All 443 selected cases across 27 files passed, including broker/routing, Logbook lifecycle, frame/pruning races and read budgets.
  • Full selected changed checks and a full Logbook-selected build passed. Fresh independent Codex review through P2 was clean; current-main integration preserved the reviewed runtime changes and all supplied owner/dependency context byte-for-byte.
  • Source and emitted-JavaScript proofs exercised all 9 registered RPCs and all 23 store commands. Native instrumentation recorded zero parent-thread SQLite calls in four writer/reopen processes. Compiled proof used canonical emitted SDK/worker entries without TypeScript fallback.
  • Capture stop/drain, service restart and fresh-process reopen preserved the expected frames, card and standup. Source/artifact hashes remained unchanged; all created children joined and synthetic state was removed.
  • During a 753 ms SQLite write lock, the compiled application handled 125 timer ticks and 30 WebSocket pongs; event-loop p99 was 6.64 ms. Across 25 warm samples, read RPC median/p95 was 0.198/0.270 ms and write RPC was 0.444/0.675 ms. These describe the synthetic probe, not a comparative speedup.

The proof uses the registered plugin RPC boundary and a real WebSocket/SQLite harness; it does not claim full Gateway authentication, real screen capture or model inference. The existing canonical-path helper still uses synchronous filesystem metadata probes; SQLite execution and frame payload I/O are the migrated paths.

Release context: this plugin needs the new worker-capable host. The normal release workflow must publish its compatible host floor with that host; this PR does not publish a standalone plugin or change release versions.

Concurrent retention and card publication

The worker cutover exposed a gap between the service's frame-range read and its later card replacement: the broker could dispatch queued retention before the read continuation enqueued publication. The original registered service flow reproduced a foreign-key failure and errored batch; its unpruned control passed.

Commit 20082d0cf728d8e42a9b71426b4a43c03b0b0442 sends automatic keyframe selection through the existing typed replaceCardsInWindow operation. The worker applies the existing midpoint selector within the existing replacement transaction. Retention can run before selection or after committed publication, where the existing ON DELETE SET NULL relationship clears a removed preview. No schema, migration, retention/preview limit, host SDK, broker, configuration, or Bun behavior changes in this repair.

The following proof was run on ce0049d9 plus this six-file repair; all six source hashes match committed 20082d0c:

  • All 107 Logbook tests across ten files passed, including queued retention, already-pruned IDs with remaining-frame and empty-frame controls, and unchanged explicit-keyframe rollback. The two service cases passed again after fixture cleanup ownership was finalized.
  • The complete changed-file gate passed, including plugin types/tests, lint/format, Knip, selected native checks, and runtime import-cycle checks. Fresh independent Codex review through P2 returned zero actionable findings. The ordinary full build passed.
  • Sixteen stages passed across source and compiled layouts: queued retention, pruning before publication with no remaining frame, unpruned control, and original writer flow, each followed by a separate fresh-process reopen. These used registered Logbook callbacks, real loopback WebSockets, and real SQLite workers, with zero parent-thread SQLite calls. Publication completed with a durable card and no batch error; the unpruned control retained its keyframe.
  • Compiled proof rejected source/TypeScript loading. It used the real registered capture flow with synthetic node bytes and invoked the observed production retention callback with a temporary synthetic cutoff clock, restored when the prune command dispatched. This does not claim elapsed hourly scheduling, real screen capture/model inference, full Gateway authentication, or npm installation proof.
  • Both layouts handled 29 WebSocket pongs during approximately 752 ms of an independently held SQLite write lock. Compiled warm standup RPC median was 0.346 ms over 25 samples; these are local synthetic transport/scheduling observations, not SQL CPU timing or comparative benchmarks.

The initial combined proof's source stages passed; compiled preflight then exposed an incorrect external-fixture assumption about emitted module layout. Only that fixture was corrected to follow the actual inlined plugin and shared analyzer graph. Product sources and build outputs stayed unchanged. All owned proof jobs joined.

Previous CI on ce0049d9 does not cover this repair; final-head CI and native landing gates apply to the published 20082d0c head. Storage compatibility remains the existing database layout and schema with worker-owned execution; the repair adds no migration. The worker-capable host floor remains a release-workflow requirement, and this PR publishes no standalone plugin version.

@clawsweeper

clawsweeper Bot commented Sep 11, 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 scripts Repository scripts plugin: logbook Logbook automatic work journal plugin size: XL maintainer Maintainer-authored PR labels Sep 11, 2026
@steipete
steipete marked this pull request as ready for review September 11, 2026 14:35
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 6:40 PM ET / 22:40 UTC (Revision 3).

ClawSweeper review

What this changes

Logbook moves database operations into host-owned workers, coordinates screenshot reads with retention, and updates its SDK documentation and test routing.

Warning

SQLite table change

This PR modifies persisted SQLite tables in extensions/logbook/src/store-schema.ts, extensions/logbook/src/store.ts. Prefer a design that avoids changing persisted SQLite tables. Migration or upgrade compatibility proof is recorded, but maintainers should still confirm that the schema change is necessary.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR remains useful: current main still executes Logbook SQLite operations on the application thread. The prior keyframe-publication finding is resolved, and no blocking correctness finding remains.

Priority: P2
Reviewed head: 20082d0cf728d8e42a9b71426b4a43c03b0b0442

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent worker conversion with substantial boundary proof and the previous blocking race repaired.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The captured PR body records registered Logbook callbacks exercising real SQLite workers and loopback WebSockets in source and compiled layouts, with durable publication after retention, fresh-process reopen, zero parent-thread SQLite calls, and responsiveness under an injected write lock. This covers the changed storage boundary; real capture, model inference, and Gateway authentication are explicitly outside its claims.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured PR body records registered Logbook callbacks exercising real SQLite workers and loopback WebSockets in source and compiled layouts, with durable publication after retention, fresh-process reopen, zero parent-thread SQLite calls, and responsiveness under an injected write lock. This covers the changed storage boundary; real capture, model inference, and Gateway authentication are explicitly outside its claims.
Evidence reviewed 9 items Current main still needs the conversion: At the fetched main revision, LogbookStore.open constructs its database owner directly; its awaitable methods still execute synchronous SQLite queries on the caller's thread.
Prior finding resolved: The pinned repair removes service-side keyframe lookup and passes automatic selection into replaceCardsInWindow. The worker now reads candidates and inserts cards within the same synchronous transaction; explicit keyframe IDs retain their previous behavior.
Retention and persistence coverage: Reviewed tests cover queued retention during synthesis, durable reopen, previously pruned IDs with surviving-frame and empty-frame controls, explicit-ID rollback, aliased frame-directory admission, and draining reads before pruning or close.
Findings None None.
Security None None.

How this fits together

Logbook turns captured screenshots into observations, timeline cards, and daily summaries. Its storage layer coordinates screenshot files and SQLite metadata used by background analysis and dashboard requests.

flowchart TD
  A[Captures and dashboard requests] --> B[Logbook service]
  B --> C[Frame admission queue]
  C --> D[Screenshot files]
  B --> E[Host-owned SQLite worker]
  C --> E
  E --> F[Timeline database]
  E --> G[Cards and summaries]
Loading

Before merge

  • Resolve merge risk (P1) - This plugin cannot run against the latest released host's SQLite SDK. Shipping it independently with the existing minimum-host declaration would fail loading; the PR explicitly leaves host-floor alignment to the coordinated release workflow.
Agent review details

Security

None.

PR surface

Source +415, Tests +649, Docs +8, Config +5, Other -1. Total +1076 across 36 files.

View PR surface stats
Area Files Added Removed Net
Source 11 1208 793 +415
Tests 19 821 172 +649
Docs 2 9 1 +8
Config 1 5 0 +5
Generated 0 0 0 0
Other 3 3 4 -1
Total 36 2046 970 +1076

Review metrics

Metric Value Why it matters
Production versus test growth Production net +420 lines; test files net +648 lines The plugin/SDK growth supports typed worker operations and frame admission, with additional coverage for concurrency, persistence, and query budgets.
Public SDK surface 1 added export; 0 new configuration options The existing prepared-query implementation becomes a documented plugin contract without adding an operator setting.

Stored data model

Persistent data-model change detected: database schema: extensions/logbook/src/store-schema.ts, database schema: extensions/logbook/src/store.ts, serialized state: extensions/logbook/index.ts, serialized state: extensions/logbook/src/service.ts, serialized state: extensions/logbook/src/store.ts, unknown-data-model-change: extensions/logbook/index.ts, and 3 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: partial_overlap
Canonical: #144592
Summary: This PR implements the Logbook worker conversion within the broader asynchronous-storage program; it does not complete the umbrella's other owners.

Members:

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

Merge-risk options

Maintainer options:

  1. Retain coordinated host/plugin release (recommended)
    Accept the documented host dependency for this private bundled plugin and enforce the compatible host floor during normal release preparation.

Technical review

Best possible solution:

Keep database invariants inside the worker and ship Logbook with its compatible host and accurate minimum-host metadata.

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

Not applicable as a new bug report: this is a storage refactor. Current main's synchronous execution is source-verifiable, and the supplied evidence describes the prior race and its successful repair; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes: reusing the host broker and selecting keyframes inside the existing replacement transaction keeps the invariant with its database owner while preserving the stored format and RPC payloads.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded Logbook responsiveness and storage-lifecycle improvement without evidence of an urgent production outage.
  • merge-risk: 🚨 compatibility: Logbook now requires worker-capable host SDK exports absent from v2026.9.4, so plugin and host release compatibility must remain coupled.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The captured PR body records registered Logbook callbacks exercising real SQLite workers and loopback WebSockets in source and compiled layouts, with durable publication after retention, fresh-process reopen, zero parent-thread SQLite calls, and responsiveness under an injected write lock. This covers the changed storage boundary; real capture, model inference, and Gateway authentication are explicitly outside its claims.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured PR body records registered Logbook callbacks exercising real SQLite workers and loopback WebSockets in source and compiled layouts, with durable publication after retention, fresh-process reopen, zero parent-thread SQLite calls, and responsiveness under an injected write lock. This covers the changed storage boundary; real capture, model inference, and Gateway authentication are explicitly outside its claims.

Evidence

What I checked:

  • Current main still needs the conversion: At the fetched main revision, LogbookStore.open constructs its database owner directly; its awaitable methods still execute synchronous SQLite queries on the caller's thread. (extensions/logbook/src/store.ts:196, 07498821897f)
  • Prior finding resolved: The pinned repair removes service-side keyframe lookup and passes automatic selection into replaceCardsInWindow. The worker now reads candidates and inserts cards within the same synchronous transaction; explicit keyframe IDs retain their previous behavior. (extensions/logbook/src/store.worker.ts:493, 20082d0cf728)
  • Retention and persistence coverage: Reviewed tests cover queued retention during synthesis, durable reopen, previously pruned IDs with surviving-frame and empty-frame controls, explicit-ID rollback, aliased frame-directory admission, and draining reads before pruning or close. (extensions/logbook/src/service-lifecycle.test.ts:44, 20082d0cf728)
  • Recorded production-boundary proof: The supplied body snapshot, sourceRevision ac62050d8a34890a4738e0684f30092d9a90dec2d484c06ce3c4ab325e30d0a7, reports source and emitted-JavaScript runs through registered callbacks, real loopback WebSockets, and real SQLite workers. Sixteen repair stages retained durable cards without batch errors, reopened in fresh processes, and recorded zero parent-thread SQLite calls; both layouts answered 29 pongs during an approximately 752 ms write lock. The body binds the six repaired source hashes to the reviewed head and explicitly excludes real capture, model inference, and full Gateway authentication. (20082d0cf728)
  • Storage format preserved: The extracted schema retains version 1, existing tables and indexes, and the keyframe ON DELETE SET NULL relationship. Existing legacy migration, future-schema refusal, permissions, and rollback tests continue through the worker-backed store. (extensions/logbook/src/store-schema.ts:11, 20082d0cf728)
  • Release compatibility boundary: The latest release's SQLite SDK lacks the worker and prepared-query exports used by this branch. The package remains private, and the supplied PR body explicitly assigns the compatible host floor to the normal host/plugin release workflow rather than publishing a standalone plugin here. (src/plugin-sdk/sqlite-runtime.ts:1, 3a9d69db306c)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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-09-11T14:43:37.044Z sha 21b48abf0073f9ac59ce1dea218577600fb3932c :: blocked before merge. :: [P2] [P2] Keep keyframe selection atomic with card publication
  • reviewed 2026-09-11T15:16:49.679Z sha ce0049d :: blocked before merge. :: [P2] [P2] Keep keyframe selection atomic with card publication

@steipete
steipete force-pushed the codex/sqlite-worker-logbook-final branch from 21b48ab to ce0049d Compare September 11, 2026 15:09
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer disposition: retain the coordinated host/plugin release, as recommended in the current review. This bundled plugin is landing with the worker-capable host SDK on main; this PR does not publish it independently or authorize a release. The normal release workflow must align its minimum-host declaration before any standalone artifact publication. The existing PR release context records that requirement, so no speculative version change is needed in this refactor.

The stored format is unchanged: the extracted DDL is byte-identical to the pre-cutover definition, schema version remains 1, and the existing migration, future-schema refusal, permissions, rollback, and fresh-process reopen coverage runs through the worker-backed store. The final review confirms the keyframe-publication finding is resolved at 20082d0 and accepts the source/compiled RPC evidence. The remaining release dependency is accepted for this coordinated landing and stays with release preparation.

@steipete
steipete merged commit 8e7d9dd into main Sep 11, 2026
181 checks passed
@steipete
steipete deleted the codex/sqlite-worker-logbook-final branch September 11, 2026 23:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

* refactor(logbook): run SQLite operations in owned workers

* fix(logbook): select keyframes inside card publication
steipete added a commit that referenced this pull request Oct 15, 2026
Share Google SSE startup, OpenAI voice configuration preparation and MiniMax
request credentials. Reuse the SDK FIFO permit pool for Session Share and
return Logbook's committed standup receipt instead of rereading its write.
Remove repeated ONNX validation after the existing schema boundary and unused
response/header copies. Preserve public surfaces, auth, resource bounds,
snapshot limits, user-data durability and shutdown settlement. Phase E stays
untouched. Simplify ordinary Memory Core sync-error bookkeeping and remove
late-probe cache fencing and synthetic multi-process LanceDB startup retries.
Remove redundant Bonjour sentinel/cleanup/listener defenses while retaining
network-error handling and stop settlement.
Net production reduction: 217 lines;
test reduction: 204 lines.

Best-effort tradeoffs accepted:
- Active Memory's synthetic maximum-Date clock no longer bypasses caching;
  d649548 introduced the forced-clock fixture, not a human-use report.
- Voice Call's synthetic maximum-Date clock uses numeric expiry and always
  admits the cache entry before native Promise rejection cleanup;
  55d4456 introduced the forced-clock fixture, not a human-use report.
- Future mutation of an internal webhook response is not isolated by copies;
  #118754 records synthetic HTTP proof, and no current consumer mutates it.
- A publication racing compiled-cache reconciliation is picked up on the next
  lifecycle refresh; #110167 pins a synthetic lookup interleaving, not an incident.
- A later parallel standup may overwrite the stored day, while each caller gets
  its own committed receipt; #99930/#144982 add the self-reread without an incident.
- Deliberate mutation of Fal's internal image array during credential lookup may
  reach provider validation; migration 0f54ca2 already had a guarded caller.
- Future mutation of Comfy's internal GET headers is not isolated by extra copies;
  #167205 retained these copies, but the current consumers are read-only.
- An embedding probe finishing during adapter replacement can cache old
  availability for the existing 30-second TTL or until invalidation; #144252
  and related #135599/#141280 describe architecture/synthetic lifecycle proof,
  not a human incident. Provider authority and shutdown drainage stay intact.
- A competing LanceDB initializer exposing a table before its first readable
  version may fail startup and need the next invocation/restart. #105896's
  retry proof coordinates six processes; #105680 describes source inference,
  and its review explicitly notes that no actual failure log was supplied.
  Atomic existOk creation, schema/agent checks and user-data durability stay.
- Internal handled-sync failure calls no longer re-check a tracked-active flag;
  #133239 introduced the bookkeeping, but every production caller is already
  inside tracked sync. A future untracked internal caller records its advisory
  failure directly. Deferred work and real overlapping failure identity stay.
- Nonfinite ONNX logits still fail at the TypeBox IPC schema boundary; #153476
  redundantly scanned the same validated vector a second time. No malformed
  network/worker input is newly admitted.
- Bonjour's fixed-path existsSync no longer catches impossible filesystem
  exceptions; direct 989cfd1 cites no incident and Node already returns false.
  A throwing monkey-patch now fails startup visibly.
- Bonjour cleanup no longer repeats stopPromise's once-only bookkeeping;
  ddc2036 added the flag for smoke stabilization without a user incident.
  Failed startup cannot expose a stop handle; SDK unsubscribe is idempotent.
- Bonjour's fixed EventEmitter listeners no longer swallow attachment errors;
  direct 7389fc0 cites no incident, and pinned Ciao inherits ordinary on().
  A future dependency-contract violation follows existing startup cleanup.

Proof: targeted production/test types, syntax lint, formatting, zero runtime
and Madge cycles, SDK source boundaries, lint-suppressions and focused plugin
owner/sibling suites. Fresh independent review's sole ONNX finding is disproved
by actual parseWorkerReply rejecting NaN and both infinities, as the installed
TypeBox validator calls Number.isFinite. No accepted finding remains.

One kept Memory Core generation-lease case hits its unchanged five-second
embedding-start deadline on both candidate and unchanged task base 9e3e16c.
It bypasses changed outcome/probe bookkeeping. It is not claimed passing or
fixed. Typed-lint declaration preparation and full Active Memory suite startup
also exceeded unchanged deadlines. Broad build/check-changed and PR CI unrun.
Below-500 branch-only packet for bundling; Phase E remains untouched.
steipete added a commit that referenced this pull request Oct 15, 2026
* refactor(plugins): consolidate provider and feature paths

Share Google SSE startup, OpenAI voice configuration preparation and MiniMax
request credentials. Reuse the SDK FIFO permit pool for Session Share and
return Logbook's committed standup receipt instead of rereading its write.
Remove repeated ONNX validation after the existing schema boundary and unused
response/header copies. Preserve public surfaces, auth, resource bounds,
snapshot limits, user-data durability and shutdown settlement. Phase E stays
untouched. Simplify ordinary Memory Core sync-error bookkeeping and remove
late-probe cache fencing and synthetic multi-process LanceDB startup retries.
Remove redundant Bonjour sentinel/cleanup/listener defenses while retaining
network-error handling and stop settlement.
Net production reduction: 217 lines;
test reduction: 204 lines.

Best-effort tradeoffs accepted:
- Active Memory's synthetic maximum-Date clock no longer bypasses caching;
  d649548 introduced the forced-clock fixture, not a human-use report.
- Voice Call's synthetic maximum-Date clock uses numeric expiry and always
  admits the cache entry before native Promise rejection cleanup;
  55d4456 introduced the forced-clock fixture, not a human-use report.
- Future mutation of an internal webhook response is not isolated by copies;
  #118754 records synthetic HTTP proof, and no current consumer mutates it.
- A publication racing compiled-cache reconciliation is picked up on the next
  lifecycle refresh; #110167 pins a synthetic lookup interleaving, not an incident.
- A later parallel standup may overwrite the stored day, while each caller gets
  its own committed receipt; #99930/#144982 add the self-reread without an incident.
- Deliberate mutation of Fal's internal image array during credential lookup may
  reach provider validation; migration 0f54ca2 already had a guarded caller.
- Future mutation of Comfy's internal GET headers is not isolated by extra copies;
  #167205 retained these copies, but the current consumers are read-only.
- An embedding probe finishing during adapter replacement can cache old
  availability for the existing 30-second TTL or until invalidation; #144252
  and related #135599/#141280 describe architecture/synthetic lifecycle proof,
  not a human incident. Provider authority and shutdown drainage stay intact.
- A competing LanceDB initializer exposing a table before its first readable
  version may fail startup and need the next invocation/restart. #105896's
  retry proof coordinates six processes; #105680 describes source inference,
  and its review explicitly notes that no actual failure log was supplied.
  Atomic existOk creation, schema/agent checks and user-data durability stay.
- Internal handled-sync failure calls no longer re-check a tracked-active flag;
  #133239 introduced the bookkeeping, but every production caller is already
  inside tracked sync. A future untracked internal caller records its advisory
  failure directly. Deferred work and real overlapping failure identity stay.
- Nonfinite ONNX logits still fail at the TypeBox IPC schema boundary; #153476
  redundantly scanned the same validated vector a second time. No malformed
  network/worker input is newly admitted.
- Bonjour's fixed-path existsSync no longer catches impossible filesystem
  exceptions; direct 989cfd1 cites no incident and Node already returns false.
  A throwing monkey-patch now fails startup visibly.
- Bonjour cleanup no longer repeats stopPromise's once-only bookkeeping;
  ddc2036 added the flag for smoke stabilization without a user incident.
  Failed startup cannot expose a stop handle; SDK unsubscribe is idempotent.
- Bonjour's fixed EventEmitter listeners no longer swallow attachment errors;
  direct 7389fc0 cites no incident, and pinned Ciao inherits ordinary on().
  A future dependency-contract violation follows existing startup cleanup.

Proof: targeted production/test types, syntax lint, formatting, zero runtime
and Madge cycles, SDK source boundaries, lint-suppressions and focused plugin
owner/sibling suites. Fresh independent review's sole ONNX finding is disproved
by actual parseWorkerReply rejecting NaN and both infinities, as the installed
TypeBox validator calls Number.isFinite. No accepted finding remains.

One kept Memory Core generation-lease case hits its unchanged five-second
embedding-start deadline on both candidate and unchanged task base 9e3e16c.
It bypasses changed outcome/probe bookkeeping. It is not claimed passing or
fixed. Typed-lint declaration preparation and full Active Memory suite startup
also exceeded unchanged deadlines. Broad build/check-changed and PR CI unrun.
Below-500 branch-only packet for bundling; Phase E remains untouched.

* refactor(plugins): consolidate remaining feature and provider owners

Replace ACPX trust scanning with the existing TOML parser, consolidate Logbook operation dispatch, reuse SDK FIFO playback admission, and prepare wiki claims once. Remove repeated internal validation and redundant copies while retaining external validation, live authority, resource bounds, durability and Phase E. Shrink only the assertion allowances eliminated by these removals. The complete branch removes 750 net production lines. Accepted timing and internal-mutation tradeoffs, provenance, review decisions and proof are recorded in the PR body and requested local ledger.

* test(plugins): align checks with simplified owners
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…aw#173064)

* refactor(plugins): consolidate provider and feature paths

Share Google SSE startup, OpenAI voice configuration preparation and MiniMax
request credentials. Reuse the SDK FIFO permit pool for Session Share and
return Logbook's committed standup receipt instead of rereading its write.
Remove repeated ONNX validation after the existing schema boundary and unused
response/header copies. Preserve public surfaces, auth, resource bounds,
snapshot limits, user-data durability and shutdown settlement. Phase E stays
untouched. Simplify ordinary Memory Core sync-error bookkeeping and remove
late-probe cache fencing and synthetic multi-process LanceDB startup retries.
Remove redundant Bonjour sentinel/cleanup/listener defenses while retaining
network-error handling and stop settlement.
Net production reduction: 217 lines;
test reduction: 204 lines.

Best-effort tradeoffs accepted:
- Active Memory's synthetic maximum-Date clock no longer bypasses caching;
  1802f6b introduced the forced-clock fixture, not a human-use report.
- Voice Call's synthetic maximum-Date clock uses numeric expiry and always
  admits the cache entry before native Promise rejection cleanup;
  c7b888b introduced the forced-clock fixture, not a human-use report.
- Future mutation of an internal webhook response is not isolated by copies;
  openclaw#118754 records synthetic HTTP proof, and no current consumer mutates it.
- A publication racing compiled-cache reconciliation is picked up on the next
  lifecycle refresh; openclaw#110167 pins a synthetic lookup interleaving, not an incident.
- A later parallel standup may overwrite the stored day, while each caller gets
  its own committed receipt; openclaw#99930/openclaw#144982 add the self-reread without an incident.
- Deliberate mutation of Fal's internal image array during credential lookup may
  reach provider validation; migration d365cd8 already had a guarded caller.
- Future mutation of Comfy's internal GET headers is not isolated by extra copies;
  openclaw#167205 retained these copies, but the current consumers are read-only.
- An embedding probe finishing during adapter replacement can cache old
  availability for the existing 30-second TTL or until invalidation; openclaw#144252
  and related openclaw#135599/openclaw#141280 describe architecture/synthetic lifecycle proof,
  not a human incident. Provider authority and shutdown drainage stay intact.
- A competing LanceDB initializer exposing a table before its first readable
  version may fail startup and need the next invocation/restart. openclaw#105896's
  retry proof coordinates six processes; openclaw#105680 describes source inference,
  and its review explicitly notes that no actual failure log was supplied.
  Atomic existOk creation, schema/agent checks and user-data durability stay.
- Internal handled-sync failure calls no longer re-check a tracked-active flag;
  openclaw#133239 introduced the bookkeeping, but every production caller is already
  inside tracked sync. A future untracked internal caller records its advisory
  failure directly. Deferred work and real overlapping failure identity stay.
- Nonfinite ONNX logits still fail at the TypeBox IPC schema boundary; openclaw#153476
  redundantly scanned the same validated vector a second time. No malformed
  network/worker input is newly admitted.
- Bonjour's fixed-path existsSync no longer catches impossible filesystem
  exceptions; direct 1fa8665 cites no incident and Node already returns false.
  A throwing monkey-patch now fails startup visibly.
- Bonjour cleanup no longer repeats stopPromise's once-only bookkeeping;
  2ef6daa added the flag for smoke stabilization without a user incident.
  Failed startup cannot expose a stop handle; SDK unsubscribe is idempotent.
- Bonjour's fixed EventEmitter listeners no longer swallow attachment errors;
  direct 836f011 cites no incident, and pinned Ciao inherits ordinary on().
  A future dependency-contract violation follows existing startup cleanup.

Proof: targeted production/test types, syntax lint, formatting, zero runtime
and Madge cycles, SDK source boundaries, lint-suppressions and focused plugin
owner/sibling suites. Fresh independent review's sole ONNX finding is disproved
by actual parseWorkerReply rejecting NaN and both infinities, as the installed
TypeBox validator calls Number.isFinite. No accepted finding remains.

One kept Memory Core generation-lease case hits its unchanged five-second
embedding-start deadline on both candidate and unchanged task base d6898f3.
It bypasses changed outcome/probe bookkeeping. It is not claimed passing or
fixed. Typed-lint declaration preparation and full Active Memory suite startup
also exceeded unchanged deadlines. Broad build/check-changed and PR CI unrun.
Below-500 branch-only packet for bundling; Phase E remains untouched.

* refactor(plugins): consolidate remaining feature and provider owners

Replace ACPX trust scanning with the existing TOML parser, consolidate Logbook operation dispatch, reuse SDK FIFO playback admission, and prepare wiki claims once. Remove repeated internal validation and redundant copies while retaining external validation, live authority, resource bounds, durability and Phase E. Shrink only the assertion allowances eliminated by these removals. The complete branch removes 750 net production lines. Accepted timing and internal-mutation tradeoffs, provenance, review decisions and proof are recorded in the PR body and requested local ledger.

* test(plugins): align checks with simplified owners
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 maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: logbook Logbook automatic work journal plugin proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant