Skip to content

perf: keep cold session and memory SQL off the Gateway main thread - #169164

Merged
steipete merged 15 commits into
mainfrom
dbasync/coldmain
Oct 11, 2026
Merged

steipete merged 15 commits into
mainfrom
dbasync/coldmain

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem and result

Cold session creation and the first turn still executed application SQLite reads on the Gateway main thread. This change removes all 11 observed cold runtime MAIN statements: Memory 7, profile/default-account selection 2, cron partition selection 1, and session lookup 1. Warmed MAIN remains zero.

Design

Session creation reuses the entry reader's prepared target instead of performing a synchronous lookup and a second acquisition. Personal defaults use the existing profile-link and auth-store workers. Cron selects its configured partition inside the existing mutable-load operation. Memory adds invalidated-source and vector-completeness facts to the existing index-facts postimage and prepares vector loading/legacy retirement in its publication worker. Worker execution remains synchronous; asynchronous native-extension preparation happens before it.

The old runtime paths and duplicate vector-marker/version reads are removed. Schema, retention, permissions, configuration, and public SDK contracts are unchanged. Released synchronous cron path resolution remains for its SDK/Doctor contract. Credential and caller authority are still validated at the creation effect.

Removed checks and accepted edges:

  • Separate cron partition acquisition: a queued load uses the committed default when its worker starts.
  • Repeated personal-default lookup: a link edit during selection applies to the next selection.
  • Synchronous initial session lookup and duplicate target acquisition: explicit creation carries one prepared worker target; the creation owner still validates the real effect.
  • Early read-time cancellation check: a canceled preflight may finish its internal read; creation authority still gates the effect.
  • Memory rebuild-marker rereads before/after vector loading: writer-published facts are authoritative until a new in-process write receipt.

Measurements

Three alternating pairs, M/C/M/C/M/C, using the unchanged shared harness on one AWS Linux machine. Base 5bd4f88535c66197b6d07442b82f7f68d94be6fa; candidate da3d6a99cd564c7e7634b46b110a51642ad8f1bb. Values are median [min–max]; warm values are each run's ten-turn mean.

Metric Base Candidate
Warmed all-thread statements/turn 321.7 [321.1–322.2] 321.8 [321.5–321.9]
Warmed requests/turn 89.1 [89.1–89.3] 89.1 [88.8–89.1]
Warmed MAIN statements 0 0
First-turn all-thread statements 985 [985–1177] 982 [982–1174]
First-turn requests 183 [183–192] 183 [183–192]
Cold runtime MAIN, all three runs 11 / 11 / 11 0 / 0 / 0
Entire-workload statements 9562 [9557–9567] 9542 [9494–9585]
Entire-workload requests 1724 [1718–1725] 1715 [1698–1724]

The +0.1 warm statement/turn difference is noise (+0.031%): comparing the median runs, unchanged session-row work contributes +0.5, unchanged ACP metadata −0.1, and Memory publication −0.3 from removing repeated vec_version(). No warmed request was added. Whole-workload statements fall by 20 and requests by 9. Warm duration ratio is 0.994; every phase is below 1.018. The remaining cold MAIN work is exactly 50 admission statements and 26 lock statements on both revisions.

Worker operation, entire workload Requests before → after Statements before → after
Memory source replacement 8 → 8 161 → 152
Memory schema admission with published facts 1 → 1 131 → 134
Memory vector ensure with published state 1 → 1 9 → 11
Vector preparation replacing legacy retirement 1 → 1 1 → 1
Profile/default links worker read 0 → 2 0 → 8
Cron mutable load including stored path 8 → 8 9 → 10

These are worker-side counts; moved MAIN reads are accounted for separately. Index-facts remains 7 requests / 7 statements. The static T1 inventory on these pins, and again on integrated base 84255bcd versus final head e942792d, is unchanged at 612 raw / 610 forwarding-normalized sites. Changed files retain five pre-existing account mutator/list sites outside this cold-read lane; the exercised cold paths have zero runtime MAIN calls.

