Skip to content

fix(memory): avoid redundant repairs and heavyweight read imports - #186483

Merged
vincentkoc merged 7 commits into
mainfrom
fix/worker-memory-footprint-20261028
Oct 28, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
fix/worker-memory-footprint-20261028

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Memory search and index reads load provider discovery and writable database infrastructure even though they only need pure format and read helpers. Request-owned search managers also repeat provenance and FTS repair on every read: a compiled diagnostic captured 100 repair transactions across 100 unchanged warm searches.

User Impact

Removes unnecessary runtime dependencies from memory read workers and reuses completed index repair while the existing schema admission and scoped write receipt remain current. Tracked writes, changed options, failed repair, and revoked requests retain their existing repair/authority paths. No new configuration, cache, worker, schema version, or operator action. The original import-only candidate reduced worker heap but failed the warm process-CPU p95 gate; the new repair candidate passes the same five-pair compiled qualification, with the remaining limits below.

Why This Change Was Made

Reuse the existing private memory host SDK seams for the same helper functions. This removes the provider-loader path from embedding format checks and the writable-store path from read-only queries. All three reindex callers use the same pure helper export; origin and forget reads retain their existing read-only owners.

The repair receipt is one field on the existing option-keyed schema admission; it adds no registry or independently managed cache. The SQLite receipt owner predicts the schema generation published by native COMMIT, including caught savepoint rollback. Existing schema-owner state and plain types move to leaf modules to avoid dependency cycles; state is not duplicated. The worker records successful repair only after commit, using its captured receipt rather than certifying a later writer's generation.

Production delta: +86 lines in total (+6 for import boundaries, +23 for the SQLite receipt prerequisite, +57 for completed-repair reuse); tests: +259; existing benchmark helpers: +71. Positive production growth implements the existing commit-receipt and worker-repair ownership boundary. The per-read BEGIN, provenance backfill, and FTS reconciliation path is skipped only when its completed work is still current.

Evidence

  • Independent source review and fresh autoreview: clean, no actionable findings. The final review includes the SQLite receipt prerequisite and successful-repair publication boundary.

  • Native commit hooks, targeted formatting, private-data scan, and git diff --check: passed.

  • Exploratory source import census: 2,110 reachable local modules before, 524 after. Writable store, agent execution owner, and plugin loader paths are absent after the change. This excludes external packages and bundler chunk behavior; it is not an RSS measurement.

  • Expanded the existing retrieval import regression to reject provider and writable-store facades and cover index, reindex-state, origin, and forget reads.

  • Focused native validation: all 4 files / 73 tests passed on runtime-change commit dc0ed34889d4ca73f1536299c0f947ae7ea7a1a9: retrieval imports, index reads, reindex state, and search worker behavior. Later commits add benchmark coverage, a benchmark lint fix, and one test-isolation annotation; the runtime change is unchanged.

  • The original baseline and import-only candidate packaged builds passed under Node 26.12.1. Their five-pair campaign is historical evidence; its failed gate is preserved below. The new candidate packaged build and five-pair campaign passed. The owned Testbox request queued and was stopped; validation continued through PR CI and the native review checkout's successful frozen dependency install. Cancelled validation allocation.

  • New repair validation: 82 focused tests passed across write receipts, native schema facts, scoped writes, memory schema admission and publication admission. Coverage includes successful COMMIT, outer/savepoint rollback, TEMP schema, tracked sibling writes/imports, option changes, failed FTS repair and request revocation.

  • New repair static checks: zero import cycles; scoped core and plugin lint, formatting and hooks passed. Public plugin SDK subpaths remain 160; the new helpers use an existing private seam.

Performance acceptance rule (before scored runs)

