Skip to content

perf(infra): batch usage refresh maintenance - #174050

Merged
steipete merged 2 commits into
mainfrom
dbasync/batchaudit3-usage
Oct 16, 2026
Merged

steipete merged 2 commits into
mainfrom
dbasync/batchaudit3-usage

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Usage-cache refresh currently waits for one prune-staging reply per stale row, and month cleanup issues one DELETE per removed month. Batch those operations under their existing owners, and remove redundant body-metadata comparisons after refresh ownership and write-receipt validation.

Full refresh transfers ordered batches of at most 64 snapshots or 1 MiB of encoded metadata/key data; an oversized row travels alone. The host keeps its existing accumulator and performs one final snapshot-checked prune transaction. Targeted refresh sends no prune commands. Month cleanup deletes up to 100 exact keys per statement inside the existing rollup-write transaction, preserving rollback across batches. The old single-row command is deleted.

Both snapshot-prune implementations and their timestamp/value predicates remain unchanged. SQL-side payload limits, receipt invalidation, cancellation, settlement, and the final effect-time lease check remain. No schema, SDK, configuration, migration, Doctor, updater, service-lifecycle, or plugin-loading changes.

Measurements

Pinned comparison: baseline 80949b4ec75d2479ab8c35d746e2aa82a17f515f versus candidate d69538dfaa2d0aa6c4e1cac566781daa722d2878. Three alternating M/C pairs used the shared v3 harness with the recorded runtime-only pin: Node 24.22.0 and both compiled/loaded SQLite 3.54.0; NODE_DISABLE_COMPILE_CACHE=1. Synthetic Gateway fixtures were on the internal disk. All six raw native SQL/request recounts and causal phase/window recounts match the saved analyses; all source/runtime pins, workload outcomes, and cleanup checks pass. No native execution or prepare errors occurred in the Gateway series. No latency claim is made on this busy host.

The workload does not demonstrate a warmed SQL reduction: causal warm totals are identical. Pooled warm SQL/request medians do not increase, but raw warm-window sums and whole-workload totals do increase. Those real differences are retained below; this is not a blanket claim that every scenario improved.

Gateway workload

Each cell is median [min–max], baseline → candidate. Warm pooled rows contain 30 turns per arm; other rows contain three scenario measurements per arm. SQL means all-thread native executed statements, requests mean v3 actor/task wire requests, and MAIN is the Gateway main-thread subset.

Scenario SQL Requests MAIN
Warm, causal pooled turns 75 [74–83] → 75 [74–82] 28 [27–32] → 28 [27–31] 0 [0–0] → 0 [0–0]
Warm, raw pooled windows 75.5 [74–109] → 75 [74–106] 28 [27–37] → 28 [27–35] 0 [0–4] → 0 [0–9]
Warm, causal run medians 75 [75–75.5] → 75 [75–75] 28 [28–28.5] → 28 [28–28] 0 [0–0] → 0 [0–0]
Warm, raw run medians 75.5 [75–76] → 75.5 [75–75.5] 28 [28–28.5] → 28 [28–28] 0 [0–0] → 0 [0–0]
First turn 1297 [1028–1306] → 1011 [1010–1306] 158 [157–168] → 157 [156–159] 9 [9–9] → 0 [0–9]
Fresh boot + connect + first 1835 [1834–1837] → 1825 [1819–1833] 269 [267–275] → 267 [267–269] 201 [201–202] → 192 [192–201]
Second session + spawn 545 [543–551] → 549 [544–550] 167 [167–169] → 168 [167–169] 0 [0–0] → 0 [0–0]
Cron 348 [347–351] → 347 [347–349] 90 [89–90] → 90 [90–90] 0 [0–0] → 0 [0–0]
Compaction 96 [96–97] → 98 [96–98] 31 [31–31] → 31 [31–31] 0 [0–0] → 0 [0–0]
Idle settle 2 [1–3] → 1 [0–2] 0 [0–2] → 0 [0–1] 0 [0–0] → 0 [0–0]
Connected idle (300 seconds) 88 [88–89] → 88 [88–89] 39 [39–40] → 40 [39–40] 0 [0–0] → 0 [0–0]
Restart combined 813 [784–820] → 822 [821–828] 238 [235–239] → 240 [239–241] 83 [83–83] → 83 [83–83]
Shutdown before restart 28 [28–37] → 28 [28–28] 9 [9–10] → 9 [9–9] 9 [9–9] → 9 [9–9]
Whole measured workload 4582 [4562–4603] → 4597 [4591–4605] 1144 [1140–1146] → 1146 [1142–1147] 306 [306–307] → 306 [306–306]
Summed measurements SQL Requests MAIN
30 causal warm turns 2275 → 2275 853 → 853 0 → 0
30 raw warm windows 2353 → 2381 864 → 867 12 → 30
Three whole workloads 13747 → 13793 3430 → 3435 919 → 918