The later fixture repairs and type-only import change emit no new runtime SQL. Main's UI fixes were integrated without conflicts. One confirmation pair on integrated base 84255bcd266704698fe406f35f4e85d1205fd273 and final head e942792d9fcde018bd211de27cfb2c1320ec7523 produced:

Integrated-head confirmation Base Candidate
Warmed statements/turn 316.1 311.8
Warmed requests/turn 88.9 88.8
Warmed MAIN 0 0
First-turn statements / requests 1119 / 191 969 / 184
Cold runtime MAIN 11 0
Startup statements / requests 4049 / 307 4071 / 303
Entire-workload statements / requests 9449 / 1723 9416 / 1720

The confirmation pair again removes exactly the same eleven cold runtime MAIN statements; the 50 admission and 26 lock statements are unchanged. Memory's repeatable warm saving is 0.3 statements/turn. The rest of the observed warm reduction is timing and other-owner work and is not claimed as a deterministic saving. Startup adds 22 statements (+0.54%): lane-related work falls by 3, while unchanged session/admission timing contributes +25. Whole-workload SQL falls 0.35% and requests fall by three. Both workloads completed all 13 turns with exact statement conservation and maximum phase duration ratio 1.0095.

Startup SQL attribution for that +22: removed MAIN −11; cron mutable-load +1; domain execution/publication −1/+1; Memory schema admission +3, source replacement −2, vector ensure +2, preparation +1 and legacy retirement −1; profile links +4 (lane net −3). Unchanged preparation +32, session-entry commit +13, lifecycle-artifact planning −14, session-entry list +2, exact entries −1, pending archives −1, row facts −4 and target inventory −2 contribute the other +25. Across the complete workload, preparation is 62→63 statements with three requests on each revision; the +13 entry-commit statements are offset by −13 lifecycle-projection statements (combined 933→933).

Verification

  • Two Codex autoreview rounds completed; in-scope correctness repairs resolved. The remaining P2 pre-initialization diagnostic finding is recorded below as a follow-up under the approved landing scope.
  • Native shared-harness traces: all six workloads completed 13 turns, child-terminal execution, compaction, and shutdown; statement conservation and per-thread calibration passed.
  • Eight focused Memory repair cases passed in 56.16 seconds, preserving vector results, tombstone filtering, late-setup cleanup, persisted status, and freshness after an in-process write.
  • The concurrent-create test covers canonical concurrent adoption. Its attempted negative control also passed on the base, so cold SQL proof relies on the real harness traces, not that control.
  • Integrated-head check:changed passed, including type-aware lint, production/test type checks, source contracts, T1 ratchet, and dialect ratchet. Dialect groups stayed 0/1/6 (mechanical/design/engine-maintenance).
  • Complete Knip scans on integrated base and head reported identical inherited UI exports: 27 in the production scan and 14 in the full-tree scan; script scan was clean. Every full path and export name matched. The proof comparator initially omitted ui/, rejected the empty filtered lists, and stopped before the remaining gates; comparison was corrected against the retained complete output without rerunning passed gates.
  • Final integrated-head proof passed: 717 test executions covering all 37 requested files (38 file executions), in 11 Vitest groups (--maxWorkers=1, 1289.55 seconds including test-runner preparation); export-name collisions passed and Madge reported zero cycles. Total resumed proof time: 1350 seconds. This includes all changed tests and affected mocked-export consumers.
  • No SDK surface change or published-driver update cell is required: no production update, Doctor, schema/migration, plugin-loading, or service-lifecycle change.

The Memory CI fixture fixes use explicit vector-capable inspection connections and tracked schema writes; expected data is unchanged. Tests that directly mutated an untracked database while retaining a cached reader now exercise the supported owner/reopen contract. The independent in-process writer-receipt invalidation regression remains.

Review follow-up: on an absent database, the deep CLI status vector-capability probe may report unavailable until the database exists. This bounded diagnostic issue does not affect initialized Memory operation or stored data; it is retained as a follow-up under the requested review/landing scope.

Scoped diff versus integrated base: production/docs/tooling +292/−173 lines; tests/support +248/−128 lines.

Required CI and security checks passed on e942792d9fcde018bd211de27cfb2c1320ec7523, including CI and security/dependency gate.