Use Node 26.12 or newer; the native worker harness needs the per-isolate allocation counter. Compare exact baseline b61ab6deb40cc640aec077b6e6a7b93a44b5422c and the selected compiled candidate using compiled workers and an isolated Gateway. Reuse committed worker-memory and real memory.search workloads, fixed synthetic inputs, the same runtime and host, with at least five interleaved baseline/candidate samples. Keep cold initialization and warm search results separate; record host load, loaded-module counts, worker retained heap, total process RSS, CPU, and latency median/p95 with spread. Require correct search results and reduced unnecessary module loading plus a measurable memory gain without worsening user-facing metrics; a 20% regression in any metric stops landing. Source-only counts and instrumented historical heap samples do not satisfy this gate.

The original scored campaign is complete for compiled candidate 3fdc54fcb109683949d19a723f59646d2755f972. Its warm process-CPU p95 exceeds the 20% regression threshold, so it remains a historical HOLD. Diagnostic profiling is complete and motivated the additional repair change; it does not replace scored results or waive the gate. New runtime candidate f3f8c553646a1f9f08af722b58d32e39204f3dc6 passes its packaged build and five-pair scored campaign under that unchanged rule.

For the new campaign, both helper files come from f3f8c553646a1f9f08af722b58d32e39204f3dc6; its runtime is compared with the same frozen baseline and unchanged acceptance rule.

The owned review checkout runs both frozen revisions serially with its qualified frozen install; package manifests, lockfile, workspace configuration, and patches match. For the new campaign, on the baseline only, the two benchmark files are copied from helper commit f3f8c553646a1f9f08af722b58d32e39204f3dc6; runtime sources remain at the baseline SHA. No source overlay runs inside compiled workers.

Run the same committed helpers for both builds, serially, with a new output directory for every invocation:

node scripts/perf/worker-module-graphs-measure.mjs --built --build-dir "$BUILD" \
  --worker memory-search --samples 1200 --state-dir "$FRESH/worker" --output "$FRESH/worker.json"
PGCENSUS_ENGINE=sqlite PGCENSUS_BUILD_ROOT="$BUILD" PGCENSUS_OUT="$FRESH/search" \
  PGCENSUS_SOURCE_COUNT=1000 PGCENSUS_WARMUPS=0 PGCENSUS_ROUNDS=101 \
  node --import ./scripts/tsx.mjs scripts/perf/memory-search-status-measure.ts
PGCENSUS_RESOURCES=1 PGCENSUS_ENGINE=sqlite PGCENSUS_BUILD_ROOT="$BUILD" \
  PGCENSUS_OUT="$FRESH/resources" PGCENSUS_SOURCE_COUNT=1000 PGCENSUS_WARMUPS=0 \
  PGCENSUS_ROUNDS=101 node --import ./scripts/tsx.mjs scripts/perf/memory-search-status-measure.ts

The native worker probe measures the import floor, not a search workload; its no-op prewarm timings are diagnostic only. User-facing latency gates apply to cold and warm real Gateway searches. Use the real Gateway search run for correctness and timing; instrumented runs report CPU and synchronous process memory snapshots, not peak RSS or fresh Gateway-worker heap.

Current five-pair results: completed-repair candidate (PASS)

Baseline b61ab6deb40cc640aec077b6e6a7b93a44b5422c; candidate and helpers f3f8c553646a1f9f08af722b58d32e39204f3dc6; Node 26.12.1, macOS arm64, 18 available logical CPUs. Serial order B/C, C/B, B/C, C/B, B/C; 1,000 documents and separate timing/resource passes of 101 queries per arm. All 2,020 query assertions and count budgets passed; all 1,010 paired full responses match exactly. Host one-minute load was 11.57–28.45; shared-host results, not an isolated-capacity claim.

Cells show the median of five runs and their minimum–maximum spread. Warm rows first compute the named nearest-rank quantile over each run's 100 warm queries. For five run-level samples, nearest-rank p95 equals the maximum.