Whole-workload median SQL rises 4,582→4,597 (+0.33%) and requests 1,144→1,146 (+0.17%). Whole sums rise by 46 SQL and five requests. Raw warm sums rise by 28 SQL and three requests, while causal sums remain exactly 2,275 SQL / 853 requests / 0 MAIN per arm. Raw warm MAIN rises 12→30; first-turn MAIN falls 27→9. The whole MAIN total falls 919→918. Scoped inventory evidence is T1 0→0, T1-compat 0→0, and worker API sites 13→13; raw MAIN in boot/lifecycle windows is not a new usage-owner T1 call.

Observed variation and coverage

Pairs 1 and 3 each execute 12 more lease-store SQL in the candidate warm windows and 12 fewer in its first-turn window. That explains 24 of the 28 extra raw warm SQL as a phase shift; the all-workload lease-store SQL is unchanged. Pair 3 also moves 268 maintenance SQL from the first-turn window into earlier boot/connect. These shifts are not optimization savings.

The restart preflight/sweep executes in baseline pairs 1 and 2 and all three candidate arms; it is absent from baseline pair 3. Each execution contributes 30 SQL directly attributed to session-transcript-index-status.worker.ts and four directly attributed to session-transcript-projection-publication.worker.ts, including first-handle TEMP tracking setup. The one additional execution accounts for 34 of the whole-workload +46 SQL; other observed module changes net to +12 SQL. This is an actual additional background execution, not evidence of transcript rebuilding and not discarded as noise. The retained usage-series evidence does not establish which scheduling trigger caused the extra execution, so its causal relationship to the usage change remains unresolved.

The remaining whole-workload changes include +8 agent DB admission SQL, +3 auth-profile SQL, +3 transcript-backfill SQL, +3 agent readonly-open SQL, +3 schema-read SQL, offset by -6 readonly-scope SQL, -4 session-entry-list SQL and other smaller differences. Per-module and per-scenario deltas are retained in the independent audit. Compaction SQL 96→98 shifts with idle-settle work; connected-idle SQL is identical in every pair while total idle requests rise 118→119. Spawn totals rise 1,639→1,643 SQL and 503→504 requests, with session-entry/read/projection and ACP metadata variation retained.

Pair Usage-origin SQL, base → candidate Usage-origin requests, base → candidate Direct usage SQL, base → candidate
1 95 → 95 8 → 8 54 → 54
2 113 → 116 9 → 9 54 → 56
3 112 → 97 9 → 8 54 → 56

Usage-origin totals include admission/support SQL. The request at session-cost-usage-cache.sqlite.ts:89 prepares the owner/agent registration: it occurs in first turn for base-2/base-3 (18 SQL) and candidate-2 (19 SQL), but not the other first turns. Restart preparation is 36 SQL except base-3 at 35. Candidate-2/candidate-3 each execute one additional SQL statement under the metadata-read/admission path (session-cost-usage-worker.ts:198) and one under refresh-input lookup (session-cost-usage-refresh-inputs.worker.ts:114) in first turn. In pairs 2 and 3, the existing first-turn usage-worker task executes 7→9 SQL; each arm still has four usage-worker task requests across first turn, cron, connected idle and restart-first-turn. Thus these are two additional SQL executions within one existing task, not another task invocation. Both extra executions are single-row SELECTs in unchanged read/admission paths. Source order places metadata reading and transcript inventory before the changed prune/body branches within that refresh task; the separate writer preparation also finishes before task dispatch. Direct rollup-iterator and transcript-instance read counts remain unchanged, so this is not evidence of a second full inventory pass. The retained evidence does not establish why cache/admission work differs or the initial scheduling cause. Pair-2's remaining +1 usage-origin SQL is agent metadata in preparation. These cold changes are included, not subtracted. Across the three arms, usage-origin totals are 320→308 SQL and 26→25 requests.