@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: e942792d9fcde018bd211de27cfb2c1320ec7523
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/auth-profiles/session-override.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime extensions: memory-core Extension: memory-core scripts Repository scripts agents Agent runtime and tooling size: L labels Oct 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR moves cold session lookups, personal-account selection, cron partition selection, and Memory initialization SQL into existing workers.

Example: Create the first session for agent main using a personal OpenAI account.

  • Before: Session and account preparation performs SQLite reads on the Gateway main thread.
  • After: Existing session and auth readers perform those reads in workers while creation retains its commit guards.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The worker design is worthwhile and four prior fixture findings are addressed, but the remaining source-confirmed regression blocks merge.
Proof confidence 🦐 gold shrimp (3/6) Verified maintainer authorship places this PR outside the ordinary contributor proof gate; the supplied evidence describes owner tests and pending measurements rather than completed runtime proof.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Cold session and Memory preparation can occupy the Gateway event loop with synchronous SQLite work.
Reason: Maintainer-authored direction follows the repository's worker-access contract and removes superseded host paths without new configuration or public APIs.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it advances the approved worker-owned database design, but one previously reported vector-probing regression remains unresolved.

Priority: P2
Reviewed head: e942792d9fcde018bd211de27cfb2c1320ec7523

Before merge

  • Preserve vector probing when the physical database is absent (P2) - With vectors enabled and sqlite-vec installed, running openclaw memory status --deep before the agent database exists creates a read-only status manager using an empty in-memory connection. prepareVector now sends vector-load to this physical-path opener instead. The database-missing branch excludes vector-load and throws before loadSqliteVecExtension runs, causing loadVectorExtension to record the available extension as unavailable. Probe an isolated in-memory connection in the retrieval worker without creating persistent storage. This previously reported finding remains unresolved; the added cli-purpose test creates storage before probing.

Findings

  • [P2] Preserve vector probing when the physical database is absent — extensions/memory-core/src/memory/manager-search.worker.ts:136-141

Tests

  • Missing end-to-end proof: The added vector test uses a writable cli manager, so it does not cover memory status --deep with an absent agent database; baseline-failing execution of that scenario is not supplied.
Agent review details

How this fits together

Gateway session creation and Memory preparation consume persisted session, account, cron, and index state; workers return selected entries and committed facts to their existing owners.

flowchart TD
  A[Gateway requests] --> B[Session creation owner]
  B --> C[Session and auth readers]
  A --> D[Cron worker]
  A --> E[Memory database owner]
  E --> F[Search and publication workers]
  C --> G[SQLite stores]
  D --> G
  F --> G
Loading

Technical review

Best possible solution:

Keep the worker cutover and restore absent-database capability probing with an isolated in-memory connection owned and closed by the retrieval worker.

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

Source establishes the failure: memory status --deep uses a read-only status manager, and vector-load rejects an absent physical database before testing extension availability; no target code was executed.

Is this the best way to solve the issue?

Reusing existing workers and committed facts fits the owning architecture, provided capability probing continues to work before persistent storage exists.

Full review comments:

  • [P2] Preserve vector probing when the physical database is absent — extensions/memory-core/src/memory/manager-search.worker.ts:136-141
    With vectors enabled and sqlite-vec installed, running openclaw memory status --deep before the agent database exists creates a read-only status manager using an empty in-memory connection. prepareVector now sends vector-load to this physical-path opener instead. The database-missing branch excludes vector-load and throws before loadSqliteVecExtension runs, causing loadVectorExtension to record the available extension as unavailable. Probe an isolated in-memory connection in the retrieval worker without creating persistent storage. This previously reported finding remains unresolved; the added cli-purpose test creates storage before probing.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test extensions/memory-core/src/memory/manager-worker-reads.test.ts --maxWorkers=1
  • pnpm test extensions/memory-core/src/memory/manager-schema-admission.test.ts --maxWorkers=1
  • Verify pnpm openclaw memory status --deep --json in isolated state with vectors enabled, sqlite-vec available, and no agent database; confirm successful probing creates no persistent database.

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 91eff27 adds extensions/memory-core/src/memory/manager-publication.worker.ts:238 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 91eff279daa0; files: extensions/memory-core/src/memory/manager-publication.worker.ts)
  • scoootscooob: Raw commit e4e2305 adds src/agents/auth-profiles/session-override.ts:205 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e4e230510c15; files: src/agents/auth-profiles/session-override.ts)

