Skip to content

perf(memory): batch incremental indexing and preserve session caches - #170302

Merged
steipete merged 4 commits into
mainfrom
dbasync/memindex
Oct 12, 2026
Merged

steipete merged 4 commits into
mainfrom
dbasync/memindex

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Memory indexing repeatedly rewrites retained chunk metadata, executes chunk/vector writes row by row, and invalidates unrelated session caches after memory-only writes. Transcript export also reloads the full persisted payload on every index pass.

User Impact

Session memory indexing does less database work while preserving settled search results. Freshness timing is unchanged: notifications already coalesce over five seconds, then new text becomes searchable when the background pass and any embedding requests finish. Earlier searches may see the previous index.

No schema, migration, retention, update, or configuration changes.

Why This Change Was Made

The transcript worker keeps a bounded projected snapshot and reads only events appended after its last sequence, rebuilding after a rewrite, reset, or fence change. A cold snapshot still enters the existing archive restoration and corruption-verification path. The cache retains at most 16 transcripts of at most 4 MiB each; larger/evicted transcripts use the full read path. Text parsing still processes the projected records to preserve heartbeat suppression, reset boundaries, provenance, and line mapping.

The index owner plans retained metadata and removals once. Publication skips unchanged chunks and batches chunk, recall metadata, provenance, and vector inserts in bounded groups of 128 within the existing source transaction. Known-ID vector deletes retain sqlite-vec's indexed scalar lookup: native query-plan inspection confirmed that IN batches would scan the full vector index. FTS follows the existing chunk triggers. Memory-only DML now emits a scoped write receipt so it does not evict unrelated session facts; DDL and full database publication keep their broad invalidation.

Removed checks and accepted edges:

  • Removed the publication-time retained-row reread and drift retry. Independently overlapping index plans can temporarily leave a derived retained row missing until a rebuild; canonical transcript data is unchanged.
  • Removed the retained-before-new-row ordering check; the owner supplies its bounded plan, and the kernel handles each row by kind.
  • Reused the admitted vector-table fact and removed the vector-delete target census. A failed vector cleanup still records rebuild debt.

Forget tombstones and publication authority checks remain: they protect a real forget boundary and prevent forgotten material from being republished.

Evidence

  • Memory indexing T1 call sites: 0 → 0. Worker-classified call sites in the touched memory kernels: 8 → 11, because batched writes now execute through the worker-only chunk helper. Shared transcript accessor mixed T1 sites remain 9 → 9; this PR does not claim to remove those other callers. Transcript worker sites remain 14 → 14.
  • Live harness v2: one baseline/candidate pair completed, with ten warmed turns per run. Measurements and attribution are below.
  • Regression coverage: real SQLite/vec batching at 129 chunks; retained metadata freshness; incremental search equals settled full reindex; planned removals preserve FTS results; memory writes preserve cached session reads while a real session write refreshes them; transcript append/no-change/rewrite parity, heartbeat suppression, provenance, and line mapping.
  • Changed-file formatting/basic lint and git diff --check: passed. Codex autoreview: scoped clean in two rounds (full change at P0–P2, CI fixes at P0/P1). Exact-head CI results and separately run static gates are recorded below. All three Knip export scans passed with zero findings (576s total); the full SDK surface check passed (32s), including no unauthorized removals from v2026.10.2. The scoped SDK declaration comparison passed (1,255s) against the existing baseline/candidate worktrees: exactly one additive export, withSqliteDatabaseWriteScope, with no removals or other API changes in sqlite-worker-runtime. The runtime API guardrail also passed 7/7 (235.65s Vitest; 330s wrapper). No additional checkouts were allocated.
  • Diff: 26 files, +672/−322 lines (production +400/−254; tests +257/−68; docs +15/−0).
  • Focused CI diagnosis: session-memory-sync passed 4/4 (52.4s tests); manager-publication-generation passed 6/6 (61.29s suite, 4.35s new invalidation regression). These prove cold restoration/corruption rejection and that session writes still invalidate their own cached reads. Incremental/reset export also passed 10/10 (11.89s tests; new parity case 5.74s).
  • Published-driver update cell does not apply: no update, Doctor, schema/migration, plugin loading, or service lifecycle change.

Live SQL measurements

Baseline 46f4d308d2a1 → candidate da55fb2e8bd8, one completed harness v2 pair under the local CPU gate. Each run contains ten warmed turns; these distributions describe turns within that pair, not three independent pairs. Turn-caused attribution is separate from work merely observed during a turn's wall-clock window. Host: 32 logical CPUs; baseline one-minute load 147.08 → 150.84, candidate 68.28 → 72.42. This loaded-host pair supports operation-count attribution, not a latency claim.

All-thread metric Baseline Candidate
Turn-caused SQL, median [min–max] 193 [192–208] 192 [192–193]
Turn-caused requests, median [min–max] 45 [44–49] 44 [44–45]
Turn-caused SQL / requests, mean 195.1 / 45.9 192.1 / 44.1
Observed-window SQL, median [min–max] 248.5 [208–280] 242.5 [203–254]
Observed-window requests, median [min–max] 64 [51–79] 62 [48–68]
Observed-window SQL / requests, mean 247.0 / 65.3 235.3 / 60.0
Warm MAIN SQL, every turn 0 0
First turn, caused SQL / requests 447 / 82 440 / 80
First turn, observed SQL / requests 735 / 136 727 / 128
First turn MAIN SQL 38 38
Whole workload SQL / requests 7,240 / 1,384 7,083 / 1,297
Whole workload MAIN SQL 841 848

Whole-workload SQL falls 2.17% and requests fall 6.29%. The seven extra whole-workload MAIN statements are outside warmed turns: boot/connect together fall by one statement, while shutdown adds eight statements from an additional integrity-verification close sequence. This is not a warm MAIN increase.

Memory indexing observed during warmed windows falls 39.0 → 32.4 SQL/turn-window (−16.9%) and 10.3 → 9.4 requests/turn-window (−8.7%). This does not reach the 50% indexing target. All observed warmed indexing is background work (no-turn-context); directly turn-caused indexing SQL and requests are zero in both runs. The observer does not retain individual notification payloads, so it cannot distinguish each transcript-change trigger inside that background root. The synchronous turn root (gateway-trace) falls from 1,951 SQL / 459 requests to 1,921 / 441. Unrelated WAL-maintenance background SQL falls 15 → 11.