Metric Baseline median [min–max] Candidate median [min–max] Median change
Worker retained heap (MiB) 71.49 [71.49–71.5] 29.67 [29.67–29.67] -58.50%
Worker loaded scripts 2,544 [2,544–2,544] 1,371 [1,371–1,371] -46.11%
Worker cold process RSS delta (MiB) 102.16 [101.66–104.66] 45.78 [45.66–46.69] -55.19%
Worker startup (ms) 816.38 [723.32–925.92] 398.85 [235.87–701.02] -51.14%
Worker startup CPU (ms) 667.51 [529.8–854.49] 264.75 [234.36–526.06] -60.34%
Worker startup allocation (MiB) 372.57 [367.02–382.15] 191.49 [186.79–206.8] -48.60%
Config validation (ms) 1,126.83 [988.94–1,717.82] 1,016.09 [794.27–1,380.27] -9.83%
1,000-document indexing (ms) 10,760.79 [9,498.43–15,170.56] 6,767.97 [5,647.47–16,653.04] -37.11%
Gateway readiness (ms) 12,897.58 [7,172.4–21,236.63] 10,358.87 [6,716.12–15,415.43] -19.68%
First search (ms) 1,673.6 [1,253.95–2,306.68] 759.77 [458.83–903.03] -54.60%
Warm search p50 (ms) 10.4 [6.81–11.81] 7.21 [4.51–7.39] -30.67%
Warm search p95 (ms) 16.08 [12.95–17.77] 11.66 [6.79–17.13] -27.51%
Warm search p99 (ms) 28.32 [18.64–35.06] 21.57 [8.48–36.85] -23.83%
First-search process CPU (ms) 4,157.97 [3,463.62–4,411.15] 1,604 [1,377.63–2,445.45] -61.42%
Warm process CPU p50 (ms) 20.45 [18.8–27.47] 12.69 [8.82–17.67] -37.92%
Warm process CPU p95 (ms) 46.94 [34.39–54.08] 38.38 [20.89–58.42] -18.24%
101-search process CPU total (ms) 6,321.41 [5,555.26–7,295.45] 3,544.2 [2,385.35–4,355.72] -43.93%
Gateway RSS at readiness (MiB) 1,636.95 [1,499.31–1,753] 1,679.3 [1,572.98–1,760.09] +2.59%
Gateway RSS after search (MiB) 1,860.33 [1,702.72–1,914.25] 1,731.5 [1,724.84–1,858.25] -6.93%

Performance verdict: PASS. No scored median or run-level p95 regresses by 20%. Readiness RSS rises 2.59%; worst-run indexing, warm p99 and warm CPU p95 rise 9.77%, 5.10% and 8.04%, respectively. The worker import-floor reduction is stable; whole-Gateway after-search RSS falls 6.93%, while the still-large 1.69 GiB median remains follow-up work. These phase snapshots are neither peak RSS nor drained/GC retention proof.

The independent run audit confirms all 20 valid configurations, 1,000-file indexes and clean Gateway shutdowns (63–191 ms), with matching known fixture-warning inventories and no new plugin/service failure counters. Across 1,000 warm queries per arm, repeated repair statements fall from 4,000 to zero and publication-backend native calls from 9,020 to 1,010; authoritative facts reads remain 1,000 and search-worker calls remain 5,000. The repeated eight-call repair/transaction sequence is removed.

Telemetry limitation: 10 candidate passes and one baseline pass record a post-query catalog task rejection. No warm-query worker/diagnostic failure appears. Existing shutdown intentionally rejects unfinished catalog work, but this observer records no error class or retirement reason, so these are consistent with shutdown retirement rather than proof of successful catalog completion. No peak-RSS, continuous-readiness, background-quiescence or leak-freedom claim is made.

Earlier import-only candidate: failed gate and diagnostic evidence

Historical five-pair results: import-only candidate (HOLD)

Baseline b61ab6deb40cc640aec077b6e6a7b93a44b5422c; candidate and scored helpers 3fdc54fcb109683949d19a723f59646d2755f972; Node 26.12.1, macOS arm64, 18 available logical CPUs. Serial order: B/C, C/B, B/C, C/B, B/C. Each arm used 1,200 worker prewarms, then separate default and resource passes with 1,000 documents and 101 searches. All 2,020 Gateway searches returned the expected top result, all full-status count budgets were zero, and all Gateway processes shut down cleanly. Host one-minute load ranged from 16.05 to 47.49; this was a shared, busy host.

