Skip to content

fix(memory): migrate embedding cache in bounded batches and record oversized rows - #164303

Merged
steipete merged 1 commit into
mainfrom
upd/upd-memory-embedding-migration-udf-crash
Oct 3, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-memory-embedding-migration-udf-crash

Conversation

@steipete

@steipete steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes Doctor failures during updates when a legacy embedding cache contains oversized JSON values. Reported by @raman hero in Discord #9.5->9.7 on October 2, updating 2026.9.5 → 2026.9.7 with a 5.4 GiB agent database and roughly 3 GiB embedding cache. The child died with an unknown exit code and a native SQLite UDF/string-allocation stack.

User Impact

Doctor skips malformed or oversized rebuildable cache entries and reports their count and first eight rowids as recoverable warnings. Valid cached vectors retain their identities, provider metadata, and age. Source text and other canonical data are preserved; skipped cache entries regenerate on demand.

Why This Change Was Made

The existing per-row conversion prevents whole-statement retention but still lets SQLite pass unbounded TEXT into a JavaScript UDF. The storage migration now reads 128-row windows by rowid, checks a 1 MiB byte cap inside SQLite, parses only bounded values in JavaScript, and writes each converted vector while keeping other fields inside SQLite. The byte check covers multibyte text and embedded NULs.

The agent schema owner carries skip diagnostics into Doctor's existing recoverable-warning receipts, which feed warning lines and update step details. Each window starts after the preceding rowid; a completed conversion is a no-op on rerun. The existing enclosing transaction still rolls an interrupted schema migration back. No schema-version, configuration, dependency, or Doctor heap-flag changes.

Fresh, package, and git-update Doctor launches inherit NODE_OPTIONS; none adds a Doctor heap limit. The git build's separate heap setting does not apply to Doctor.

Evidence

Local macOS / Node 26.10.0, isolated synthetic SQLite fixtures; TEXT was constructed inside SQLite rather than materialized in JavaScript:

Current pre-fix migration, one 134217731-byte JSON embedding, --max-old-space-size=96:
{"status":null,"signal":"SIGABRT"}
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
... node::sqlite::UserDefinedFunction::xFunc
... node::sqlite::StatementSync::Run

Tagged 2026.9.7 migration, 3000 rows / 182613000 bytes, --max-old-space-size=96:
{"status":null,"signal":"SIGABRT"}
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
... v8::String::NewFromOneByte
... node::sqlite::UserDefinedFunction::xFunc
... node::sqlite::DatabaseSync::Exec

Fixed migration: 134217731-byte fixture under 96 MiB; 536870915-byte fixture at default heap:
{"status":0,"signal":null}
Warning: Skipped 1 memory_embedding_cache rows with invalid embeddings or embeddings larger than 1048576 bytes (first rowids: 1). These cache entries will be rebuilt on demand.

On this Node build, the pre-fix 536,870,915-byte fixture exited successfully without a skip diagnostic; the 96 MiB fixtures above produced the native aborts.

Both new regressions failed on the original code because the expected skip diagnostics were absent. They cover three rowid windows with 64-bit identities, valid vector preservation, oversized/malformed row removal, no-op rerun, and successful schema-21 Doctor migration with recoverable warnings. The existing 3000-cache/3000-chunk-vector regression under a 96 MiB heap is retained.

Touched suites passed three times on the final implementation using the repository's Vitest wrapper with --maxWorkers=1 (36 tests per pass):

Suite Tests Test time, passes 1 / 2 / 3 Vitest wall time, passes 1 / 2 / 3
memory-schema-storage-migration.test.ts 22 1.94 / 2.77 / 2.07 s 3.13 / 3.74 / 3.74 s
state-migrations.media-persistence.test.ts 14 43.02 / 28.12 / 22.00 s 107.57 / 49.86 / 39.12 s

The added cache regression took 82–119 ms; the added Doctor regression took 2.54–5.35 s. The Doctor suite exercises real schema, transcript, and archive migrations; its slowest wall-clock pass also included roughly 61 s of shared compiler preparation on the loaded host.