Memory owner SQL/turn-window, base → candidate Requests/turn-window, base → candidate Background SQL/min, base → candidate Background requests/min, base → candidate
Source reads / replacement 2.4 → 2.1 1.6 → 1.4 29.62 → 32.69 19.74 → 21.79
Chunk rows / metadata / provenance 5.7 → 3.5 0.8 → 0.7 70.34 → 54.48 9.87 → 10.90
Vector rows 2.8 → 2.3 0 → 0 34.55 → 35.80 0 → 0
Embedding cache 4.2 → 3.7 2.4 → 2.1 51.83 → 57.59 29.62 → 32.69
Publication / transaction overhead 11.2 → 9.9 1.4 → 1.4 138.20 → 154.10 17.28 → 21.79
Transcript preparation 12.7 → 10.9 3.3 → 3.1 156.71 → 169.66 40.72 → 48.25
Mixed publication envelopes — 0.8 → 0.7 — 9.87 → 10.90
FTS, explicit statements 0 → 0 0 → 0 0 → 0 0 → 0
Indexing total 39.0 → 32.4 10.3 → 9.4 481.24 → 504.32 127.10 → 146.32

Requests are counted once: vector SQL runs inside mixed publication envelopes, so its separate request count is zero. FTS maintenance follows chunk triggers; internal trigger VM work is not separately observable, and zero explicit FTS statements does not mean no FTS work. No warmed statement referencing memory tables was left outside the indexing classification.

The background rates are higher, not a per-minute reduction: the candidate's observed windows total 38.547 seconds versus 48.624 seconds on baseline. Actual warmed indexing work falls from 390 SQL / 103 requests to 324 / 94, with seven source-replacement envelopes instead of eight. Per-replacement envelope cost also falls: 17.625 → 15.286 SQL (−13.3%); publication overhead remains seven statements per replacement. Batched writes reduce row-count growth: one- and two-chunk candidate passes use 15–16 SQL, compared with 16–22 before. Whole-workload indexing SQL / requests falls 1,086 / 204 → 1,005 / 187, excluding unchanged unclassified setup work.

Shared read families show no increase in actual per-turn counts:

Shared read family Caused SQL/turn, base → candidate Caused requests/turn, base → candidate Observed SQL/turn, base → candidate Observed requests/turn, base → candidate
Exact-entry facts 4.6 → 4.0 4.6 → 4.0 5.4 → 4.7 5.4 → 4.7
Actor hydration 2.6 → 2.0 2.6 → 2.0 2.6 → 2.0 2.6 → 2.0
Entry-cache snapshots 0 → 0 0 → 0 1.8 → 1.8 0.9 → 0.9
Row facts 0 → 0 0 → 0 0.1 → 0 0.1 → 0
Watermarks 1.0 → 1.0 1.0 → 1.0 2.1 → 2.0 2.1 → 2.0
Broader entry-primary reads 18.6 → 18.0 16.6 → 16.0 19.5 → 18.7 17.5 → 16.7

Shared families overlap and must not be summed. Their stable-or-lower counts, lower per-replacement cost, and zero warmed MAIN support landing; the single-pair background-per-minute increase and the missed 50% target remain explicit limits of this result.

Final CI and inherited failures

Final run: https://github.com/openclaw/openclaw/actions/runs/38316913763, head da55fb2e8bd8381dc7b71e60731d8b9f59783df3.

Production types, all five core test-type shards, general test types, core/extension type-aware lint, source contracts/export-collision checks, Madge (zero cycles), boundaries, and database worker/T1/dialect ratchets passed on the final CI head.

The changed memory test files passed: source-index kernel (6 cases), vector writer (5), publication transfer (24), publication generation (6), session delta (1), and shadow owner (4). Their summed assertion times in CI were 0.274s, 0.045s, 10.382s, 5.768s, 4.185s, and 1.351s respectively; these exclude fixture/worker startup. Incremental transcript/reset export separately passed all 10 cases during focused diagnosis (11.89s tests, 88.90s Vitest total, 108.09s wrapper wall time).

The remaining failed test jobs are covered by the campaign's inherited-failure exception. This is not an all-green CI claim:

Failed job Failure and attribution
extensions-bundle-1 One observation-close and 36 Copilot transcript cases: runtime config not prepared. Fixture/config/corpus inputs are byte-identical across baseline, candidate and inspected main. Exact Copilot signature already has main-replay evidence in the campaign failure inbox.
extensions-bundle-2 Eleven reindex-recovery cases: same runtime-config preparation failure, already assigned to the recovery-fixture owner. Relevant source/fixtures match baseline and inspected main.
extensions-bundle-3 Two watcher-config and one watcher-filesystem cases: same missing runtime-config preparation. Unchanged fixture/config/corpus inputs and existing campaign attribution.
compact-large-23 Native Talk current-turn custody case aborts during async-work-scope close. Same failure independently recorded on another PR; test and relevant scope/admission owners are unchanged here. Source-attributed to the lifecycle change in #170231; cached main passed, so no executed-main failure is claimed.

For the memory fixtures, scheduled main 38305224828 also shows the runtime-config error class, but does not run every exact fixture above. An attempted baseline watcher replay was intentionally stopped before assertions; it is not counted as passing or failing proof. All inherited failures are handed to the existing red-main owners rather than hidden or relabeled green.

ClawSweeper's vector-delete finding on the preceding head is fixed in the final head: both known-ID paths use scalar point lookups, and the native regression checks the resulting query plan. No rereview is required by the campaign landing rules.

@clawsweeper

clawsweeper Bot commented Oct 12, 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 extensions: memory-core Extension: memory-core scripts Repository scripts plugin: file-transfer size: L labels Oct 12, 2026
@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: 🦪 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. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR batches memory-index publication, reuses projected transcript prefixes, and preserves session caches across memory-only writes.

Example: Publish 129 new memory chunks with embeddings.

  • Before: Chunk, recall, provenance, and vector inserts execute separately for each chunk.
  • After: Those inserts execute in two bounded groups, while vector deletions retain indexed scalar lookups.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful owner-directed optimization with both prior findings resolved; harness evidence supports the design, but live performance claims remain unmeasured and failed CI checks are not fully classified.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied evidence is regression coverage through real SQLite and worker owners, while the body still marks live baseline/candidate measurements pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Background session indexing performs repeated database and transcript preparation work that competes with other Gateway activity.
Reason: The maintainer-authored direction targets concrete repeated work and explicitly records the accepted derived-index tradeoffs without adding configuration.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored PR open: it adds useful indexing optimizations, resolves both prior findings, and introduces no concrete new defect identified in this review; CI failure attribution remains unsettled.

Priority: P2
Reviewed head: da55fb2e8bd8381dc7b71e60731d8b9f59783df3

Before merge

  • Complete next step - Classify the three failed extension bundles and the Talk teardown failure against the pinned base, repairing only failures introduced by this PR.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not yet show baseline/candidate background indexing through a running Gateway with settled search parity and measured cache reuse.
Agent review details

How this fits together