Cells are the median of five runs followed by the minimum–maximum spread. For five run-level observations, nearest-rank p95 equals the reported maximum. Warm latency/CPU rows first compute the named quantile over 100 queries within each run, then summarize the five run values.

Metric Baseline median [min–max] Candidate median [min–max] Median change
Worker retained heap (MiB) 71.49 [71.49–71.49] 29.67 [29.67–29.67] -58.50%
Worker loaded scripts 2,544 [2,544–2,544] 1,371 [1,371–1,371] -46.11%
Worker cold process RSS delta (MiB) 103.17 [101.95–104.09] 46.2 [46–47.55] -55.22%
Worker startup (ms) 2,175.02 [1,128.39–4,252.65] 983.45 [458.62–1,850.01] -54.78%
Worker startup CPU (ms) 1,184.49 [961.49–1,444.19] 630.51 [445.46–673.75] -46.77%
Worker startup allocation (MiB) 373.75 [357.11–381.47] 188.57 [188.22–196.28] -49.55%
Config validation (ms) 2,928.27 [1,442.06–5,746.59] 2,114.83 [1,322.58–5,135.05] -27.78%
1,000-document indexing (ms) 20,544.32 [9,584.83–35,427.62] 15,820.58 [9,034.33–17,405.49] -22.99%
Gateway readiness (ms) 18,687.28 [10,763.64–21,896.91] 16,739.85 [9,068.75–23,006.17] -10.42%
First search (ms) 2,300.98 [1,637.04–4,331.12] 796.06 [666.24–978.84] -65.40%
Warm search p50 (ms) 12.21 [11.3–17.43] 11.41 [9.74–13.86] -6.55%
Warm search p95 (ms) 54.11 [22.8–81.89] 24.36 [13.22–67.22] -54.99%
Warm search p99 (ms) 69.47 [57.42–319.62] 69.84 [37.98–146.41] +0.53%
First-search process CPU (ms) 5,100.5 [4,582.38–6,103.11] 2,218.46 [1,798.09–2,268.58] -56.51%
Warm process CPU p50 (ms) 28.34 [21.59–33.22] 27.35 [22.92–30.88] -3.49%
Warm process CPU p95 (ms) 60.16 [45.21–89.59] 75.88 [53.07–79.62] +26.12%
101-search process CPU total (ms) 8,447.95 [7,699.59–9,263.22] 5,222.82 [4,909.04–5,852.41] -38.18%
Gateway RSS at readiness (MiB) 1,374.72 [1,299.88–1,486.91] 1,486.5 [1,438.98–1,610.13] +8.13%
Gateway RSS after search (MiB) 1,678.92 [1,451.05–1,774.22] 1,623.59 [1,455.42–1,759.06] -3.30%

Performance verdict: HOLD. Worker heap and loaded-code reductions are consistent, and overall search CPU and latency improve. Warm process-CPU p95 rises 26.12%, readiness RSS rises 8.13%, median warm p99 rises 0.53%, and run-level readiness p95 rises about 5.1%. These are reported rather than dismissed as spread. RSS snapshots are phase observations, not peak or drained/GC retention measurements.

The first three pairs exposed an attribution gap: candidate warm queries begin 0.76–0.95 seconds after readiness, baseline 2.23–5.37 seconds. Readiness does not await server-startup-handler-prewarm.ts; startup imports can run between requests. The counter covers every Gateway thread. The separate diagnostic captured 23 of 23 CPU profiles per arm without profile errors. Native counter retirement left only 17 baseline and 18 candidate matched worker targets, and capture windows differed, so matched counters do not reconcile to whole-process CPU. Candidate catalog work overlapped warm searches; this is evidence of startup/background overlap, not proof that the import change introduced that work or permission to waive the gate.