node scripts/check-changed.mjs passed, including core and all 27 test type graphs, lint, dependency and database guards, dead-export scans, and runtime import-cycle checks. Codex P1 review completed with no accepted P0/P1 findings.

Importer coverage used the original selected order: all 875 files are accounted for, with no missing, extra, or duplicate paths across continuations. The 872 ordinary files recorded 12,054 passing, 38 skipped, and five failing cases. Three live files collected successfully with provider opt-ins absent; their 23 tests were skipped, so this is import/collection evidence, not live-provider proof.

The broad importer run is not all green. Five unchanged suites failed:

Suite / case Outcome
server.sessions.fixture-lifecycle.test.ts — retained state after required close failure 90.192 s managed-child timeout during cold preparation
backup-create.test.ts — private agent DB=true 120.035 s timeout; fixture cleanup blocked in filesystem I/O
session-accessor.sqlite-byte-size.test.ts — active context 0.301 s opcode-shape assertion
doctor-heartbeat-task-migration.test.ts — supplied environment timing/cleanup 3.039 s; consumed ambient timing; finer lookup/overwrite cause unresolved
loader.capability-factory.test.ts — retirement with prior success=true 0.024 s; returned provider bypasses retirement binding

Source tracing places these outside the changed embedding conversion; no independently executed main baseline is claimed. No failing importer timeout, retry, skip, or assertion was changed. Ordinary totals combine finalized config summaries (8,767 passed / 33 skipped / four failed) with observed infra cases (3,287 passed / five skipped / one failed). That infra invocation has no final summary: native shutdown exited 130 with indeterminate completion and retained its resources. Later invocations used fresh owned storage and only previously unrun paths.

Importer failure diagnostics

The unchanged src/gateway/server.sessions.fixture-lifecycle.test.ts case “retains fixture state and fences successors after a required Gateway close failure” hit its existing 90-second managed-child deadline (90.192 s). Retained artifacts show cold Gateway setup/native-worker preparation continuing at about 83 s, with 1,829 fresh tsx cache entries. The probe had not created its session directory, ownership markers, journal, or report, so its intended close-failure assertions were not reached. The nested fixture does not pass the existing prepared-worker handoff. This is source/artifact attribution, not a baseline replay.

The failed fixture also retained an unreleased resource claim and reported indeterminate process-tree cleanup. Its namespace and compiled cache generation were preserved. Remaining, previously unrun files continued in a fresh owned namespace through the existing runner.

Additional importer failure: src/infra/backup-create.test.ts, “backupCreateCommand: private agent DB=true,” timed out at its existing 120-second deadline (120.035 s); the false sibling passed in 1.744 s. The private case creates a minimal schema-1 database without memory tables and follows ownership checks, not the changed embedding migration. Retained artifacts show fixture removal had deleted the database and almost all contents, while directory enumeration of the remaining synthetic plugin subtree blocked in filesystem I/O. This supports a cleanup stall on this host; it is not a baseline replay or proof that the expected rejection assertion passed. The worker acknowledged stop and entered process exit, but termination timed out. Its resources remain preserved. No timeout, assertion, or skip was changed.

The infrastructure invocation was cancelled through the runner's normal signal path after all other workers finished and only the exiting backup worker remained. Native cleanup exited 130 and retained its namespace and compiled generation with processTreeState: indeterminate. Its infrastructure section records 3,287 passing cases, five skipped, and one failed across 201 files, but has no final summary; these are observed case results, not a passing config. The preceding gateway-methods section passed one file and four tests. Previously unrun files continued in a separate owned namespace without reusing the retained resources.

Additional importer assertion: src/config/sessions/session-accessor.sqlite-byte-size.test.ts, “sizes active context without reading transcript overflow payloads,” failed in 301 ms (expected false to be true); all nine sibling reader cases passed. The assertion requires every compiled event_json column-read opcode in sizing queries to carry SQLite's byte-length-only flag. The active-context header query also filters event type through a navigation expression with a conditional full-JSON fallback, which explains an unflagged payload opcode. This assertion inspects compiled branches and does not itself demonstrate an overflow-page read for the fixture. The fresh/current-schema fixture skips the changed embedding migration. This is source-based attribution to the existing query/assertion path, not an independently executed main baseline; the failure is retained without changing the assertion.