Session transcript workers prepare searchable text, the memory manager plans chunk changes, and publication workers update the derived SQLite index consumed by memory search.

flowchart LR
  A[Session transcripts] --> B[Transcript worker]
  B --> C[Projected snapshot cache]
  C --> D[Memory index planner]
  D --> E[Publication worker]
  E --> F[SQLite memory index]
  F --> G[Memory search]
Loading

Technical review

Best possible solution:

Retain the bounded worker-owned optimization with scalar vector deletes and the existing transcript, forget, and publication boundaries.

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

The base source establishes repeated scalar inserts, full transcript payload loading, and broad memory-write invalidation; this read-only review did not execute a runtime reproduction.

Is this the best way to solve the issue?

The changes stay within the existing transcript and publication owners, remove replaced helpers, and preserve indexed vector deletion after the prior review correction.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Chunk publication statements changes intended behavior with a stated reason (6a1160a: Reuse typed, lazily prepared statements per nonempty source while preserving stored values and transaction ownership.)
  • Retained-row validation and drift retry changes intended behavior with a stated reason (e5c74ed: Validate retained rows under the publication lock and retry a full replacement when a retained row disappeared.)
  • Vector replacement failure behavior keeps the original intent (a8be1cf: Reuse deletion and insertion statements while allowing insertion attempts after deletion failures.)
  • Whole-source sparse vector cleanup changes intended behavior with a stated reason (1349c4c: Use bounded point deletes for small sources and one scan for larger sources, preserving atomic cleanup and rebuild debt.)
  • Projected transcript export keeps the original intent (30e67db: Retain only memory-consumed event fields while preserving export content, provenance, line ordinals, and snapshot fences.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 6a1160a adds extensions/memory-core/src/memory/manager-chunk-writer.ts:32 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6a1160acffb2; files: extensions/memory-core/src/memory/manager-chunk-writer.ts)
  • Wang Rui: Raw commit e5c74ed adds extensions/memory-core/src/memory/manager-session-delta.ts:19 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e5c74ed21cb5; files: extensions/memory-core/src/memory/manager-session-delta.ts)
  • Vincent Koc: Raw commit ba34052 adds extensions/memory-core/src/memory/manager-vector-write.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ba34052a0e1b; files: extensions/memory-core/src/memory/manager-vector-write.ts)

PR surface

Source +145, Tests +189, Docs +15, Other +1. Total +350 across 26 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 16 399 254 +145
Tests 7 257 68 +189
Docs 2 15 0 +15
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 26 672 322 +350

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is a focused indexing efficiency improvement rather than an established urgent user-facing regression.
  • merge-risk: 🚨 compatibility: The PR expands a public Plugin SDK export and changes derived-index publication behavior; the maintainer-authored direction explicitly accepts the documented tradeoffs, and no breaking signature or persisted-format change was identified.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-12T22:09:31.161Z sha f11188a :: needs changes before merge. :: [P2] Keep vector deletions on sqlite-vec's point-lookup path | [P2] Append message fixtures through the message writer
  • reviewed 2026-10-12T22:26:59.327Z sha e49a7d0 :: needs changes before merge. :: [P2] Keep vector deletions on sqlite-vec's point-lookup path

Reviewed October 12, 2026, 6:45 PM ET / 22:45 UTC (Revision 3).

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 12, 2026
@steipete
steipete merged commit a00f582 into main Oct 12, 2026
146 of 152 checks passed
@steipete
steipete deleted the dbasync/memindex branch October 12, 2026 23:11
steipete added a commit that referenced this pull request Oct 13, 2026
…#170511)

## What Problem This Solves

Consolidate duplicate extension paths and remove speculative lifecycle defenses in Codex, Memory Core, Microsoft Teams, Matrix, Reef, and Workboard. The candidate removes **522 net production lines** (tests, fixtures, generated files, declaration files, and documentation excluded; both new production modules included). This uses the campaign's honest 500–999-line fallback after the scoped growth/largest-first pass; it does not remove features to reach a quota.

Workboard's four card actions now share one discriminated action component, its draft controls share one renderer, and menu-only pass-through components are gone. Reef's worker and released-host adapters share one pure seven-command trust-transition policy while retaining their own atomic storage boundaries. Teams reuses its Graph/context/setup owners. Memory keeps normal parallel-query and sync-generation retirement draining, expressed with simpler active-completion tracking rather than nested borrower wrappers.

An adjacent Workboard defect is fixed: conditional Solid fragments could run a popover ref before the preceding trigger entered the document, positioning the details menu at the page origin. Listener/anchor setup now runs after the DOM commit. The regression fails against the unchanged implementation and passes with this repair.

No SDK export, config, protocol, dependency, database schema, durability, retention, or permission contract is changed. The protected standalone session-memory backend is untouched. No changelog edit.

User impact: Workboard details menus anchor to their trigger instead of the page origin. Other changes simplify internal implementation, with the best-effort timing and diagnostic compromises below; no migration or operator action is required.

## Best-effort tradeoffs accepted