Gateway traces observe inventory, refresh-input reads/admission, rollup INSERTs and partition replacement. They contain no executed removed-month deletion or changed body-snapshot SELECT path. Unchanged reads and INSERTs do not establish coverage of the batching change. Zero-SQL branch effects are not inferred from the SQL trace. The owner probes below establish the changed maintenance-path savings separately.

Owner operations

The kernel and actual-refresh series each contain three alternating M/C runs, with three measured repetitions of each ordinary operation inside each run. Counts below are the median per operation; all reported ordinary counts are invariant across the nine samples per arm. Fixture seeding, direct result reads and report verification are outside measured phases. The refresh entry point uses real durable reader/writer workers and includes its measured warm support work; cold fixture admission is not part of these warmed refresh samples.

Owner operation Synthetic cardinality SQL, base → candidate v3 wire requests Usage worker→host commands
Full refresh with stale rows 97 rollups, one partition each 204 → 204 2 → 2 98 → 3
Targeted refresh same 97 stale rows + one live transcript 5 → 5 2 → 2 2 → 2
Full refresh after pruning same fixture, no stale rows 4 → 4 1 → 1 0 → 0
Later targeted refresh same live transcript, added month 4 → 4 2 → 2 2 → 2
Monthly deletion kernel 2 months 5 → 4 outside wire-dispatch scope outside host-command scope
Monthly deletion kernel 101 months 104 → 5 outside wire-dispatch scope outside host-command scope
Existing prune-snapshot kernel control 97 rollups 200 → 200 outside wire-dispatch scope outside host-command scope
Existing prune-snapshot kernel control 8,407 rollups 17,079 → 17,079 outside wire-dispatch scope outside host-command scope

The 97-row refresh replaces 97 per-row host commands plus one final prune command with two bounded batches plus one final prune command. These host commands are a separate instrumentation scope: do not add them to or relabel them as v3 wire requests. The final SQL prune work is unchanged. Monthly deletion independently uses bounded SQL batches and keeps the original transaction semantics.

The kernel control uses 8,407 synthetic rollups in one synthetic agent/DB, with artificial partition rows and small metadata. It is an unchanged control, not an actual full-refresh batching measurement. A separate actual-refresh M/C pair used the same 8,407 synthetic rollups, one synthetic partition per stale rollup and one live synthetic transcript, with one repetition per operation per arm:

Supplemental owner operation SQL, base → candidate v3 wire requests Usage worker→host commands
Full refresh with stale rows 17,083 → 17,083 2 → 2 8,408 → 133
Targeted refresh 7 → 7 2 → 2 2 → 2
Full refresh after pruning 4 → 4 1 → 1 0 → 0
Later targeted refresh 5 → 4 2 → 2 2 → 2

The full-refresh command sequence changes from 8,407 per-row commands plus one final prune to 132 bounded batch commands plus one final prune. Executed SQL remains identical, including 8,411 SELECTs and 8,670 DELETEs; this is a worker→host command reduction, not a v3 wire-request or SQL reduction. The later-targeted difference is one baseline-only PRAGMA and is not claimed as a batching saving. MAIN and native/prepare errors are zero. Targeted refresh retains the stale rows, full refresh deletes only those rows, and a later update preserves exact expected monthly totals. Saved rows/statistics, 15 source-file hashes per arm, proof hashes, clean snapshots and runtime attestations all pass independent checks. Both supplemental raw arms had already been auto-cleaned, so this pair has no independent raw recount. This one-pair synthetic result makes no latency or live-deployment claim. Its small metadata exercises row-count batching; existing focused tests cover the byte cap and oversized single rows. Transfer bounds do not cap the host accumulator or total discovery memory.

Owner MAIN is zero throughout. Each kernel arm intentionally injects two late DELETE failures (rollup and partition), observes the expected execution error, verifies the full pre-transaction rows survive, and successfully retries; these expected errors are not hidden. Ordinary owner operations have no native/prepare errors. Actual refresh proves targeted refresh preserves stale rows, full refresh removes only stale rows, and a later write remains visible with exact monthly totals. Kernel proof also verifies retained unrelated rows and later rewrite visibility.