Additional importer assertion: src/commands/doctor-heartbeat-task-migration.test.ts, “uses the supplied environment for legacy session timing and cleanup,” failed in 3.039 s. It expected anchor 2000001800000 and received 2000003000000, exactly the separately seeded ambient session's timing. Both the fixture and migration use fixed nowMs = 2000000000000, ruling out elapsed wall time. Source forwards the supplied environment and explicit store path, so the finer lookup/overwrite cause remains unresolved. The fresh/current-schema fixture does not invoke the changed memory-storage conversion. This failure is recorded without a baseline replay, timeout change, or assertion weakening.

Additional importer assertion: src/plugins/loader.capability-factory.test.ts, “owns failed catalog initialization without revoking an earlier success (prior success: true),” failed in 24 ms because a retained provider method did not throw after cache retirement. Source tracing shows catalog initialization does not mark its exported function as a factory, so its returned ordinary provider object bypasses instance binding; retirement quiesces the instance but does not fence that plain method. The fixture disables memory and does not invoke database migration. This is source attribution to the existing plugin instance/catalog owner, not a baseline replay; the assertion remains unchanged.

Unchanged slow tests and preparation cost

Single cases over 30 seconds and files over 120 seconds of summed reported case time are recorded below under the standing pre-existing-suite waiver. Timings are local; hosted CI time is not yet measured.

Test/file Test time
src/gateway/server.sessions.list-store-materialization.test.ts — retains titles/previews beyond the handle cap 98.04 s
src/gateway/server-close.agent-databases.test.ts — joins scheduled plugin work before closing stores 52.91 s
src/gateway/server-methods/chat.reset-visible-yield.test.ts — preserves the held descendant's reset outcome 45.26 s
src/commands/doctor-session-canonical-keys.scale.test.ts — repairs deep owner aliases 45.22 s
src/gateway/server.chat.gateway-server-chat-b.test.ts — 80 cases, summed test time 290.61 s
src/flows/doctor-health.fleet-preflight.test.ts — reuses the admitted original capture and refuses changed evidence 40.57 s
src/infra/state-migrations.caller-mode.refusal.test.ts — leaves Doctor-only discovery out of automatic execution 30.38 s
src/agents/main-session-recovery/main-session-restart-recovery.test.ts — summed case time 241.82 s
src/flows/doctor-health.test.ts — summed case time 238.14 s
src/auto-reply/reply/session.test.ts — summed case time 165.45 s
src/infra/backup-create.test.ts — summed case time, including the failed 120.035-second case above 159.18 s
src/infra/state-migrations.test.ts — summed case time 157.87 s
src/config/sessions/session-accessor.test.ts — summed case time 145.36 s
src/cli/doctor-output.process.test.ts — retained custom-agent preview/repair 40.91 s
src/cli/doctor-output.process.test.ts — deferred Doctor-only state convergence 32.23 s
src/commands/doctor-config-preflight.process.test.ts — v17 additive-schema repair 31.19 s
src/commands/doctor-session-sqlite.deferred-plugin.test.ts — summed case time 125.74 s
test/e2e/qa-lab/runtime/codex-auth-product-proof.e2e.test.ts — mixed legacy-auth repair 65.90 s
src/commands/doctor.auth-profile-consumers.e2e.test.ts — unoccupied destination / occupied destination / interactive Doctor 42.38 / 37.55 / 35.92 s
test/e2e/qa-lab/runtime/gateway-codex-refusal-product-proof.e2e.test.ts — misalignment / retryable / bio cases 38.09 / 31.64 / 31.22 s
test/oauth-refresh-authority-chain.e2e.test.ts — pending peer/shared rotation 31.29 s
src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts — summed case time 137.76 s
test/e2e/qa-lab/runtime/gateway-codex-refusal-product-proof.e2e.test.ts — summed case time 129.72 s