- Codex diagnostic accessors throwing or mutable transport identities: [#163388](#163388) adds synthetic throwing-accessor coverage, not an actual-use human report. Actual accessors are local reads and registration publishes frozen identities. Accessor programmer errors now surface; the diagnostic sink catch, disclosure allowlist, attempt isolation, and timeout/cleanup behavior remain.
- Offline Codex migration CAS conflicts: [#168479](#168479) introduced retry loops without a human competing-writer report. Gateway ownership excludes live foreign writers. One atomic attempt plus existing persisted-result validation now retains the source sidecar and reports a warning on conflict; a later Doctor run can retry.
- Retired Codex legacy JSON rewritten during migration: [#104504](#104504) added a synthetic locator-rewrite test; human [#104503](#104503) concerns fingerprint overflow, whose fix remains. Legacy indexes are offline inputs, so a second locator/lifecycle read is removed. Initial containment/malformed-owner validation and canonical session ownership checks remain; unsupported concurrent legacy edits are picked up next run.
- Memory manager acquisition repeatedly retrying failed global retirement: [#144252](#144252) has synthetic close failures, no human incident requiring recursive acquisition recovery. Acquisition now awaits the pending close once and reports its error; the retirement owner is retained and explicit close can retry.
- Abandoned, abort-ignoring memory diagnostic probes holding provider retirement indefinitely: [#113471](#113471) and [#166973](#166973) provide synthetic lifecycle proof, not a human abandoned-probe incident. Timed-out read-only diagnostics no longer retain a redundant inner borrower. Ordinary active searches, sync generations, healthy operations, and custom closable-provider draining remain protected.
- Teams simultaneous Gateway writers: [#88411](#88411) introduced the persistence migration/file lock without a human multi-Gateway incident and did not test live tenant traffic. The Gateway is the sole database owner. Removed cross-process stale-lock/backoff machinery; local FIFO remains. Unsupported simultaneous processes may overwrite each other rather than coordinate.
- Workboard stale cache publication and an exact-expiry late join: [#165896](#165896), [#165141](#165141), and [#165698](#165698) use synthetic performance/interleaving controls, not a human incident. One read may return an older projection/fallback; normal revision/age invalidation refreshes it next read. Measured caching, the 64-entry bound, and read authority remain.
- Workboard direct stop/start before asynchronous startup settles: [#146976](#146976) forces unsupported lifecycle ordering in a test. The host service owner already awaits raw startup before stop. Removed plugin-local generation/startup handoff; supported host lifecycle is unchanged, unsupported direct reentry no longer has a second lifecycle owner.
- Reef failed owner-notice dispatch/ack retry timing: [#109160](#109160) pins injected failures and exponential timers, without a human report requiring that second scheduler. Durable pending notices now retry during ordinary successful 30-second reconciliation or restart. A failed acknowledgement may redispatch conservative stop-only guidance; durable resend reservation/cooldown prevents granting a second resend. The per-peer queue also makes the removed in-flight set redundant.
- Reef synchronous intermediate lease theft: [#109380](#109380) and [#168340](#168340) describe synthetic interleavings, not human concurrent-writer incidents. SDK callbacks commit synchronously and there is no await between acquisition and settlement. Unsupported reentrant callbacks/foreign writers are no longer checked at every intermediate step. Initial acquisition, final head-owner check, staged recovery, uncertain-commit witness, rollback, and retention ordering remain.
- Workboard fabricated native event targets and repeated widget predicates: renderer port [#168606](#168606) added boilerplate without a human incident. JSX native bindings already guarantee `currentTarget` types, and the owning menu already excludes widgets. Fabricated direct handler calls may throw; real event dispatch, widget behavior, and untrusted `event.target` checks are unchanged.

## Coverage ledger

Discovery began with scoped three-day growth, then fourteen-day history and largest production owners. Each removed mechanism was checked against its introduction and current callers; no dormant/in-flight foundation was deleted. Exact and normalized duplicate scans informed structural inspection, not automatic rewrites.

| Owner / original location | Decision and evidence |
| --- | --- |
| Codex `app-server/request-diagnostics.ts:28,109,133` | Remove speculative accessor catches/identity copy; keep timeout sink and disclosure boundary (#163388). |
| Codex `command-handler-actions.ts:109` | Share sandbox/execution result assembly; preserve policy selectors, guards, currentness and release. |
| Codex `migration/session-binding-sidecars.ts:460,549,627` | Single CAS attempt and one legacy-input read; preserve sidecar on conflict and canonical effect validation (#168479, #104504). |
| Codex `installed-probe.ts:29`, native session preparation/monitor | KEEP isolated managed storage, credentials, native execution authority and ordinary write settlement. Upstream configuration/storage contract inspected directly. |
| Memory `memory/search-deadline.ts:42` | One rejected cancellation promise replaces sentinel race; preserve cancellation/error identity, abort ordering, wall-clock guard and cleanup (#95757, #147702). |
| Memory `manager-embedding-ops.ts:84`, `manager-registry.ts:264` | Simplify nested borrower bookkeeping and failed-close recovery; preserve outer leases, normal drain and documented retiring-cache fence (#113471, #166973, #144252). An initially broader removal was rejected during review. |
| Memory publication, database context, index generation, transfer and cache owners | KEEP user-data transaction/publication, Forget exclusion, bounded transfers, worker ownership, integrity, performance caches and normal shutdown settlement (#168860, #169164, #169251, #170183, #170302, #170407). |
| Memory paused deadlines, Unicode query, KNN/vector scan, watchers | KEEP human-reported SQLite stalls (#137056), dependency tokenizer behavior, external/native input validation, bounded resources and realistic cancellation. |
| Memory dreaming/REM, migration/repair, backfill and standing intents | KEEP user-facing features, privacy/source validation, persisted rollback and public formats. Phase E untouched. |
| Teams `sqlite-state.ts:27`, `graph.ts:85,177` | Remove redundant foreign-writer lock; one guarded Graph transport retains auth/SSRF, bounded parsing and release (#88411). |
| Teams `setup-surface.ts:102`, `graph-group-management.ts:32,96`, `channel.ts:267` | Consolidate identical saves/context/pending result bookkeeping; preserve provider-specific validation, labels, errors, ordering and direct results (#112811). |
| Matrix `matrix/actions/reactions.ts:135` | Remove duplicate missing-sender/empty-result guards; selector remains ownership boundary, empty list has no redactions. |
| Matrix crypto store, verification, readiness, send FIFO and thread binding owners | KEEP room-key durability, real throwing dependency getters, encryption/send authority, public compatibility and accepted writes (#160707, #70401, #163012, #168485, #169405). |
| Teams pending-upload dual owners | HOLD: persisting currently memory-only reply consent bytes would change privacy/persistence; deleting SQLite loses restart recovery. Needs an explicit policy choice, not a deslop shortcut. |
| Teams streaming, multi-account configuration and exported setup factory | KEEP Stop/partial-delivery/FIFO, credential isolation and published factory signature (#141348, #112811). |
| Reef `trust-state-operation.ts:164`, `trust-store.legacy.ts:115` | Share pure seven-command transitions, retain worker/native atomic adapters, schema checks, trust revisions and authorization (#168340). |
| Reef `owner-notice.ts:32,72,122,253`, `audit-state.legacy.ts:145–255` | Remove duplicate retry scheduler/in-flight set and synchronous intermediate lease checks; preserve durable recovery/security (#109160, #109380). |
| Reef released-host adapter and trust delivery settlement | KEEP declared host compatibility, accepted-write shutdown settlement, peer/key authority and user-data crash recovery. |
| X events/allowlist/verification | KEEP paid-event settlement, bounded polling and credential/access authority. |
| llama.cpp media/provider/install/orphan owners | KEEP confidentiality of local inputs, digest cache integrity and safe process identity before termination (#167902). |
| ClawRouter pool/dashboard | KEEP untrusted network projection, bounded responses and active features; no useful large duplicate justified added abstraction. |
| Workboard `view-card-actions.tsx:215`, `view-card.tsx:102`, `view-draft-choices.tsx:6` | Consolidate actions, menu wrappers and card/bulk draft controls; all callers migrated (#168606). |
| Workboard native handlers and `view-popover.ts:19` | Drop impossible bound-target guards; repair ordinary conditional-fragment anchor timing (#168606). |
| Workboard `sessions-board.ts:149,305`, `change-events.ts:6`, `gateway.ts:211` | Remove duplicate cache/lifecycle fences; share workspace input preparation while retaining workspace/security effect checks. |
| Workboard draft/focus/pending-write/editor, board save and label measurement owners | KEEP real unsaved input, async writes, keyboard focus, live-authority checks and measured layout batching. |

## Evidence

All local build/test/CLI commands use task-owned HOME, OpenClaw state/config and XDG directories. No real Gateway or user state is used. No timeout increases, retries, skips, new suppressions or weakened retained-behavior baselines.

Final proof receipts and exact-head CI attribution are recorded below. Cold compiled-worker preparation dominates several local timings; these are not CI timings or live-provider claims.

| Focused local proof | Result / wall cost |
| --- | --- |
| Codex request diagnostics | 14/14 pass; wrapper445.55s (cold worker/import dominated). |
| Codex commands + Doctor contract | 122/123 pass; wrapper1352.60s. Doctor contract passes. The one method-list assertion (`commands.test.ts:951`) also observes background monitor `thread/read` calls. It **reproduces with explicit clean-base source loaded from `56715acf0e5943edecd34fa6f451532cfa9d5f35`**: extra reads followed by the expected `thread/resume`, selected-case8.411s/Vitest403.28s. The affected test/support/actions/bindings/monitor files are byte-unchanged between that base and pinned main. No test skips or timing changes were added;99 unrelated cases were unselected for attribution. |
| Workboard backend (sessions-board, Gateway, change-events, registration lifecycle) | 48/48 pass, four files; wrapper587.54s, Vitest545.18s. |
| Workboard entire browser scope before final followups; final affected browser suites | 237/237 across29 files in59.03s; final103/103 across6 files in31.95s. New popover regression1/1 in9.34s; unchanged source fails intended geometry assertion in14.57s. |
| Workboard actual compiled WebKit consumer | Pass: anchored menu, filter keyboard dismissal, nested Escape preserving dialog, focus return, zero page errors. |
| Reef trust/friends/audit/receipt/outbound/notifier | 119/119 across6 files; wrapper927.25s, including cold worker compilation. Earlier unchanged channel proof25/25 pass. |
| Teams sqlite/Graph/read authority/setup | 72/72 across5 files; wrapper385.62s. |
| Teams Graph contexts/actions | 73/73 across3 files; wrapper327.91s. |
| Teams mutation callers/setup policy | 42/42 across5 files; wrapper776.30s. |
| Teams resolver + existing channel tests | Resolver4/4 pass; existing channel44 pass/2 fail, wrapper550.01s. **Both failures reproduce on full pinned main `3c63da22f046b15db9d56cf35769f20b398b8c9b`**,44 pass/2 fail, wrapper464.42s: approval-monitor startup timeout120000ms (`channel.test.ts:313`) and subsequent `MSTeams runtime not initialized` (`runtime-store.ts:85` → `monitor.ts:81` → `channel.test.ts:970`). No budgets changed; the second appears cascading, not separately diagnosed. |
| Matrix reaction ownership | 11/11 pass; wrapper339.25s. |
| Lint suppression contracts | 3/3 pass on frozen candidate; wrapper48.94s. No new suppressions. |
| Architecture | Zero runtime value cycles; zero static/Madge components. |

Memory owner/sibling proof: 108/109 pass across nine files, wrapper939.49s. The only failure was this patch's newly authored assertion expecting the provider's raw close error instead of the owner's existing normalized diagnostic. After correcting that assertion without a production change, its exact case passed (4.389s execution, Vitest350.74s, wrapper373.90s, dominated by transforms). The other twelve registry cases were unselected in that focused invocation, not skipped in source. Together the runs prove all109 selected contracts, including actual-query retirement, shutdown drain, fallback/reload, healthy probe, transport and deadline behavior.

Local tooling notes: the first changed-file run required removing one now-unused assertion-safety allowance. The corrected run passed conflict markers (27.14s), line-cap (4.43s), max-lines (69.87s), and assertion-safety (183.85s), then was intentionally stopped after the full-source SQLite worker inventory produced no result for 681.03s. This was incomplete local proof, not a passing inventory or an inherited source failure. Native production and test extension typegraphs both pass. Scoped lint could not begin analysis because SDK declaration preparation hit its unchanged 300000ms budget, both in the earlier Reef attempt and the final scoped attempt; neither produced a lint diagnostic. Final exact-head hosted CI below closes both gaps, with inventories running on the PR's frozen merge tree. Two custom-config attribution attempts were abandoned for harness setup failures; they are not behavior proof. Teams attribution above uses a normal full-main export and normal harness. No remote lease, live Teams tenant or live provider proof is claimed.

Final formatting: all changed source/test/doc files pass. Plugin boundary report passes (zero eligible compatibility removals); UI localization verification passes. No public SDK files/exports or package manifests changed, so an SDK API-surface diff is not applicable.

Independent review reported one P2 about an older Workboard read replacing newer `lastKnown` fallback facts before a subsequent backend outage. Declined as the explicitly accepted cache tradeoff, not silently ignored: fallback is presentation-only, availability remains visible, the next successful read repairs it, and `move` independently rereads authoritative facts/scope before its guarded write. The introducing controls are synthetic (#165896/#165141); no user-data, authorization, or persisted-write invariant is relaxed.

First hosted CI run `38334064250` on `dabbd9208a20068c24e6901b41a13415c04ac856` completed with two owned lint failures: `check-lint-extensions-2` (explicit boolean and exhaustive return in Reef) and `check-lint-extensions-3` (default generic argument/Promise iterable in Memory, exhaustive return/shadowed local in Workboard). Its `openclaw/ci-gate` failure aggregates those two jobs. All other planned jobs passed, including SQLite inventories, source contracts, types, extension tests, and QA smoke. The focused correction adds five production lines. The first PR-evidence run also failed because this body's headings did not match the required template; corrected headings passed in run `38334357043`. Metadata auto-response cancellations and the superseded evidence run contain no product test suite. No inherited-failure exception is being claimed for these owned failures.

**Final exact-head CI passes:** [run 38335564816](https://github.com/openclaw/openclaw/actions/runs/38335564816) on `b86c1ba06fa325f178007ba736c294cdd67a566d`, including `openclaw/ci-gate`, both extension-lint stripes, full inventories/ratchets, source contracts, typegraphs, selected extension bundles, security, and all QA smoke profiles. This closes the local inventory/lint tooling gaps described above. All exact-head check runs were enumerated; no failed, cancelled, timed-out, or pending check remains. No admin exception, manual rerun, dispatch, or rebase was used. CI job wall seconds: extension bundles 1/2/3/4-1/4-2/5 = 210/160/183/247/137/229; extension lint stripes 2/3 = 145/91; baseline ratchets = 271. These are parallel job wall times including setup, not added test execution time.

The lint-only correction also passes native production types, formatting, suppression contracts (3/3; 65.59s wrapper), runtime cycles (0), static/Madge cycles (0), Workboard actions (32/32; 17.93s) and popover (1/1; 16.16s), plus Reef trust/Memory provider lifecycle (51/51; 401.38s Vitest, 445.49s wrapper). Independent review of that delta is scoped-clean at P0–P2; the original explicitly declined display-cache tradeoff remains documented above.

## Visual proof

Before/after attachments show the actual built Workboard plugin against synthetic fixture data. Before: details menu at the page origin. After: anchored to its trigger. No pixel-identical claim across fixture timestamps.

![Before: synthetic Workboard details menu at the page origin](https://github.com/user-attachments/assets/4051b726-6af0-45fe-a0b6-e896b1c33a40)

![After: synthetic Workboard details menu anchored to its trigger](https://github.com/user-attachments/assets/26de3267-537f-46ef-b477-1adb5b0de290)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…penclaw#170302)

Cache bounded projected transcript prefixes and read only appended events between rewrites. Plan retained-row metadata and removals once, batch chunk and vector inserts in the existing publication transaction, and publish memory-only write scopes without evicting unrelated session caches. Keep scalar indexed sqlite-vec deletes and real forget/publication authority checks.

Preserve the existing five-second indexing coalescing window and settled recall results. No schema, migration, update, retention, or configuration change.

A completed baseline/candidate harness pair reduced observed warmed indexing from 39.0 to 32.4 statements and 10.3 to 9.4 requests per window; warmed main-thread SQL remains zero. The 50% aim was not reached and normalized background rates increased on the shorter candidate windows. Detailed owner attribution and limitations are recorded in the PR.

Affected behavior regressions and static gates passed. The PR documents the inherited runtime-config fixture and native Talk failures used for the authorized landing exception.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…openclaw#170511)

## What Problem This Solves

Consolidate duplicate extension paths and remove speculative lifecycle defenses in Codex, Memory Core, Microsoft Teams, Matrix, Reef, and Workboard. The candidate removes **522 net production lines** (tests, fixtures, generated files, declaration files, and documentation excluded; both new production modules included). This uses the campaign's honest 500–999-line fallback after the scoped growth/largest-first pass; it does not remove features to reach a quota.

Workboard's four card actions now share one discriminated action component, its draft controls share one renderer, and menu-only pass-through components are gone. Reef's worker and released-host adapters share one pure seven-command trust-transition policy while retaining their own atomic storage boundaries. Teams reuses its Graph/context/setup owners. Memory keeps normal parallel-query and sync-generation retirement draining, expressed with simpler active-completion tracking rather than nested borrower wrappers.

An adjacent Workboard defect is fixed: conditional Solid fragments could run a popover ref before the preceding trigger entered the document, positioning the details menu at the page origin. Listener/anchor setup now runs after the DOM commit. The regression fails against the unchanged implementation and passes with this repair.

No SDK export, config, protocol, dependency, database schema, durability, retention, or permission contract is changed. The protected standalone session-memory backend is untouched. No changelog edit.

User impact: Workboard details menus anchor to their trigger instead of the page origin. Other changes simplify internal implementation, with the best-effort timing and diagnostic compromises below; no migration or operator action is required.

## Best-effort tradeoffs accepted

- Codex diagnostic accessors throwing or mutable transport identities: [openclaw#163388](openclaw#163388) adds synthetic throwing-accessor coverage, not an actual-use human report. Actual accessors are local reads and registration publishes frozen identities. Accessor programmer errors now surface; the diagnostic sink catch, disclosure allowlist, attempt isolation, and timeout/cleanup behavior remain.
- Offline Codex migration CAS conflicts: [openclaw#168479](openclaw#168479) introduced retry loops without a human competing-writer report. Gateway ownership excludes live foreign writers. One atomic attempt plus existing persisted-result validation now retains the source sidecar and reports a warning on conflict; a later Doctor run can retry.
- Retired Codex legacy JSON rewritten during migration: [openclaw#104504](openclaw#104504) added a synthetic locator-rewrite test; human [openclaw#104503](openclaw#104503) concerns fingerprint overflow, whose fix remains. Legacy indexes are offline inputs, so a second locator/lifecycle read is removed. Initial containment/malformed-owner validation and canonical session ownership checks remain; unsupported concurrent legacy edits are picked up next run.
- Memory manager acquisition repeatedly retrying failed global retirement: [openclaw#144252](openclaw#144252) has synthetic close failures, no human incident requiring recursive acquisition recovery. Acquisition now awaits the pending close once and reports its error; the retirement owner is retained and explicit close can retry.
- Abandoned, abort-ignoring memory diagnostic probes holding provider retirement indefinitely: [openclaw#113471](openclaw#113471) and [openclaw#166973](openclaw#166973) provide synthetic lifecycle proof, not a human abandoned-probe incident. Timed-out read-only diagnostics no longer retain a redundant inner borrower. Ordinary active searches, sync generations, healthy operations, and custom closable-provider draining remain protected.
- Teams simultaneous Gateway writers: [openclaw#88411](openclaw#88411) introduced the persistence migration/file lock without a human multi-Gateway incident and did not test live tenant traffic. The Gateway is the sole database owner. Removed cross-process stale-lock/backoff machinery; local FIFO remains. Unsupported simultaneous processes may overwrite each other rather than coordinate.
- Workboard stale cache publication and an exact-expiry late join: [openclaw#165896](openclaw#165896), [openclaw#165141](openclaw#165141), and [openclaw#165698](openclaw#165698) use synthetic performance/interleaving controls, not a human incident. One read may return an older projection/fallback; normal revision/age invalidation refreshes it next read. Measured caching, the 64-entry bound, and read authority remain.
- Workboard direct stop/start before asynchronous startup settles: [openclaw#146976](openclaw#146976) forces unsupported lifecycle ordering in a test. The host service owner already awaits raw startup before stop. Removed plugin-local generation/startup handoff; supported host lifecycle is unchanged, unsupported direct reentry no longer has a second lifecycle owner.
- Reef failed owner-notice dispatch/ack retry timing: [openclaw#109160](openclaw#109160) pins injected failures and exponential timers, without a human report requiring that second scheduler. Durable pending notices now retry during ordinary successful 30-second reconciliation or restart. A failed acknowledgement may redispatch conservative stop-only guidance; durable resend reservation/cooldown prevents granting a second resend. The per-peer queue also makes the removed in-flight set redundant.
- Reef synchronous intermediate lease theft: [openclaw#109380](openclaw#109380) and [openclaw#168340](openclaw#168340) describe synthetic interleavings, not human concurrent-writer incidents. SDK callbacks commit synchronously and there is no await between acquisition and settlement. Unsupported reentrant callbacks/foreign writers are no longer checked at every intermediate step. Initial acquisition, final head-owner check, staged recovery, uncertain-commit witness, rollback, and retention ordering remain.
- Workboard fabricated native event targets and repeated widget predicates: renderer port [openclaw#168606](openclaw#168606) added boilerplate without a human incident. JSX native bindings already guarantee `currentTarget` types, and the owning menu already excludes widgets. Fabricated direct handler calls may throw; real event dispatch, widget behavior, and untrusted `event.target` checks are unchanged.

## Coverage ledger

Discovery began with scoped three-day growth, then fourteen-day history and largest production owners. Each removed mechanism was checked against its introduction and current callers; no dormant/in-flight foundation was deleted. Exact and normalized duplicate scans informed structural inspection, not automatic rewrites.

| Owner / original location | Decision and evidence |
| --- | --- |
| Codex `app-server/request-diagnostics.ts:28,109,133` | Remove speculative accessor catches/identity copy; keep timeout sink and disclosure boundary (openclaw#163388). |
| Codex `command-handler-actions.ts:109` | Share sandbox/execution result assembly; preserve policy selectors, guards, currentness and release. |
| Codex `migration/session-binding-sidecars.ts:460,549,627` | Single CAS attempt and one legacy-input read; preserve sidecar on conflict and canonical effect validation (openclaw#168479, openclaw#104504). |
| Codex `installed-probe.ts:29`, native session preparation/monitor | KEEP isolated managed storage, credentials, native execution authority and ordinary write settlement. Upstream configuration/storage contract inspected directly. |
| Memory `memory/search-deadline.ts:42` | One rejected cancellation promise replaces sentinel race; preserve cancellation/error identity, abort ordering, wall-clock guard and cleanup (openclaw#95757, openclaw#147702). |
| Memory `manager-embedding-ops.ts:84`, `manager-registry.ts:264` | Simplify nested borrower bookkeeping and failed-close recovery; preserve outer leases, normal drain and documented retiring-cache fence (openclaw#113471, openclaw#166973, openclaw#144252). An initially broader removal was rejected during review. |
| Memory publication, database context, index generation, transfer and cache owners | KEEP user-data transaction/publication, Forget exclusion, bounded transfers, worker ownership, integrity, performance caches and normal shutdown settlement (openclaw#168860, openclaw#169164, openclaw#169251, openclaw#170183, openclaw#170302, openclaw#170407). |
| Memory paused deadlines, Unicode query, KNN/vector scan, watchers | KEEP human-reported SQLite stalls (openclaw#137056), dependency tokenizer behavior, external/native input validation, bounded resources and realistic cancellation. |
| Memory dreaming/REM, migration/repair, backfill and standing intents | KEEP user-facing features, privacy/source validation, persisted rollback and public formats. Phase E untouched. |
| Teams `sqlite-state.ts:27`, `graph.ts:85,177` | Remove redundant foreign-writer lock; one guarded Graph transport retains auth/SSRF, bounded parsing and release (openclaw#88411). |
| Teams `setup-surface.ts:102`, `graph-group-management.ts:32,96`, `channel.ts:267` | Consolidate identical saves/context/pending result bookkeeping; preserve provider-specific validation, labels, errors, ordering and direct results (openclaw#112811). |
| Matrix `matrix/actions/reactions.ts:135` | Remove duplicate missing-sender/empty-result guards; selector remains ownership boundary, empty list has no redactions. |
| Matrix crypto store, verification, readiness, send FIFO and thread binding owners | KEEP room-key durability, real throwing dependency getters, encryption/send authority, public compatibility and accepted writes (openclaw#160707, openclaw#70401, openclaw#163012, openclaw#168485, openclaw#169405). |
| Teams pending-upload dual owners | HOLD: persisting currently memory-only reply consent bytes would change privacy/persistence; deleting SQLite loses restart recovery. Needs an explicit policy choice, not a deslop shortcut. |
| Teams streaming, multi-account configuration and exported setup factory | KEEP Stop/partial-delivery/FIFO, credential isolation and published factory signature (openclaw#141348, openclaw#112811). |
| Reef `trust-state-operation.ts:164`, `trust-store.legacy.ts:115` | Share pure seven-command transitions, retain worker/native atomic adapters, schema checks, trust revisions and authorization (openclaw#168340). |
| Reef `owner-notice.ts:32,72,122,253`, `audit-state.legacy.ts:145–255` | Remove duplicate retry scheduler/in-flight set and synchronous intermediate lease checks; preserve durable recovery/security (openclaw#109160, openclaw#109380). |
| Reef released-host adapter and trust delivery settlement | KEEP declared host compatibility, accepted-write shutdown settlement, peer/key authority and user-data crash recovery. |
| X events/allowlist/verification | KEEP paid-event settlement, bounded polling and credential/access authority. |
| llama.cpp media/provider/install/orphan owners | KEEP confidentiality of local inputs, digest cache integrity and safe process identity before termination (openclaw#167902). |
| ClawRouter pool/dashboard | KEEP untrusted network projection, bounded responses and active features; no useful large duplicate justified added abstraction. |
| Workboard `view-card-actions.tsx:215`, `view-card.tsx:102`, `view-draft-choices.tsx:6` | Consolidate actions, menu wrappers and card/bulk draft controls; all callers migrated (openclaw#168606). |
| Workboard native handlers and `view-popover.ts:19` | Drop impossible bound-target guards; repair ordinary conditional-fragment anchor timing (openclaw#168606). |
| Workboard `sessions-board.ts:149,305`, `change-events.ts:6`, `gateway.ts:211` | Remove duplicate cache/lifecycle fences; share workspace input preparation while retaining workspace/security effect checks. |
| Workboard draft/focus/pending-write/editor, board save and label measurement owners | KEEP real unsaved input, async writes, keyboard focus, live-authority checks and measured layout batching. |

## Evidence

All local build/test/CLI commands use task-owned HOME, OpenClaw state/config and XDG directories. No real Gateway or user state is used. No timeout increases, retries, skips, new suppressions or weakened retained-behavior baselines.

Final proof receipts and exact-head CI attribution are recorded below. Cold compiled-worker preparation dominates several local timings; these are not CI timings or live-provider claims.

| Focused local proof | Result / wall cost |
| --- | --- |
| Codex request diagnostics | 14/14 pass; wrapper445.55s (cold worker/import dominated). |
| Codex commands + Doctor contract | 122/123 pass; wrapper1352.60s. Doctor contract passes. The one method-list assertion (`commands.test.ts:951`) also observes background monitor `thread/read` calls. It **reproduces with explicit clean-base source loaded from `9b5bac5de29fac5a2df162265bbf01b6fb82e6ed`**: extra reads followed by the expected `thread/resume`, selected-case8.411s/Vitest403.28s. The affected test/support/actions/bindings/monitor files are byte-unchanged between that base and pinned main. No test skips or timing changes were added;99 unrelated cases were unselected for attribution. |
| Workboard backend (sessions-board, Gateway, change-events, registration lifecycle) | 48/48 pass, four files; wrapper587.54s, Vitest545.18s. |
| Workboard entire browser scope before final followups; final affected browser suites | 237/237 across29 files in59.03s; final103/103 across6 files in31.95s. New popover regression1/1 in9.34s; unchanged source fails intended geometry assertion in14.57s. |
| Workboard actual compiled WebKit consumer | Pass: anchored menu, filter keyboard dismissal, nested Escape preserving dialog, focus return, zero page errors. |
| Reef trust/friends/audit/receipt/outbound/notifier | 119/119 across6 files; wrapper927.25s, including cold worker compilation. Earlier unchanged channel proof25/25 pass. |
| Teams sqlite/Graph/read authority/setup | 72/72 across5 files; wrapper385.62s. |
| Teams Graph contexts/actions | 73/73 across3 files; wrapper327.91s. |
| Teams mutation callers/setup policy | 42/42 across5 files; wrapper776.30s. |
| Teams resolver + existing channel tests | Resolver4/4 pass; existing channel44 pass/2 fail, wrapper550.01s. **Both failures reproduce on full pinned main `4915e46c89b223ae4cdcdefe46fabc948b9bf7fa`**,44 pass/2 fail, wrapper464.42s: approval-monitor startup timeout120000ms (`channel.test.ts:313`) and subsequent `MSTeams runtime not initialized` (`runtime-store.ts:85` → `monitor.ts:81` → `channel.test.ts:970`). No budgets changed; the second appears cascading, not separately diagnosed. |
| Matrix reaction ownership | 11/11 pass; wrapper339.25s. |
| Lint suppression contracts | 3/3 pass on frozen candidate; wrapper48.94s. No new suppressions. |
| Architecture | Zero runtime value cycles; zero static/Madge components. |

Memory owner/sibling proof: 108/109 pass across nine files, wrapper939.49s. The only failure was this patch's newly authored assertion expecting the provider's raw close error instead of the owner's existing normalized diagnostic. After correcting that assertion without a production change, its exact case passed (4.389s execution, Vitest350.74s, wrapper373.90s, dominated by transforms). The other twelve registry cases were unselected in that focused invocation, not skipped in source. Together the runs prove all109 selected contracts, including actual-query retirement, shutdown drain, fallback/reload, healthy probe, transport and deadline behavior.

Local tooling notes: the first changed-file run required removing one now-unused assertion-safety allowance. The corrected run passed conflict markers (27.14s), line-cap (4.43s), max-lines (69.87s), and assertion-safety (183.85s), then was intentionally stopped after the full-source SQLite worker inventory produced no result for 681.03s. This was incomplete local proof, not a passing inventory or an inherited source failure. Native production and test extension typegraphs both pass. Scoped lint could not begin analysis because SDK declaration preparation hit its unchanged 300000ms budget, both in the earlier Reef attempt and the final scoped attempt; neither produced a lint diagnostic. Final exact-head hosted CI below closes both gaps, with inventories running on the PR's frozen merge tree. Two custom-config attribution attempts were abandoned for harness setup failures; they are not behavior proof. Teams attribution above uses a normal full-main export and normal harness. No remote lease, live Teams tenant or live provider proof is claimed.

Final formatting: all changed source/test/doc files pass. Plugin boundary report passes (zero eligible compatibility removals); UI localization verification passes. No public SDK files/exports or package manifests changed, so an SDK API-surface diff is not applicable.

Independent review reported one P2 about an older Workboard read replacing newer `lastKnown` fallback facts before a subsequent backend outage. Declined as the explicitly accepted cache tradeoff, not silently ignored: fallback is presentation-only, availability remains visible, the next successful read repairs it, and `move` independently rereads authoritative facts/scope before its guarded write. The introducing controls are synthetic (openclaw#165896/openclaw#165141); no user-data, authorization, or persisted-write invariant is relaxed.

First hosted CI run `38334064250` on `dabbd9208a20068c24e6901b41a13415c04ac856` completed with two owned lint failures: `check-lint-extensions-2` (explicit boolean and exhaustive return in Reef) and `check-lint-extensions-3` (default generic argument/Promise iterable in Memory, exhaustive return/shadowed local in Workboard). Its `openclaw/ci-gate` failure aggregates those two jobs. All other planned jobs passed, including SQLite inventories, source contracts, types, extension tests, and QA smoke. The focused correction adds five production lines. The first PR-evidence run also failed because this body's headings did not match the required template; corrected headings passed in run `38334357043`. Metadata auto-response cancellations and the superseded evidence run contain no product test suite. No inherited-failure exception is being claimed for these owned failures.

**Final exact-head CI passes:** [run 38335564816](https://github.com/openclaw/openclaw/actions/runs/38335564816) on `b86c1ba06fa325f178007ba736c294cdd67a566d`, including `openclaw/ci-gate`, both extension-lint stripes, full inventories/ratchets, source contracts, typegraphs, selected extension bundles, security, and all QA smoke profiles. This closes the local inventory/lint tooling gaps described above. All exact-head check runs were enumerated; no failed, cancelled, timed-out, or pending check remains. No admin exception, manual rerun, dispatch, or rebase was used. CI job wall seconds: extension bundles 1/2/3/4-1/4-2/5 = 210/160/183/247/137/229; extension lint stripes 2/3 = 145/91; baseline ratchets = 271. These are parallel job wall times including setup, not added test execution time.

The lint-only correction also passes native production types, formatting, suppression contracts (3/3; 65.59s wrapper), runtime cycles (0), static/Madge cycles (0), Workboard actions (32/32; 17.93s) and popover (1/1; 16.16s), plus Reef trust/Memory provider lifecycle (51/51; 401.38s Vitest, 445.49s wrapper). Independent review of that delta is scoped-clean at P0–P2; the original explicitly declined display-cache tradeoff remains documented above.

## Visual proof

Before/after attachments show the actual built Workboard plugin against synthetic fixture data. Before: details menu at the page origin. After: anchored to its trigger. No pixel-identical claim across fixture timestamps.

![Before: synthetic Workboard details menu at the page origin](https://github.com/user-attachments/assets/4051b726-6af0-45fe-a0b6-e896b1c33a40)

![After: synthetic Workboard details menu anchored to its trigger](https://github.com/user-attachments/assets/26de3267-537f-46ef-b477-1adb5b0de290)
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 extensions: memory-core Extension: memory-core merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L 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