Both diagnostic arms executed identical warm SQL: 900 agent-writer statements plus 500 search-worker statements, including 100 repair transactions, 100 FTS reconciliations, 100 path backfills, and 200 provenance backfills. This exposed the repeated repair now removed by the additional candidate. The receipt contract covers tracked Gateway writers and workers; outside writers must use Gateway or exclusive offline custody, as documented in the existing database ownership contract.

Named follow-ups

  • Catalog worker: private build isolation crosses native provider-SDK config publication/provenance identity. A direct auth-runtime import also reaches the plugin loader. Measure the compiled auth workload before changing those owners; an SDK-only lazy import does not cut this path.
  • Session-indexing vector residency: whole-group decoded vectors and publication-worker staging can retain large payloads. Measure an embedding workload before changing scheduling; retain original conflict scope, provider request packing and atomic publication. Simply lowering a batch limit does not preserve those contracts.
  • Metadata validation imports: the five-field rebuild identity schema loads 679 TypeBox modules. The same public schema checker with a literal schema has a static closure of 235 modules. Verify equivalent validation and compiled savings in a separate follow-up.

@vincentkoc vincentkoc self-assigned this Oct 28, 2026
@clawsweeper

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

@vincentkoc
vincentkoc marked this pull request as ready for review October 28, 2026 03:32
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S and removed size: XS labels Oct 28, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes heavyweight imports from memory readers and reuses completed index repairs while their schema and write receipts remain current.

Example: Run 100 unchanged warm memory searches over an indexed corpus.

  • Before: Each search repeats provenance and FTS repair in a transaction.
  • After: Searches reuse completed repair, while tracked writes or changed options require repair again.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The earlier requested performance evidence is now present, and the source review found no actionable defect; persisted formats and migration paths remain unchanged.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The full body supplies exact-head compiled-worker and real Gateway memory.search results on Node 26.12.1/macOS arm64, with paired response equality, repair SQL reductions, clean shutdowns, and the unchanged performance gate; shared-host and catalog-telemetry limits are explicitly bounded.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Memory searches retain unnecessary runtime code and repeatedly perform repair work on unchanged indexes.
Reason: The maintainer-authored direction has measured Gateway and compiled-worker benefits, preserves existing storage contracts, and adds no product setting.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR delivers measured memory-search improvements, and no actionable introduced defect was found at the reviewed head.

Priority: P2
Reviewed head: f3f8c553646a1f9f08af722b58d32e39204f3dc6

Before merge

None.

Findings

None.

Agent review details

How this fits together

Memory readers and publication workers sit between Gateway memory requests and agent databases, returning search results and committed index facts through existing private SDK seams.

flowchart LR
  A[Gateway memory request] --> B[Memory manager]
  B --> C[Publication worker]
  C --> D[Schema admission and write receipt]
  D --> E[Repair when stale]
  B --> F[Read worker]
  F --> G[Agent database]
  E --> G
Loading

Technical review

Best possible solution:

Reuse existing admission facts and lightweight helper owners while preserving committed-write invalidation, live request admission, and explicit repair.

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

Current-main source shows unconditional admitted-schema repair, and the supplied compiled Gateway diagnostic records repeated repair across unchanged searches; no target code was run during this review.

Is this the best way to solve the issue?