The first importer invocation's shared tsdown build took 20m54.6s, built 96 plugins, and passed the CLI bootstrap and 53 built Doctor/plugin closure checks. This was preparation cost, separate from test time.

Change size: production +102/−20 lines; tests +76/−1; documentation +7/−1 (total +185/−22, six files).

@clawsweeper

clawsweeper Bot commented Oct 3, 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 size: S labels Oct 3, 2026
@steipete
steipete marked this pull request as ready for review October 3, 2026 12:42
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 8:47 AM ET / 12:47 UTC.

ClawSweeper review

What this changes

The PR converts legacy memory embedding caches in bounded windows, skips oversized or malformed vectors, and reports those skips as recoverable Doctor warnings.

Warning

SQLite table change

This PR modifies persisted SQLite tables in packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts, src/state/openclaw-agent-db-schema.ts. Prefer a design that avoids changing persisted SQLite tables. If the change is necessary, verify migration and upgrade compatibility against an existing database before merge.

Merge readiness

⛔ Blocked before merge - 3 items remain

The patch remains useful: current main still passes unbounded cache text into a JavaScript SQLite function. No blocking code defect was found, but the required published-updater compatibility run remains unproven.

Priority: P1
Reviewed head: 15c31ca6d80cc4500dec26abd33f5871a0473f6d

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch and native migration traces are convincing, while required update-boundary compatibility evidence remains incomplete.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): Matching captured-body terminal traces exercise the production cache migration with real native SQLite on macOS / Node 26.10.0 and show oversized fixtures completing with skip warnings after pre-fix aborts. Schema-21, identity preservation, rollback, and rerun coverage supplement that proof; published-driver upgrade compatibility remains independently incomplete.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Matching captured-body terminal traces exercise the production cache migration with real native SQLite on macOS / Node 26.10.0 and show oversized fixtures completing with skip warnings after pre-fix aborts. Schema-21, identity preservation, rollback, and rerun coverage supplement that proof; published-driver upgrade compatibility remains independently incomplete.
Evidence reviewed 9 items Pinned introduction: Reviewed the complete six-file merge-base-to-head delta. The introduced changes concern cache conversion, schema warning propagation, regression coverage, and documentation.
Bounded native conversion: SQLite checks embedding byte length before returning text to JavaScript; iteration uses 128-row windows and bigint rowids. Valid rows retain provider identity, dimensions, and timestamps inside SQLite.
Transaction and warning ownership: The agent schema owner collects warnings during conversion and publishes them after its schema transaction succeeds. Doctor combines them with archive warnings and counts them as recoverable.
Findings None None.
Security None None.

How this fits together

Memory storage keeps reusable embedding vectors in each agent’s SQLite database. During upgrades, Doctor converts legacy vectors and reports migration outcomes to the updater.

flowchart TD
  A[Legacy agent database] --> B[Doctor migration]
  B --> C[Bounded cache windows]
  C --> D{Valid bounded vector}
  D -->|Yes| E[Preserved binary cache row]
  D -->|No| F[Recoverable skip warning]
  E --> G[Schema commit]
  F --> H[Doctor and update results]
Loading

Before merge

  • Resolve merge risk (P2) - A published updater has not been shown completing candidate validation with oversized legacy cache rows and preserving the new recoverable warnings; direct migration success does not settle that upgrade boundary.
  • Complete next step (P2) - Provide redacted evidence of a published updater completing an update to this candidate with oversized legacy cache rows and recoverable Doctor warnings.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +82, Tests +75, Docs +6. Total +163 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 102 20 +82
Tests 2 76 1 +75
Docs 1 7 1 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 185 22 +163

Review metrics

Metric Value Why it matters
Migration bounds 128 rows per window; 1 MiB per embedding; 8 diagnostic rowids These fixed bounds prevent oversized cache text from entering JavaScript and keep warning output bounded.
Production and test growth production +102/−20; tests +76/−1 Production growth is explained by bounded conversion and end-to-end warning propagation.