All saved owner statistics, exact source-file hashes, clean tracked snapshots and native runtime attestations were independently checked. Nine of twelve owner arms also have independent raw native recounts that exactly match their saved rows. Raw files for native-candidate-3, refresh-base-3 and refresh-candidate-3 had already been cleaned; those three are saved-evidence audits, without a claimed independent raw recount.

Evidence hashes

  • Gateway summary: b5c7c7fcc7963563944759ffdff063dfb4c70d27c79be91f2f3f5c35ee064a8b
  • Usage kernel summary: 9a40f4ac50bf3d64f543111e42492086ea0f95f9cc61624e119f414eeff2cbb1
  • Actual refresh summary: cc71ca2b64ea3ba4e989978697ced557252ba2adece86530290b234de4ee064d
  • Supplemental 8,407-rollup actual-refresh summary: 0000cf736deafc9a837920d56e2d165feee051170afde276ee3b345aeceaf8fb
  • Scoped T1 evidence: 6920cf0b3d66ef48288523f3d9f26f93ee6af592e22a9850f8cf26e91b6eeefa

Summary files: usage-safe-pairs-d69538dfaa2d/gateway-pairs-summary.json, usage-native-summary.json and usage-refresh-summary.json. Detailed independent evidence: independent-measurement-audit.json.

Area T1 is 0 → 0 across all five changed production files; the same 13 inventoried synchronous primitive call sites remain worker-owned. Exact source and worker callers are recorded in usage-area-t1-evidence.json. Final CI reports global T1 222 → 222, deprecated-only 12 → 12, and all three dialect groups 0 → 0.

Removed checks and accepted edges

Locations refer to the base above.

Base file:line Removed work Accepted edge case
src/infra/session-cost-usage-cache.kernel.ts:259 Body timestamp/value comparison after metadata capture An unsupported same-lease rewrite could pair old metadata with a replacement body; normal refresh ownership excludes it and derived usage can rebuild.
src/infra/session-cost-usage-partitions.worker.ts:167 Repeat rollup metadata comparison while loading partitions The same unsupported rewrite could mix checkpoint metadata; the refresh lease excludes competing refreshes.
src/infra/session-cost-usage-worker.ts:225 Cached-body metadata comparison after receipt validation An unsupported same-lease rewrite could reuse an old body; normal writes invalidate the receipt.
src/infra/session-cost-usage-worker-runtime.ts:389 Per-row lease lookup before staging Staging may outlive cancellation but has no database effect; final prune still requires the lease.
src/infra/session-cost-usage-worker.ts:505 One awaited staging command per row, including unused targeted staging Stale rows wait for a bounded batch; ordering and the final transaction remain.

The test that injected a rewrite through the active refresh's own lease is removed. Tests for retained snapshot-prune checks remain.

Evidence

Two Codex autoreview rounds completed; the final scoped review is clean. Changed-file type-aware lint, format, and diff checks passed (usage-lint-final.log); the inventory correction also passed focused format/lint checks. Prior-head CI source contracts, Madge (0 cycles), T1/dialect ratchets, production types, and all test types passed. Six focused files passed there (88 tests). Its only leaf failure was the new partitions regression, incorrectly assigned to unit-fast/threads; the final commit adds it to the existing database-worker inventory for isolated infra/forks. That regression now passes locally (1 file / 1 test) on the exact bytes committed in the final head. All seven focused test files are byte-identical across the inventory-only correction, giving 7 files / 89 passing cases with source provenance in usage-final-coverage.json. Final-head CI run 38881684862 passed on d69538dfaa2d0aa6c4e1cac566781daa722d2878, including the aggregate CI gate, production/test types, lint, source contracts, architecture checks, ratchets, and all executed test shards. Knip completed with inherited failures: four production / three full-tree unused exports in untouched UI files, and zero script findings. These exactly match observed main a9e85bfa0f2104543254675a1a950d3f2237714c (run 38875037669, job 116888078091); the complete UI source tree, relevant Knip configs/runners, lockfile, and deadcode commands match by Git object or exact value. See usage-knip-final-provenance.json; Knip is not claimed green. SDK diff and published-driver update proof are not triggered by this scope.