PR surface

Source +108, Tests +120, Docs +11, Other 0. Total +239 across 43 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 22 279 171 +108
Tests 17 248 128 +120
Docs 1 11 0 +11
Config 0 0 0 0
Generated 0 0 0 0
Other 3 2 2 0
Total 43 540 301 +239

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Useful responsiveness work with a bounded diagnostic regression; no demonstrated outage or data loss.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp 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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-11T14:56:16.800Z sha e5f8310 :: needs changes before merge. :: [P1] Prepare sqlite-vec before synchronous worker execution | [P2] Preserve vector capability probing for an absent database | [P2] Handle authority refusals from the new session reads | [P2] Keep the database owner within its enforced line budget
  • reviewed 2026-10-11T15:19:41.921Z sha 9c9354a :: needs changes before merge. :: [P2] Preserve vector capability probing when the database is absent | [P2] Bring the database owner within its enforced line limit
  • reviewed 2026-10-11T16:25:54.217Z sha da3d6a9 :: needs changes before merge. :: [P2] Preserve vector probing when the physical database is absent | [P2] Prepare vector extensions on the test inspection connections | [P2] Move the late-vector regression to the worker preparation boundary | [P2] Update the status regression for retained committed facts | [P2] Publish tombstone schema facts in the cache transfer fixture

Reviewed October 11, 2026, 12:55 PM ET / 16:55 UTC (Revision 4).

@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Oct 11, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Recording the remaining review item as a follow-up under the approved landing scope: with no physical Memory database yet, openclaw memory status --deep can report vector support unavailable. A follow-up should probe an isolated in-memory connection in the retrieval worker without creating persistent storage. This affects that pre-initialization diagnostic; the review reports no security or data-loss finding. The initialized Memory paths and stored-vector results are covered by this PR's owner tests.

@steipete
steipete merged commit 4c884c1 into main Oct 11, 2026
145 of 146 checks passed
@steipete
steipete deleted the dbasync/coldmain branch October 11, 2026 17:53
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…penclaw#169164)

Move cold session, personal-default, cron, and Memory reads through their existing workers and reuse writer-published facts. Remove duplicate host lookups and vector marker/version reads while preserving authority checks at real effects.

Cold non-admission main-thread SQL falls from 11 statements to zero; warmed main-thread SQL remains zero. Three alternating measurement pairs stay within warmed-turn noise, with an integrated-head confirmation.

Validation: 717 test executions covering 37 requested files, check:changed, export-collision and Madge checks, unchanged T1/dialect ratchets, two Codex review rounds, and passing required CI/security gates. Knip UI findings match the integrated base exactly.

Follow-up: absent-database deep Memory status can report vector capability unavailable until initialization.
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
…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)
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 20, 2026
First-parent upstream 0bc7491..408a1f3 (53 commits, including
openclaw#169164 cold session/memory SQL off the Gateway main thread, openclaw#169173
per-turn SQLite bookkeeping, openclaw#169207 coalesced tool-result actor
admissions, openclaw#169238 inter-session envelope bytes, openclaw#168989 ACP replies).

Conflict:
- plugin-sdk-surface-report.mts: upstream budgets 3673/2134; ours stays
  +11/+4 on top (3684/2138).

Drag removed against upstream:
- plugin-sdk-surface-report.mts: dropped the "+1: createSessionHeaderLink"
  budget comments; upstream added them in openclaw#158742 and retired them in
  openclaw#165334, and no such export exists any more.
- normalize-reply.ts: restored upstream's blank line before
  bindNormalizeReplyTransformOwner (formatting-only overlay noise).

Auto-merged files that carry continuation overlay (normalize-reply,
sqlite-entry-store, user-turn-transcript, baselines, vitest paths) keep
the overlay byte-for-byte. Worker access inventory regenerated.

Refs #1475

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: memory-core Extension: memory-core gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts security-sensitive-changed 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