Stored data model

Persistent data-model change detected: migration/backfill/repair: packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts, unknown-data-model-change: packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts, unknown-data-model-change: src/state/openclaw-agent-db-schema.ts, vector/embedding metadata: packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the published update path (recommended)
    Record a published updater completing an update to the candidate against isolated legacy state containing oversized cache rows, including recoverable warning handling.

Technical review

Best possible solution:

Keep the bounded conversion in the existing migration owner and establish published-updater compatibility before landing.

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

Yes: source identifies unbounded legacy cache TEXT crossing the native UDF boundary, and the supplied before-fix traces show heap-limit aborts. This reviewer did not execute a reproduction.

Is this the best way to solve the issue?

Yes: bounding text inside SQLite and reporting skipped derived rows through the existing schema and Doctor owners is a focused repair; upgrade-path verification remains necessary.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P1: The repair addresses native Doctor failures preventing existing installations from completing updates.
  • add merge-risk: 🚨 compatibility: This changes legacy cache migration and update warning outcomes, with the required published-driver compatibility evidence still missing.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Matching captured-body terminal traces exercise the production cache migration with real native SQLite on macOS / Node 26.10.0 and show oversized fixtures completing with skip warnings after pre-fix aborts. Schema-21, identity preservation, rollback, and rerun coverage supplement that proof; published-driver upgrade compatibility remains independently incomplete.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Matching captured-body terminal traces exercise the production cache migration with real native SQLite on macOS / Node 26.10.0 and show oversized fixtures completing with skip warnings after pre-fix aborts. Schema-21, identity preservation, rollback, and rerun coverage supplement that proof; published-driver upgrade compatibility remains independently incomplete.

Label justifications:

  • P1: The repair addresses native Doctor failures preventing existing installations from completing updates.
  • merge-risk: 🚨 compatibility: This changes legacy cache migration and update warning outcomes, with the required published-driver compatibility evidence still missing.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Matching captured-body terminal traces exercise the production cache migration with real native SQLite on macOS / Node 26.10.0 and show oversized fixtures completing with skip warnings after pre-fix aborts. Schema-21, identity preservation, rollback, and rerun coverage supplement that proof; published-driver upgrade compatibility remains independently incomplete.
  • proof: sufficient: Contributor real behavior proof is sufficient. Matching captured-body terminal traces exercise the production cache migration with real native SQLite on macOS / Node 26.10.0 and show oversized fixtures completing with skip warnings after pre-fix aborts. Schema-21, identity preservation, rollback, and rerun coverage supplement that proof; published-driver upgrade compatibility remains independently incomplete.

Evidence

What I checked:

  • Pinned introduction: Reviewed the complete six-file merge-base-to-head delta. The introduced changes concern cache conversion, schema warning propagation, regression coverage, and documentation. (15c31ca6d80c)
  • Bounded native conversion: SQLite checks embedding byte length before returning text to JavaScript; iteration uses 128-row windows and bigint rowids. Valid rows retain provider identity, dimensions, and timestamps inside SQLite. (packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts:277, 15c31ca6d80c)
  • Transaction and warning ownership: The agent schema owner collects warnings during conversion and publishes them after its schema transaction succeeds. Doctor combines them with archive warnings and counts them as recoverable. (src/state/openclaw-agent-db-schema.ts:494, 15c31ca6d80c)
  • Existing-state regression coverage: Read both complete touched suites. Coverage checks three cache windows, signed 64-bit rowids, valid-vector preservation, skipped rows, rollback, no-op reruns, and schema-21 migration with recoverable Doctor warnings. The body reports both new regressions failed before the fix and 36 tests passed three times afterward; this reviewer did not execute tests. (src/infra/state-migrations.media-persistence.test.ts:40, 15c31ca6d80c)
  • After-fix native evidence and complete body: The full 13,936-unit body was inspected and its SHA-256 matched the captured snapshot fc0167f6f319547ada17da05666b10bfcbf58e21a54095ec8580d5e72cfa1398. It records native SQLite/V8 aborts before the fix and successful fixed migration of 134,217,731-byte and 536,870,915-byte SQLite fixtures with observable skip warnings on macOS / Node 26.10.0. It also explicitly records five broad importer failures without claiming a passing main baseline. (15c31ca6d80c)
  • Current main still needs this repair: The current-main comparison shows the old per-row UDF conversion remains; the bounded text projection and skip diagnostics are unique to this branch. Local latest-release blob inspection was unavailable, so no release inclusion is claimed. (packages/memory-host-sdk/src/host/memory-schema-storage-migration.ts, e6ec522a023d)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted published-updater × candidate transcript showing successful legacy-state migration and recoverable warning handling.

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.