The patch follows the smallest complete approach: redirect imports to existing private owners and retain repair completion on existing option-keyed admission rather than adding a separate cache or lifecycle.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Memory schema admission and repair keeps the original intent (bb7d32e: Share completed physical admission while preserving import repair and committed schema publication.)
  • Memory publication transaction ownership keeps the original intent (596e4f4: Remove redundant publication work while keeping atomic replacement and schema-owner admission.)
  • Lightweight retrieval imports keeps the original intent (9d8180f: Keep retrieval independent of unrelated session, configuration, and artifact runtimes while retaining the same helper implementations.)
  • Native schema transaction tracking keeps the original intent (bc6fedb: Invalidate retained facts on DDL and transaction settlement while preserving committed schema visibility.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Exact introduced patch: Reviewed the pinned merge-base-to-head hunks; base-only setup and UI changes are outside this PR's introduced work. (f3f8c553646a)
  • Repair reuse and invalidation: Repair reuse requires matching option-keyed admission and scoped write token; successful repair publishes its captured committed token, and request admission precedes the reuse branch. (extensions/memory-core/src/memory/manager-publication.worker.ts:411, f3f8c553646a)
  • Commit generation: Pending scoped receipts account for the native schema owner's transactional MAIN-schema mutation, including caught savepoint rollback. (src/infra/sqlite-database-admission.ts:151, f3f8c553646a)
  • Completed behavior evidence: The full PR body reports five interleaved compiled baseline/candidate pairs at the reviewed head: worker retained heap 71.49→29.67 MiB, warm-search p95 16.08→11.66 ms, 1,010 identical paired responses, and repeated warm repair statements 4,000→0; no scored median or run-level p95 crosses the declared 20% regression threshold. (f3f8c553646a)
  • Private SDK boundary: The modified indexing, KNN, and schema facades are existing private-local-only subpaths; their new exports forward existing owners rather than changing published plugin contracts. (scripts/lib/plugin-sdk-private-local-only-subpaths.json:89, f3f8c553646a)
  • Current main still repeats repair: Current main retains provenance backfill and FTS reconciliation on admitted-schema calls and does not contain this completed-repair reuse. (packages/memory-host-sdk/src/host/memory-schema.ts:411, 4b0da43dded7)

PR surface

Source +86, Tests +259, Other +71. Total +416 across 25 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 18 148 62 +86
Tests 5 261 2 +259
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 124 53 +71
Total 25 533 117 +416

Review metrics

Metric Value Why it matters
Production versus tests Production +148/-62; tests +261/-2 Production growth extends existing repair and receipt owners; tests exercise distinct invalidation, failure, rollback, and handle-lifetime boundaries.
Diagnostic controls 2 opt-in benchmark environment variables PGCENSUS_RESOURCES and PGCENSUS_CPU_PROFILE separate instrumented resource and diagnostic profiling passes from latency measurements.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: Measured memory and CPU improvements affect ordinary memory searches without an urgent availability or correctness regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-28T04:25:39.910Z sha 2237c03 :: needs maintainer review before merge. :: none

Reviewed October 28, 2026, 1:30 AM ET / 05:30 UTC (Revision 2).

@vincentkoc vincentkoc changed the title fix(memory): avoid loading provider and writer runtimes for reads fix(memory): avoid redundant repairs and heavyweight read imports Oct 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Final head: f3f8c55. The PR body now contains the completed five-pair compiled-worker and real Gateway results, the unchanged 20% regression gate, full response/SQL/shutdown audit, and the historical failed candidate. The new schema-repair reuse and SQLite receipt changes also have 82 focused passing tests, a passing packaged build, and clean independent review. Please review this exact head.

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 28, 2026
@vincentkoc
vincentkoc enabled auto-merge (squash) October 28, 2026 05:33
@vincentkoc
vincentkoc merged commit 04681a3 into main Oct 28, 2026
160 of 162 checks passed
@vincentkoc
vincentkoc deleted the fix/worker-memory-footprint-20261028 branch October 28, 2026 05:36
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 29, 2026
…enclaw#186483)

* fix(memory): avoid loading provider and writer runtimes for reads

* test(memory): measure compiled search worker and gateway resources

* test(perf): avoid conditional map spread in search census

* test(memory): document database mock isolation

* test(perf): capture warm search CPU across workers

* fix(sqlite): include pending schema changes in write receipts

* perf(memory): reuse completed index schema repairs across reads
vincentkoc added a commit that referenced this pull request Oct 29, 2026
* commit '04681a3efcb110ecf073fb610eed6e4ea4f87fed':
  fix(memory): avoid redundant repairs and heavyweight read imports (#186483)
  fix(doctor): report held agent stores in doctor --json (#186535)
  fix(ci): complete maintained script and export discovery (#186466)
  perf(control-ui): restore the Details panel from the cached pane in one step (#185242)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-core Extension: memory-core P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L 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