New regressions use real owner writes to verify rollback/retry when the second month-deletion batch fails, preservation of unrelated rows, bounded full-refresh transfers including oversized metadata, targeted-refresh preservation, and later monthly totals. Existing admission, receipt-invalidation, payload-bound, snapshot, and memory-path suites passed as part of the seven-file focused proof; no required focused file remains uncovered.

A separate key-only prune proposal is deferred: usage partitions inherit NUL-containing PostgreSQL TEXT keys, and combining the prune would newly bind them for missing/non-current snapshots. This is a source finding, not a live PostgreSQL reproduction. The current change preserves the existing prune implementation and does not claim PostgreSQL usage-partition support. Key representation belongs to the storage migration owner.

Size: 11 files, +251/−158 (net +93). Production +60/−51 (net +9); tests/support +178/−103; docs +13/−4. Growth supplies bounded transfers while removing the per-row path. Release-note context: batch usage-cache maintenance without changing public APIs or refresh ownership.

@clawsweeper

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T09:04:59.456213Z b0997bc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Oct 16, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR batches usage-cache prune transfers and monthly partition deletions while removing redundant refresh metadata checks.

Example: A full usage refresh finds 97 small stale cache rows.

  • Before: The worker sends 97 staging commands followed by one prune command.
  • After: The worker sends two bounded staging batches followed by one snapshot-checked prune command.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The production change is focused and consistent with existing ownership, but the introduced test-routing defect prevents its rollback regression from running in CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary contributor proof gate does not apply to this maintainer-authored PR; planned native probes are not treated as completed measurements.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Large usage refreshes perform unnecessary worker-host round trips and individual monthly deletion statements.
Reason: The maintainer-authored direction removes redundant work within existing owners, adds no public knobs, and explicitly records the accepted derived-cache edge cases.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it provides a focused maintenance optimization, but the new partition rollback test runs in the wrong CI worker pool and fails before exercising deletion.

Priority: P2
Reviewed head: b0997bc1659d34605d568187772b3ff4c9021ad1

Before merge

  • Route the partition rollback test through the database-worker pool (P2) - The new file is eligible for unit-fast because it has no explicit database-worker registration. On Linux that lane uses worker threads, but owner.acquire() reaches openAgentDatabaseSqliteWorkerStore, which rejects non-main-thread admission. Exact-head checks-node-changed-3 already fails with “Agent admission requires its host owner,” before any deletion or rollback assertion. Add this file to databaseWorkerCoreTestFiles in test/vitest/vitest.database-worker-core-paths.mjs so it runs in the existing fork-based infra lane.

Findings

  • [P2] Route the partition rollback test through the database-worker pool — src/infra/session-cost-usage-partitions.worker.test.ts:23-24

Tests

  • Missing end-to-end proof: A base-failing/head-passing regression run is not established; the added partition test currently fails during host admission.
Agent review details

How this fits together

The usage refresh worker derives cost projections from transcripts, stages obsolete cache snapshots on the host, and commits maintenance through the existing agent database writer.

flowchart LR
  A[Transcript inventory] --> B[Usage refresh worker]
  C[Stored usage checkpoints] --> B
  B --> D[Host batch accumulator]
  D --> E[Agent database writer]
  E --> F[Usage checkpoints and monthly partitions]
Loading

Technical review

Best possible solution:

Keep the existing batching design and register the new rollback test in the fork-based database-worker lane.

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

Exact-head CI records the new test's admission failure, and source inspection explains it through threaded unit-fast routing; no target code was executed during this review.

Is this the best way to solve the issue?

Batching within the existing refresh and writer owners is appropriate, and the explicit metadata-check tradeoff preserves final snapshot pruning and commit authority.

Full review comments:

  • [P2] Route the partition rollback test through the database-worker pool — src/infra/session-cost-usage-partitions.worker.test.ts:23-24
    The new file is eligible for unit-fast because it has no explicit database-worker registration. On Linux that lane uses worker threads, but owner.acquire() reaches openAgentDatabaseSqliteWorkerStore, which rejects non-main-thread admission. Exact-head checks-node-changed-3 already fails with “Agent admission requires its host owner,” before any deletion or rollback assertion. Add this file to databaseWorkerCoreTestFiles in test/vitest/vitest.database-worker-core-paths.mjs so it runs in the existing fork-based infra lane.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Prune staging and refresh exclusion keeps the original intent (ad74de5: Move expensive usage processing off the Gateway thread while retaining host-owned atomic pruning; later serialized refresh ownership replaced durable lock churn.)
  • Monthly partition deletion keeps the original intent (7aae49e: Keep checkpoint and monthly projection changes atomic; the later combined-upsert refactor retained partition deletion inside that transaction.)
  • Checkpoint metadata comparisons changes intended behavior with a stated reason (cd1daee: The combined checkpoint/partition reader retained metadata matching to prevent mixed cost data; this PR explicitly relies on serialized refresh ownership and accepts unsupported same-lease replacement.)
  • Receipt-covered body reuse keeps the original intent (67929a8: Reuse bounded rollup inputs while writer receipts remain current, with concurrent derived repair corrected by a later refresh.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/infra/session-cost-usage-partitions.worker.test.ts --maxWorkers=1
  • pnpm exec prettier --check test/vitest/vitest.database-worker-core-paths.mjs
  • git diff --check
  • Verify checks-node-changed-3 passes for the repaired head.

What I checked:

PR surface

Source +9, Tests +74, Docs +9. Total +92 across 10 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 5 60 51 +9
Tests 3 177 103 +74
Docs 2 13 4 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 250 158 +92

Review metrics

Metric Value Why it matters
Production versus test growth Production +60/−51; tests/support +177/−103 The net nine production lines supply bounded transfers; test growth covers payload limits, partition isolation, rollback, and retry.

Labels

Label changes:

  • add P2: This is a bounded background-maintenance improvement with a concrete test-routing repair, without an established urgent user-facing regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🌊 off-meta tidepool and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This is a bounded background-maintenance improvement with a concrete test-routing repair, without an established urgent user-facing regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🌊 off-meta tidepool and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 16, 2026, 5:26 AM ET / 09:26 UTC.

@steipete
steipete merged commit 3d4ba3e into main Oct 16, 2026
129 checks passed
@steipete
steipete deleted the dbasync/batchaudit3-usage branch October 16, 2026 09:49
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit 'ac03ca0b6d26a7dc55d0d262e40d2549631b1ea7': (25 commits)
  fix: apply shared plugin model policy to decisions (#156621)
  perf: shortlist transcript relevance scores before metadata reads (#174058)
  fix: strip standalone trailing NO_REPLY from replies (#171990)
  fix(ci): avoid repeated discovery during changed-test planning (#174069)
  fix(sqlite): preserve transaction outcomes when warnings throw (#157151)
  fix(ai): native video handoff to chat-completions providers + preflight video cost (#170920)
  fix(litellm): image generation fails when the backend returns image URLs (#173508)
  test(memory,gateway,infra,subagents): remove low-value tests (batch d152) (#174034)
  perf(memory): bound derived worker snapshot and pricing retention (#174067)
  fix(test): reduce eager imports during test startup (#174056)
  refactor(codex): share lifecycle preflight fixtures (#174062)
  test(gateway,matrix,agents,ui): remove low-value tests (batch d150) (#174025)
  perf(infra): batch usage refresh maintenance (#174050)
  fix(gateway): revert cold session list worker regression (#174052)
  refactor(config): consolidate browser meeting configuration (#173947)
  fix(cron): keep global-session deliveries on the selected agent (#173855)
  test(compaction): assert structured stale-writer failure (#174064)
  fix(cli): local terminal chat sends model requests without the configured proxy (#173530)
  test(ui): restore bootstrap preference locale after each case (#174065)
  fix: download session files through the development proxy (#173973)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
Batch stale usage-cache snapshot transfers and exact month deletions under their existing owners. Preserve ordered bounded payloads, the final snapshot-checked prune transaction, rollback, write-receipt invalidation, and effect-time lease checks. Remove repeated body metadata comparisons and per-row staging admission; targeted refresh no longer sends unused prune commands. No schema or public API change.
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 P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M 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