@steipete
steipete merged commit fabc10f into main Oct 3, 2026
183 of 236 checks passed
@steipete
steipete deleted the upd/upd-memory-embedding-migration-udf-crash branch October 3, 2026 13:00
vincentkoc added a commit that referenced this pull request Oct 3, 2026
* origin/main:
  fix(test): restore fixture state and await async completion (#164222)
  refactor(sessions): stage and settle pending inputs in workers (#164284)
  fix: speech-only replies fail when models include reasoning (#164285)
  fix(nextcloud-talk): avoid webhook migration for unconfigured channels
  fix: guide background skill reviews through Workshop proposals (#164292)
  test(build): reject AI dependencies in retained config repairs
  refactor(channels): require canonical private-network settings (#163535)
  fix(memory): migrate embedding cache in bounded batches and record oversized rows (#164303)
  feat(state): incognito actor memory and Codex history routing (P5c, inactive) (#164224)
  refactor(synology-chat): remove unused route account ID (#164280)
  test(ui): await web push preference publications (#164295)
  perf(scripts): avoid compiler projects for runtime import parsing (#164243)
  fix(worktrees): create workspaces from nested Windows repositories (#164249)
  test(agents,channels,cli): remove low-value tests (batch d173) (#164302)
  perf(workboard): serve cards per board revision and push changes instead of polling (#164301)
  refactor(sqlite): deslop sqlite stores (#164271)
  chore(ui): refresh control ui locales (#164299)
  refactor(events): deslop listener and disposal plumbing (#164221)
  fix: canonicalize fresh worker reasoning signatures (#164287)
RomneyDa pushed a commit that referenced this pull request Oct 3, 2026
…ersized rows (#164303)

The validating Doctor inside openclaw update died natively (SIGABRT, Reached heap limit, v8::String::NewFromOneByte <- node:sqlite UserDefinedFunction::xFunc <- DatabaseSync::Exec) while migrating a multi-GiB memory_embedding_cache: node:sqlite materializes each TEXT embedding as a JS string before the UDF runs, so one oversized row or a large table killed the child with no exit code and the update failed with no reason. The memory-storage migration now guards embedding size inside SQL (rows over 1 MiB never reach JS), reads 128-row windows, parses in JS, records skipped rows as recoverable Doctor warnings (count + first rowids), and stays idempotent on rerun. No schema version or table change; no heap flag. Reported on Discord (#9.5->9.7, raman hero).

(cherry picked from commit fabc10f)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…ersized rows (openclaw#164303)

The validating Doctor inside openclaw update died natively (SIGABRT, Reached heap limit, v8::String::NewFromOneByte <- node:sqlite UserDefinedFunction::xFunc <- DatabaseSync::Exec) while migrating a multi-GiB memory_embedding_cache: node:sqlite materializes each TEXT embedding as a JS string before the UDF runs, so one oversized row or a large table killed the child with no exit code and the update failed with no reason. The memory-storage migration now guards embedding size inside SQL (rows over 1 MiB never reach JS), reads 128-row windows, parses in JS, records skipped rows as recoverable Doctor warnings (count + first rowids), and stays idempotent on rerun. No schema version or table change; no heap flag. Reported on Discord (openclaw#9.5->9.7, raman hero).
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant