Repository navigation
refactor: move native binding preparation to workers - #168479
Conversation
Plugin state callbacks can perform SQLite work on the Gateway thread, including APIs that return a Promise. Plugin authors gain a versioned worker-owned keyed store; existing synchronous and callback APIs keep their completion semantics through the current Plugin SDK major.
Native session bindings still expose host-thread persistence and synchronous preparation through harness adapters. Native binding preparation and ordinary lifecycle mutations can complete through the worker while released synchronous integrations remain supported.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Landing under the operator-authorized relaxed CI policy, pinned to 49cf316. Native review setup stalled beyond ten minutes; using the authorized REST squash fallback. Focused worker/lifecycle proof passed: 83 tests across five files (run_d6db288fff688b319fe186fa8e3a7e4b). The rollback failure was traced to the test's Map store lacking worker-owned capture metadata, not a production rollback failure. The existing SQLite fixture restores the owning boundary; that correction plus conversation-binding tests passes 55 tests across two files (run_371e0919f511366c83c2afa45e697eb4). The small fixture/type and wrapper-inventory corrections are prepared for an immediate fix-forward push to main. CI run 38085318629 remains red: the fixture/type and wrapper-inventory issues above; a Codex registration lazy-import boundary issue (follow-up); a worker killed after a no-output stall; and an inherited Dreaming test that polls a parent-process cached row after a child Gateway deletes it. The Dreaming test and cache/cleanup owners are unchanged from the integrated base. No proven product regression remains in this PR's changed path. Security-fast passed. No CI rerun was requested. Published-driver update proof is reused from #168478: driver 2026.9.9 against candidate c5e53dc, run_3d6590a7c9c48b16a12382d7e111cda1. This PR does not change the update path. ClawSweeper P2 lazy-registration finding is retained as a follow-up under the relaxed policy. |
|
Verified merge: 076e337. The fixture and wrapper-inventory corrections were pushed immediately to main as a6e35a9. Correction proof: 55 tests across the rollback/conversation files; extension test types pass; native provisioning tests 16 passed, one skipped (run_3e20975e204cdeb2b46810601f4369b4). PR and tooling worktrees removed. The relaxed-policy CI limitations and lazy-import follow-up remain recorded above. |
* refactor(plugin-sdk): share legacy persistence warning budgets * feat(plugin-sdk): add worker-owned keyed state Plugin state callbacks can perform SQLite work on the Gateway thread, including APIs that return a Promise. Plugin authors gain a versioned worker-owned keyed store; existing synchronous and callback APIs keep their completion semantics through the current Plugin SDK major. * refactor: move native binding preparation to workers Native session bindings still expose host-thread persistence and synchronous preparation through harness adapters. Native binding preparation and ordinary lifecycle mutations can complete through the worker while released synchronous integrations remain supported. * test: bind native lease fixtures to V2 action authority * test: complete keyed state runtime fixture * refactor(plugin-state): separate offline migration entrypoints * refactor(codex): share binding helpers and contract fixtures * test(codex): model current conversation inspection boundary * test(facetime): bind persistence barriers before runtime startup * docs: explain validated discussion account config * test: exercise native binding lifecycle through worker settlement * fix: preserve native binding method receivers * chore: regenerate worker and test guard baselines * fix(clickclack): fence discussion cleanup and reconciliation * test(clickclack): avoid shadowing store options * test(plugin-sdk): import transcript fixture from its owner
…#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.  
…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.  
* refactor(gateway): simplify diagnostic state and internal metadata paths Consolidate worker catalog loading and remove duplicate internal copies, metadata reconstruction, cleanup, and speculative diagnostic ordering machinery. Keep authentication, live effect authority, persisted shapes, shutdown write settlement, bounded caches, and terminal admission/spawn limits. Best-effort tradeoffs accepted Provenance below identifies synthetic/speculative introduction evidence, not a linked human actual-use incident. Security, durability and real resource limits remain independently protected. - Health publication generations (#116681, synthetic overlap reproduction): overlapping passive/probe samples now publish in completion order; next refresh replaces stale diagnostics. Separate probe work and public/admin audiences stay. - Observer request generations (#112958, structured-review race): an A-B-A model change during one in-flight digest can accept that digest; cancellation, current session/model checks and disclosure authorization remain. - GitHub target early registry invalidation (#167189, synthetic invalidation test): discovery may be stale for its existing 15-second TTL; publication verifies Git afresh and cached reads still check current connection/source authority. - Automation badge build epochs (#104730, structured review): latest completed service start supplies display facts; scheduling and stale-owner unregister stay. - Terminal victim claim/release protocol (#116101, synthetic autoreview interleavings): reserve pooled free+idle capacity instead, then select the actual unviewed idle victim at registration. Newly viewed victims survive; a replacement without an eligible victim fails and kills its backend. Both hard limits remain. - Launch JSON snapshot/revalidation (#123033, synthetic caller mutation): trust the tunnel-owned prepared descriptor; a caller violating ownership can mutate it. Negotiated options still use a shallow copy and node input validation remains. - Worker catalog output copies (#142095, schema mirrors) and display settings clone: trust closed-schema-validated, documented process-stable metadata and internally owned settings. A future provider violating that contract can mutate cosmetic metadata or miss notifications until a later row/config refresh or restart; live allocation validation remains. - Artifact descriptor freezing/refreezing (#163446, immutable-result assertion): readonly types govern internal consumers; an internal type-contract violation can mutate shared metadata. Archive verification and worker-close ordering stay. - Post-fetch CI summary reread (#160108, synthetic identity review): exact selected head diagnostics may finish while the PR summary refreshes; UI selected-head matching, upstream identity and live disclosure/credential checks remain. - Startup-log generation switching (#141736/#126627, synthetic supersession behind startup admission): a queued boot log may describe boot rather than replacement facts. Plugin attachment, trust enforcement and service ownership stay current. - Hook replay promise/object identity checks (#139155): private writers cannot replace or prune pending/active entries. If a future writer breaks that invariant, completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay. - Boxed-primitive JSON coercion probes (#158572, synthetic boxed-value cases): ordinary tool payloads retain measured early budget rejection. Exotic boxed strings may serialize before rejection by the unchanged final exact byte cap; native JSON owns their coercion instead of custom per-value probes. Model detail reads use the exact configured inventory already built in the same synchronous request frame instead of resolving agent membership a second time (#114388/#159177). Syntax, authentication, read scope and exact membership stay. GitHub publication keeps its covering finally release instead of releasing twice. The attempted prepared-workspace cache substitution was dropped: ordinary late ACK publications can hide live authority while durable staged facts still exist. Phase E standalone session memory and its tests are untouched. BELOW-500 lane packet for coordinator bundling; no standalone PR. Net production LOC: 217 removed (109 added / 326 removed, 20 files). Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus largest-first owner sweeps exhausted sound candidates; rejected cuts stay out. Local proof - Full core production types and all four Gateway test-type graphs passed. - Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward. - Changed-file format, diff checks, targeted production/test lint passed after correcting the terminal selector to toSorted. No new suppression. - Lint-suppressions: 3 tests passed on the settled source. - Startup post-attach owner: 88 tests passed in the final isolated run. - Focused runs reported passing terminal lifecycle/eviction/detach, health, hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron, chat state, observers, real models HTTP e2e, publication database/provisioning/ availability and GitHub read/target-discovery cases. The aggregate selections were intentionally stopped, so this is not a full-suite pass claim. - Independent review completed. Two final findings were declined with source evidence: the retained unconditional finally releases the sole publication acquisition, and closed metadata schemas still reject unknown properties. Proof gaps - server.hooks.test.ts / handles auth, wake, and agent flows timed out at 120000ms during Gateway startup (207133ms reported elapsed). Its requests have no idempotency key and bypass the removed replay checks, but no conclusive head-vs-main attribution was established. Later successful Gateway startups are not a claimed repair. No retry, timeout increase, skip, or weaker assertion. - Expanded local selections were stopped rather than running more unchanged guest/integration variants on the loaded host. Bundle CI remains broad proof. - Full check-changed was stopped during the broad SQLite inventory. Preceding conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and reproduced on the untouched base index. No budget was changed. This is base evidence, not current-main CI attribution. - No qualified before/after timing comparison or performance claim. No hosted PR CI exists for this branch-only lane packet. * refactor(gateway): consolidate MCP schemas and Talk target ownership Use Node's maintained deep comparator for MCP JSON schemas and remove defensive throwing-getter readers plus their synthetic-only fixture. Keep schema input validation, advertised-schema invocation membership, normalization, top-level copies and the equal-schema warning/deduplication behavior from human issue #98437. Inline Talk's sole-caller storage resolver and forwarding assertion adapter. All four callers still assert the exact prepared target at the original effect. Trust Rastermill's dimension fitting instead of rechecking encoder output; retain input limits and the byte-limit check/error. Drop the optional initial metadata catch-up event version fence; retain actual model readiness and runtime authority. Best-effort tradeoffs accepted - Throwing in-process tool metadata getters/spread (#88410, 705bdce): the introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not a live client report. A broken plugin getter now fails the request clearly rather than silently omitting that tool. Security and schema shape checks stay. - Exotic non-JSON schema objects: the custom comparator from #103171 now uses isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including insertion order, stays; symbol-bearing or exotic JS objects may warn differently. Preserve the real issue #98437 warning reduction and process-lifetime dedupe. - Encoder output dimension recheck (#169449, 8db1c35): the introducing cutover explicitly made Rastermill own fitting, confirmed in its implementation. A future encoder contract bug can produce an oversized-dimension image; repair that owner rather than validate its output again in Gateway. Input/byte bounds stay. - Initial chat metadata catch-up versions (#123433, f3db7fe): synthetic restart/Testbox provenance without a linked human incident. Overlapping initial catch-up and model invalidation can briefly mark display availability and cause an optional refresh warning; the next publication converges. Current model readiness, runtime authority/failure handling and write settlement stay. Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC. Phase E standalone memory backend, machinery and tests are untouched. Same branch, no conflict/rebase, no PR at the below-500 ending threshold. Provenance #88410 #103171 #98437 #169449 #123433 #169622 Proof - Fresh full core production types, targeted core type-aware lint, formatter and diff checks passed. Changed-check classification completed. - Fresh runtime cycles: 0; Madge cycles: 0; no new component. - Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged. Loaded-host wall time: 1711.09s including cold preparation; no before/after performance claim. - Independent review completed scoped-clean P0-P2; no actionable findings. - Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall: union/prototype properties, malformed/boolean variants, literal constraints, real HTTP equal-schema warning dedupe, and orientation-aware resized delivery. The name filter left 96 unrelated cases unrun; no test skips were added. - Initial root-config lint failed before linting while unrelated plugin SDK declarations timed out at 300000ms. Correct source-backed core-config routing passed without skipping preparation or increasing any timeout. Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup without conclusive head-vs-main attribution; a later successful startup is not a claimed repair. Earlier expanded local selections and full check-changed were stopped under load. The earlier env-var budget failure reproduced on its untouched base, not current-main CI. No timeout increase, retry, skip, assertion weakening, or baseline change was used. Full Gateway/integration proof belongs to bundle CI. No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage, provenance, rejected candidates and proof are retained in .local/y06-ledger.md. * refactor(codex): simplify transport and catalog bookkeeping Remove malformed JSON reconstruction and its continuation-only bookkeeping, redundant config copies, post-write rereads and duplicate internal checks. Reuse the existing final-config hook builder. Preserve valid JSON framing, external input validation, redaction, live effect authority, resource bounds, normal concurrent sessions, persisted shapes and write settlement. Best-effort tradeoffs accepted - Raw LF inside JSON strings is no longer reconstructed. Direct commit 6fd35f6 and follow-ups #101221, #151399 and #162559 use synthetic malformed frames, not a cited human incident. Such frames warn/drop; later valid frames continue. A missing RPC reply can reach the existing request timeout. This also removes the recovery-only pending-route and per-request row-budget snapshots. - Unsupported in-place mutation of published config/start objects may become visible to a request. Ordinary reload replaces the config object. #162912 fixed human heap-OOM #162802 by sharing clones; removing copying preserves that allocation protection without another snapshot cache. - A node finalization commit followed by a rejected promise now surfaces the error. #106927's lost-receipt path was synthetic, with no cited human incident. The durable binding stays installed; next Continue retries the same deterministic session. Same-session/home/harness write checks stay. - Invalid numeric waiter facts from a trusted internal producer are no longer discarded by redundant diagnostics validation. #149616 supplied synthetic correlation proof, not a human incident. Egress string allowlists and all resource bounds remain; catalog results are unaffected. - An unsupported offline writer changing a row immediately after successful CAS/ownership recording is no longer caught by another reread. #168479, #166575 and #170511 supplied synthetic migration machinery, not a cited competing-writer human report. CAS conflicts, initial/post-register checks, leases and retained-sidecar recovery stay. Next migration reconciles it. - An impossible-on-wire cyclic/BigInt tool value now throws rather than silently omitting output. #70966/#107680 cite no human serialization incident; protocol payloads are JSON values and local records use those values/primitives. Network validation remains at the transport boundary. - Already-validated binding hashes are not parsed again after normalization (#164197/283d5e6fe37). Initial persisted-input validation and the human fingerprint-overflow fix #104503 remain intact. - The bootstrap decision no longer accepts a duplicate projection input (a4c2e7f): its only production caller already puts the same projection into expectedBinding, whose canonical comparator checks it. No separate recoverable scenario or public reason contract is lost. Sibling Codex source contract inspected: codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes. codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and v2/mcp.rs:208-224 define JSON MCP results and string errors. Net production reduction: 249 lines (+97/-346), excluding tests, fixtures, test support, generated files and declarations. Phase E memory is untouched. Detailed scope/provenance coverage remains in the requested .local/y12 ledgers. Proof so far: independent P0-P2 review scoped-clean, targeted source-graph typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and git diff --check pass. Post-review edits only remove an unused test import and mechanically migrate one remaining decoder spy without weakening its assertion. Focused tests, canonical typed lint and static cycles remain pending; this is not an all-green or merged claim. Package SDK declaration preparation timed out under load and the selector dry-run exited SIGILL. Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still describes incomplete-frame recovery. Replace that description with malformed frames producing a redacted diagnostic and being dropped while subsequent valid frames continue normally. * refactor(codex): remove duplicate approval and projection machinery Use the standard deep comparator at the existing approval rewrite-denial boundary, trust the typed host approval result, reuse collected assistant fallbacks and prepared catalog connection options, remove redundant internal metadata copies and normalized agent-directory fallback, and inline the sole account-usage registrar while retaining lazy loading and administrator scope. Forward optional release arguments once without changing ownership/settlement. The first focused run exposed cursor retargeting after cache removal. Retain the existing regression test and carry the resident's captured requestOptions to every hydration page. Published config can be edited in place; the original commit's blanket immutable-config description was too strong. No cloning or global snapshot cache is restored. Best-effort tradeoffs accepted - A typed host approval result with a getter/proxy decision can now throw or be read normally, rather than receive descriptor inspection. #70751 added synthetic defenses, not a cited human incident. The production host returns authenticated Gateway JSON. Null-unavailable, cancellation and two-phase decision settlement remain unchanged. - Non-JSON hook replacements may be conservatively denied by deep comparison rather than canonical JSON text. #82496 protects a real rewrite-denial boundary, which remains; the private recursive serializer is not a contract. - Internal cached session metadata is returned without defensive cloning. #134660 introduced the copies without a metadata-mutation human incident; #164197 moved them unchanged. The sole parser only reads metadata and still clones exposed tool input schemas. A future mutating internal consumer must own its copy instead of requiring every read to clone the full object. - The agent directory no longer has a second fallback after connection setup already resolved it (#120366, owner split #151753). Invalid hand-constructed internal runtime objects are unsupported; production always supplies it. Catalog hydration retains source.assertCurrent before using captured connection options: WebSocket start options may contain credentials. Source authority is not an accepted best-effort tradeoff. Opaque cursors still stay with their selected home's prepared connection options. Exact sibling Codex contract personally inspected at 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157: codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only adds the LF delimiter, and :87-93 writes those serialized bytes directly. transport/websocket.rs:313-320 sends the same serializer result unchanged. This confirms the earlier malformed raw-LF reconstruction removal; external JSON parsing, warn/drop diagnostics and subsequent valid frames remain. Branch total: 330 net production LOC removed (+125/-455), excluding tests, fixtures, test support, generated files and declarations. Phase E memory, inactive foundations, public contracts, live authority, resource limits and write settlement remain untouched. Detailed requested coverage/provenance is in the task-local y12 ledgers. Proof: the 30-suite focused run passed 533 cases and failed one unchanged native-hook fallback case at its existing five-second execution budget. A failed-case-only replay hit the same deadline (95s case wall time under load). No main-side test replay establishes attribution; do not call it main-red or claim fully green focused proof. Retained cursor regression passed 9/9; lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics all reproduce on independently installed pinned main 7878a57 with matching unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof. Independent final-input review's only finding incorrectly requires a boolean third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares the options object, and isolated Node 26.5 confirms skipPrototype:true behavior. Reject that finding on source/runtime evidence, not with a cast or suppression. Earlier full-candidate review's sole index-only cursor finding was resolved by staging the repair. No remaining accepted actionable finding. Canonical Madge and SDK-artifact lint preparation remain unproven after prior load-limited attempts; changed-selector preparation failed with native SIGILL. Runtime value cycles are zero. The only new import edge is a Node builtin; account registration contracts index-to-registrar-to-runtime to index-to-runtime. Final-source catalog proof: 25/25 pass, including obsolete-source list/pin rejection and cursor affinity. Final targeted source-backed typecheck exits0, including the exact comparison call questioned by review. Format and diff checks pass. No public SDK export, schema, protocol, dependency, permission, durability or retention change. Below500 branch-only handoff; no PR or merge. * docs: align Codex framing and worktree cache behavior * fix: preserve MCP schema filtering and release assertions Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts.
* test(ui): migrate message and pane fixtures to Solid * test(ui): mount queue and prediction fixtures with Solid * test(ui): provide application context to native chat goal fixtures * test(ui): report packaged Workboard startup failures * refactor: deslop gateway and Codex extension (wave-5 bundle D) (#173092) * refactor(gateway): simplify diagnostic state and internal metadata paths Consolidate worker catalog loading and remove duplicate internal copies, metadata reconstruction, cleanup, and speculative diagnostic ordering machinery. Keep authentication, live effect authority, persisted shapes, shutdown write settlement, bounded caches, and terminal admission/spawn limits. Best-effort tradeoffs accepted Provenance below identifies synthetic/speculative introduction evidence, not a linked human actual-use incident. Security, durability and real resource limits remain independently protected. - Health publication generations (#116681, synthetic overlap reproduction): overlapping passive/probe samples now publish in completion order; next refresh replaces stale diagnostics. Separate probe work and public/admin audiences stay. - Observer request generations (#112958, structured-review race): an A-B-A model change during one in-flight digest can accept that digest; cancellation, current session/model checks and disclosure authorization remain. - GitHub target early registry invalidation (#167189, synthetic invalidation test): discovery may be stale for its existing 15-second TTL; publication verifies Git afresh and cached reads still check current connection/source authority. - Automation badge build epochs (#104730, structured review): latest completed service start supplies display facts; scheduling and stale-owner unregister stay. - Terminal victim claim/release protocol (#116101, synthetic autoreview interleavings): reserve pooled free+idle capacity instead, then select the actual unviewed idle victim at registration. Newly viewed victims survive; a replacement without an eligible victim fails and kills its backend. Both hard limits remain. - Launch JSON snapshot/revalidation (#123033, synthetic caller mutation): trust the tunnel-owned prepared descriptor; a caller violating ownership can mutate it. Negotiated options still use a shallow copy and node input validation remains. - Worker catalog output copies (#142095, schema mirrors) and display settings clone: trust closed-schema-validated, documented process-stable metadata and internally owned settings. A future provider violating that contract can mutate cosmetic metadata or miss notifications until a later row/config refresh or restart; live allocation validation remains. - Artifact descriptor freezing/refreezing (#163446, immutable-result assertion): readonly types govern internal consumers; an internal type-contract violation can mutate shared metadata. Archive verification and worker-close ordering stay. - Post-fetch CI summary reread (#160108, synthetic identity review): exact selected head diagnostics may finish while the PR summary refreshes; UI selected-head matching, upstream identity and live disclosure/credential checks remain. - Startup-log generation switching (#141736/#126627, synthetic supersession behind startup admission): a queued boot log may describe boot rather than replacement facts. Plugin attachment, trust enforcement and service ownership stay current. - Hook replay promise/object identity checks (#139155): private writers cannot replace or prune pending/active entries. If a future writer breaks that invariant, completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay. - Boxed-primitive JSON coercion probes (#158572, synthetic boxed-value cases): ordinary tool payloads retain measured early budget rejection. Exotic boxed strings may serialize before rejection by the unchanged final exact byte cap; native JSON owns their coercion instead of custom per-value probes. Model detail reads use the exact configured inventory already built in the same synchronous request frame instead of resolving agent membership a second time (#114388/#159177). Syntax, authentication, read scope and exact membership stay. GitHub publication keeps its covering finally release instead of releasing twice. The attempted prepared-workspace cache substitution was dropped: ordinary late ACK publications can hide live authority while durable staged facts still exist. Phase E standalone session memory and its tests are untouched. BELOW-500 lane packet for coordinator bundling; no standalone PR. Net production LOC: 217 removed (109 added / 326 removed, 20 files). Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus largest-first owner sweeps exhausted sound candidates; rejected cuts stay out. Local proof - Full core production types and all four Gateway test-type graphs passed. - Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward. - Changed-file format, diff checks, targeted production/test lint passed after correcting the terminal selector to toSorted. No new suppression. - Lint-suppressions: 3 tests passed on the settled source. - Startup post-attach owner: 88 tests passed in the final isolated run. - Focused runs reported passing terminal lifecycle/eviction/detach, health, hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron, chat state, observers, real models HTTP e2e, publication database/provisioning/ availability and GitHub read/target-discovery cases. The aggregate selections were intentionally stopped, so this is not a full-suite pass claim. - Independent review completed. Two final findings were declined with source evidence: the retained unconditional finally releases the sole publication acquisition, and closed metadata schemas still reject unknown properties. Proof gaps - server.hooks.test.ts / handles auth, wake, and agent flows timed out at 120000ms during Gateway startup (207133ms reported elapsed). Its requests have no idempotency key and bypass the removed replay checks, but no conclusive head-vs-main attribution was established. Later successful Gateway startups are not a claimed repair. No retry, timeout increase, skip, or weaker assertion. - Expanded local selections were stopped rather than running more unchanged guest/integration variants on the loaded host. Bundle CI remains broad proof. - Full check-changed was stopped during the broad SQLite inventory. Preceding conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and reproduced on the untouched base index. No budget was changed. This is base evidence, not current-main CI attribution. - No qualified before/after timing comparison or performance claim. No hosted PR CI exists for this branch-only lane packet. * refactor(gateway): consolidate MCP schemas and Talk target ownership Use Node's maintained deep comparator for MCP JSON schemas and remove defensive throwing-getter readers plus their synthetic-only fixture. Keep schema input validation, advertised-schema invocation membership, normalization, top-level copies and the equal-schema warning/deduplication behavior from human issue #98437. Inline Talk's sole-caller storage resolver and forwarding assertion adapter. All four callers still assert the exact prepared target at the original effect. Trust Rastermill's dimension fitting instead of rechecking encoder output; retain input limits and the byte-limit check/error. Drop the optional initial metadata catch-up event version fence; retain actual model readiness and runtime authority. Best-effort tradeoffs accepted - Throwing in-process tool metadata getters/spread (#88410, 705bdce): the introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not a live client report. A broken plugin getter now fails the request clearly rather than silently omitting that tool. Security and schema shape checks stay. - Exotic non-JSON schema objects: the custom comparator from #103171 now uses isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including insertion order, stays; symbol-bearing or exotic JS objects may warn differently. Preserve the real issue #98437 warning reduction and process-lifetime dedupe. - Encoder output dimension recheck (#169449, 8db1c35): the introducing cutover explicitly made Rastermill own fitting, confirmed in its implementation. A future encoder contract bug can produce an oversized-dimension image; repair that owner rather than validate its output again in Gateway. Input/byte bounds stay. - Initial chat metadata catch-up versions (#123433, f3db7fe): synthetic restart/Testbox provenance without a linked human incident. Overlapping initial catch-up and model invalidation can briefly mark display availability and cause an optional refresh warning; the next publication converges. Current model readiness, runtime authority/failure handling and write settlement stay. Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC. Phase E standalone memory backend, machinery and tests are untouched. Same branch, no conflict/rebase, no PR at the below-500 ending threshold. Provenance #88410 #103171 #98437 #169449 #123433 #169622 Proof - Fresh full core production types, targeted core type-aware lint, formatter and diff checks passed. Changed-check classification completed. - Fresh runtime cycles: 0; Madge cycles: 0; no new component. - Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged. Loaded-host wall time: 1711.09s including cold preparation; no before/after performance claim. - Independent review completed scoped-clean P0-P2; no actionable findings. - Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall: union/prototype properties, malformed/boolean variants, literal constraints, real HTTP equal-schema warning dedupe, and orientation-aware resized delivery. The name filter left 96 unrelated cases unrun; no test skips were added. - Initial root-config lint failed before linting while unrelated plugin SDK declarations timed out at 300000ms. Correct source-backed core-config routing passed without skipping preparation or increasing any timeout. Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup without conclusive head-vs-main attribution; a later successful startup is not a claimed repair. Earlier expanded local selections and full check-changed were stopped under load. The earlier env-var budget failure reproduced on its untouched base, not current-main CI. No timeout increase, retry, skip, assertion weakening, or baseline change was used. Full Gateway/integration proof belongs to bundle CI. No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage, provenance, rejected candidates and proof are retained in .local/y06-ledger.md. * refactor(codex): simplify transport and catalog bookkeeping Remove malformed JSON reconstruction and its continuation-only bookkeeping, redundant config copies, post-write rereads and duplicate internal checks. Reuse the existing final-config hook builder. Preserve valid JSON framing, external input validation, redaction, live effect authority, resource bounds, normal concurrent sessions, persisted shapes and write settlement. Best-effort tradeoffs accepted - Raw LF inside JSON strings is no longer reconstructed. Direct commit 6fd35f6 and follow-ups #101221, #151399 and #162559 use synthetic malformed frames, not a cited human incident. Such frames warn/drop; later valid frames continue. A missing RPC reply can reach the existing request timeout. This also removes the recovery-only pending-route and per-request row-budget snapshots. - Unsupported in-place mutation of published config/start objects may become visible to a request. Ordinary reload replaces the config object. #162912 fixed human heap-OOM #162802 by sharing clones; removing copying preserves that allocation protection without another snapshot cache. - A node finalization commit followed by a rejected promise now surfaces the error. #106927's lost-receipt path was synthetic, with no cited human incident. The durable binding stays installed; next Continue retries the same deterministic session. Same-session/home/harness write checks stay. - Invalid numeric waiter facts from a trusted internal producer are no longer discarded by redundant diagnostics validation. #149616 supplied synthetic correlation proof, not a human incident. Egress string allowlists and all resource bounds remain; catalog results are unaffected. - An unsupported offline writer changing a row immediately after successful CAS/ownership recording is no longer caught by another reread. #168479, #166575 and #170511 supplied synthetic migration machinery, not a cited competing-writer human report. CAS conflicts, initial/post-register checks, leases and retained-sidecar recovery stay. Next migration reconciles it. - An impossible-on-wire cyclic/BigInt tool value now throws rather than silently omitting output. #70966/#107680 cite no human serialization incident; protocol payloads are JSON values and local records use those values/primitives. Network validation remains at the transport boundary. - Already-validated binding hashes are not parsed again after normalization (#164197/283d5e6fe37). Initial persisted-input validation and the human fingerprint-overflow fix #104503 remain intact. - The bootstrap decision no longer accepts a duplicate projection input (a4c2e7f): its only production caller already puts the same projection into expectedBinding, whose canonical comparator checks it. No separate recoverable scenario or public reason contract is lost. Sibling Codex source contract inspected: codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes. codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and v2/mcp.rs:208-224 define JSON MCP results and string errors. Net production reduction: 249 lines (+97/-346), excluding tests, fixtures, test support, generated files and declarations. Phase E memory is untouched. Detailed scope/provenance coverage remains in the requested .local/y12 ledgers. Proof so far: independent P0-P2 review scoped-clean, targeted source-graph typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and git diff --check pass. Post-review edits only remove an unused test import and mechanically migrate one remaining decoder spy without weakening its assertion. Focused tests, canonical typed lint and static cycles remain pending; this is not an all-green or merged claim. Package SDK declaration preparation timed out under load and the selector dry-run exited SIGILL. Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still describes incomplete-frame recovery. Replace that description with malformed frames producing a redacted diagnostic and being dropped while subsequent valid frames continue normally. * refactor(codex): remove duplicate approval and projection machinery Use the standard deep comparator at the existing approval rewrite-denial boundary, trust the typed host approval result, reuse collected assistant fallbacks and prepared catalog connection options, remove redundant internal metadata copies and normalized agent-directory fallback, and inline the sole account-usage registrar while retaining lazy loading and administrator scope. Forward optional release arguments once without changing ownership/settlement. The first focused run exposed cursor retargeting after cache removal. Retain the existing regression test and carry the resident's captured requestOptions to every hydration page. Published config can be edited in place; the original commit's blanket immutable-config description was too strong. No cloning or global snapshot cache is restored. Best-effort tradeoffs accepted - A typed host approval result with a getter/proxy decision can now throw or be read normally, rather than receive descriptor inspection. #70751 added synthetic defenses, not a cited human incident. The production host returns authenticated Gateway JSON. Null-unavailable, cancellation and two-phase decision settlement remain unchanged. - Non-JSON hook replacements may be conservatively denied by deep comparison rather than canonical JSON text. #82496 protects a real rewrite-denial boundary, which remains; the private recursive serializer is not a contract. - Internal cached session metadata is returned without defensive cloning. #134660 introduced the copies without a metadata-mutation human incident; #164197 moved them unchanged. The sole parser only reads metadata and still clones exposed tool input schemas. A future mutating internal consumer must own its copy instead of requiring every read to clone the full object. - The agent directory no longer has a second fallback after connection setup already resolved it (#120366, owner split #151753). Invalid hand-constructed internal runtime objects are unsupported; production always supplies it. Catalog hydration retains source.assertCurrent before using captured connection options: WebSocket start options may contain credentials. Source authority is not an accepted best-effort tradeoff. Opaque cursors still stay with their selected home's prepared connection options. Exact sibling Codex contract personally inspected at 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157: codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only adds the LF delimiter, and :87-93 writes those serialized bytes directly. transport/websocket.rs:313-320 sends the same serializer result unchanged. This confirms the earlier malformed raw-LF reconstruction removal; external JSON parsing, warn/drop diagnostics and subsequent valid frames remain. Branch total: 330 net production LOC removed (+125/-455), excluding tests, fixtures, test support, generated files and declarations. Phase E memory, inactive foundations, public contracts, live authority, resource limits and write settlement remain untouched. Detailed requested coverage/provenance is in the task-local y12 ledgers. Proof: the 30-suite focused run passed 533 cases and failed one unchanged native-hook fallback case at its existing five-second execution budget. A failed-case-only replay hit the same deadline (95s case wall time under load). No main-side test replay establishes attribution; do not call it main-red or claim fully green focused proof. Retained cursor regression passed 9/9; lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics all reproduce on independently installed pinned main 7878a57 with matching unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof. Independent final-input review's only finding incorrectly requires a boolean third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares the options object, and isolated Node 26.5 confirms skipPrototype:true behavior. Reject that finding on source/runtime evidence, not with a cast or suppression. Earlier full-candidate review's sole index-only cursor finding was resolved by staging the repair. No remaining accepted actionable finding. Canonical Madge and SDK-artifact lint preparation remain unproven after prior load-limited attempts; changed-selector preparation failed with native SIGILL. Runtime value cycles are zero. The only new import edge is a Node builtin; account registration contracts index-to-registrar-to-runtime to index-to-runtime. Final-source catalog proof: 25/25 pass, including obsolete-source list/pin rejection and cursor affinity. Final targeted source-backed typecheck exits0, including the exact comparison call questioned by review. Format and diff checks pass. No public SDK export, schema, protocol, dependency, permission, durability or retention change. Below500 branch-only handoff; no PR or merge. * docs: align Codex framing and worktree cache behavior * fix: preserve MCP schema filtering and release assertions Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts. * fix: remote model catalogs stop refreshing on newer modalities (#173038) * fix: keep remote model catalogs refreshing across releases Project both hosted formats to released input modalities and isolate malformed remote model rows. Preserve strict generator validation and transport sanitization. Fixes #173027. * test: cover catalog row isolation through refresh and publication Narrow dynamically loaded parser functions for script typechecking. Update integration expectations to preserve valid rows instead of rejecting entire downloads, as required by #173027. * fix: retain the last catalog when no valid model rows survive * fix: preserve standalone pricing-only v1 catalogs * fix: omit catalog models with no supported input modalities * fix: preserve catalog publication gates after modality filtering * fix: omit empty inputs produced by catalog hydration * perf(models): preserve catalog sanitizer entry compaction * test(gateway,media,secrets,browser,agents,otel): remove low-value tests (batch d123) (#173141) * test(gateway): deslop x4070 tests * test(media-understanding): deslop x4071 tests * test(secrets): deslop x4072 tests * test(browser): deslop x4074 tests * test(agents): deslop x4073 tests * test(diagnostics-otel): deslop x4077 tests * test: retain distinct session and credential rollback coverage
…law#173092) * refactor(gateway): simplify diagnostic state and internal metadata paths Consolidate worker catalog loading and remove duplicate internal copies, metadata reconstruction, cleanup, and speculative diagnostic ordering machinery. Keep authentication, live effect authority, persisted shapes, shutdown write settlement, bounded caches, and terminal admission/spawn limits. Best-effort tradeoffs accepted Provenance below identifies synthetic/speculative introduction evidence, not a linked human actual-use incident. Security, durability and real resource limits remain independently protected. - Health publication generations (openclaw#116681, synthetic overlap reproduction): overlapping passive/probe samples now publish in completion order; next refresh replaces stale diagnostics. Separate probe work and public/admin audiences stay. - Observer request generations (openclaw#112958, structured-review race): an A-B-A model change during one in-flight digest can accept that digest; cancellation, current session/model checks and disclosure authorization remain. - GitHub target early registry invalidation (openclaw#167189, synthetic invalidation test): discovery may be stale for its existing 15-second TTL; publication verifies Git afresh and cached reads still check current connection/source authority. - Automation badge build epochs (openclaw#104730, structured review): latest completed service start supplies display facts; scheduling and stale-owner unregister stay. - Terminal victim claim/release protocol (openclaw#116101, synthetic autoreview interleavings): reserve pooled free+idle capacity instead, then select the actual unviewed idle victim at registration. Newly viewed victims survive; a replacement without an eligible victim fails and kills its backend. Both hard limits remain. - Launch JSON snapshot/revalidation (openclaw#123033, synthetic caller mutation): trust the tunnel-owned prepared descriptor; a caller violating ownership can mutate it. Negotiated options still use a shallow copy and node input validation remains. - Worker catalog output copies (openclaw#142095, schema mirrors) and display settings clone: trust closed-schema-validated, documented process-stable metadata and internally owned settings. A future provider violating that contract can mutate cosmetic metadata or miss notifications until a later row/config refresh or restart; live allocation validation remains. - Artifact descriptor freezing/refreezing (openclaw#163446, immutable-result assertion): readonly types govern internal consumers; an internal type-contract violation can mutate shared metadata. Archive verification and worker-close ordering stay. - Post-fetch CI summary reread (openclaw#160108, synthetic identity review): exact selected head diagnostics may finish while the PR summary refreshes; UI selected-head matching, upstream identity and live disclosure/credential checks remain. - Startup-log generation switching (openclaw#141736/openclaw#126627, synthetic supersession behind startup admission): a queued boot log may describe boot rather than replacement facts. Plugin attachment, trust enforcement and service ownership stay current. - Hook replay promise/object identity checks (openclaw#139155): private writers cannot replace or prune pending/active entries. If a future writer breaks that invariant, completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay. - Boxed-primitive JSON coercion probes (openclaw#158572, synthetic boxed-value cases): ordinary tool payloads retain measured early budget rejection. Exotic boxed strings may serialize before rejection by the unchanged final exact byte cap; native JSON owns their coercion instead of custom per-value probes. Model detail reads use the exact configured inventory already built in the same synchronous request frame instead of resolving agent membership a second time (openclaw#114388/openclaw#159177). Syntax, authentication, read scope and exact membership stay. GitHub publication keeps its covering finally release instead of releasing twice. The attempted prepared-workspace cache substitution was dropped: ordinary late ACK publications can hide live authority while durable staged facts still exist. Phase E standalone session memory and its tests are untouched. BELOW-500 lane packet for coordinator bundling; no standalone PR. Net production LOC: 217 removed (109 added / 326 removed, 20 files). Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus largest-first owner sweeps exhausted sound candidates; rejected cuts stay out. Local proof - Full core production types and all four Gateway test-type graphs passed. - Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward. - Changed-file format, diff checks, targeted production/test lint passed after correcting the terminal selector to toSorted. No new suppression. - Lint-suppressions: 3 tests passed on the settled source. - Startup post-attach owner: 88 tests passed in the final isolated run. - Focused runs reported passing terminal lifecycle/eviction/detach, health, hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron, chat state, observers, real models HTTP e2e, publication database/provisioning/ availability and GitHub read/target-discovery cases. The aggregate selections were intentionally stopped, so this is not a full-suite pass claim. - Independent review completed. Two final findings were declined with source evidence: the retained unconditional finally releases the sole publication acquisition, and closed metadata schemas still reject unknown properties. Proof gaps - server.hooks.test.ts / handles auth, wake, and agent flows timed out at 120000ms during Gateway startup (207133ms reported elapsed). Its requests have no idempotency key and bypass the removed replay checks, but no conclusive head-vs-main attribution was established. Later successful Gateway startups are not a claimed repair. No retry, timeout increase, skip, or weaker assertion. - Expanded local selections were stopped rather than running more unchanged guest/integration variants on the loaded host. Bundle CI remains broad proof. - Full check-changed was stopped during the broad SQLite inventory. Preceding conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and reproduced on the untouched base index. No budget was changed. This is base evidence, not current-main CI attribution. - No qualified before/after timing comparison or performance claim. No hosted PR CI exists for this branch-only lane packet. * refactor(gateway): consolidate MCP schemas and Talk target ownership Use Node's maintained deep comparator for MCP JSON schemas and remove defensive throwing-getter readers plus their synthetic-only fixture. Keep schema input validation, advertised-schema invocation membership, normalization, top-level copies and the equal-schema warning/deduplication behavior from human issue openclaw#98437. Inline Talk's sole-caller storage resolver and forwarding assertion adapter. All four callers still assert the exact prepared target at the original effect. Trust Rastermill's dimension fitting instead of rechecking encoder output; retain input limits and the byte-limit check/error. Drop the optional initial metadata catch-up event version fence; retain actual model readiness and runtime authority. Best-effort tradeoffs accepted - Throwing in-process tool metadata getters/spread (openclaw#88410, ad9acf4): the introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not a live client report. A broken plugin getter now fails the request clearly rather than silently omitting that tool. Security and schema shape checks stay. - Exotic non-JSON schema objects: the custom comparator from openclaw#103171 now uses isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including insertion order, stays; symbol-bearing or exotic JS objects may warn differently. Preserve the real issue openclaw#98437 warning reduction and process-lifetime dedupe. - Encoder output dimension recheck (openclaw#169449, ce6a64f): the introducing cutover explicitly made Rastermill own fitting, confirmed in its implementation. A future encoder contract bug can produce an oversized-dimension image; repair that owner rather than validate its output again in Gateway. Input/byte bounds stay. - Initial chat metadata catch-up versions (openclaw#123433, 1ae5f94): synthetic restart/Testbox provenance without a linked human incident. Overlapping initial catch-up and model invalidation can briefly mark display availability and cause an optional refresh warning; the next publication converges. Current model readiness, runtime authority/failure handling and write settlement stay. Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC. Phase E standalone memory backend, machinery and tests are untouched. Same branch, no conflict/rebase, no PR at the below-500 ending threshold. Provenance openclaw#88410 openclaw#103171 openclaw#98437 openclaw#169449 openclaw#123433 openclaw#169622 Proof - Fresh full core production types, targeted core type-aware lint, formatter and diff checks passed. Changed-check classification completed. - Fresh runtime cycles: 0; Madge cycles: 0; no new component. - Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged. Loaded-host wall time: 1711.09s including cold preparation; no before/after performance claim. - Independent review completed scoped-clean P0-P2; no actionable findings. - Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall: union/prototype properties, malformed/boolean variants, literal constraints, real HTTP equal-schema warning dedupe, and orientation-aware resized delivery. The name filter left 96 unrelated cases unrun; no test skips were added. - Initial root-config lint failed before linting while unrelated plugin SDK declarations timed out at 300000ms. Correct source-backed core-config routing passed without skipping preparation or increasing any timeout. Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup without conclusive head-vs-main attribution; a later successful startup is not a claimed repair. Earlier expanded local selections and full check-changed were stopped under load. The earlier env-var budget failure reproduced on its untouched base, not current-main CI. No timeout increase, retry, skip, assertion weakening, or baseline change was used. Full Gateway/integration proof belongs to bundle CI. No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage, provenance, rejected candidates and proof are retained in .local/y06-ledger.md. * refactor(codex): simplify transport and catalog bookkeeping Remove malformed JSON reconstruction and its continuation-only bookkeeping, redundant config copies, post-write rereads and duplicate internal checks. Reuse the existing final-config hook builder. Preserve valid JSON framing, external input validation, redaction, live effect authority, resource bounds, normal concurrent sessions, persisted shapes and write settlement. Best-effort tradeoffs accepted - Raw LF inside JSON strings is no longer reconstructed. Direct commit 67de049 and follow-ups openclaw#101221, openclaw#151399 and openclaw#162559 use synthetic malformed frames, not a cited human incident. Such frames warn/drop; later valid frames continue. A missing RPC reply can reach the existing request timeout. This also removes the recovery-only pending-route and per-request row-budget snapshots. - Unsupported in-place mutation of published config/start objects may become visible to a request. Ordinary reload replaces the config object. openclaw#162912 fixed human heap-OOM openclaw#162802 by sharing clones; removing copying preserves that allocation protection without another snapshot cache. - A node finalization commit followed by a rejected promise now surfaces the error. openclaw#106927's lost-receipt path was synthetic, with no cited human incident. The durable binding stays installed; next Continue retries the same deterministic session. Same-session/home/harness write checks stay. - Invalid numeric waiter facts from a trusted internal producer are no longer discarded by redundant diagnostics validation. openclaw#149616 supplied synthetic correlation proof, not a human incident. Egress string allowlists and all resource bounds remain; catalog results are unaffected. - An unsupported offline writer changing a row immediately after successful CAS/ownership recording is no longer caught by another reread. openclaw#168479, openclaw#166575 and openclaw#170511 supplied synthetic migration machinery, not a cited competing-writer human report. CAS conflicts, initial/post-register checks, leases and retained-sidecar recovery stay. Next migration reconciles it. - An impossible-on-wire cyclic/BigInt tool value now throws rather than silently omitting output. openclaw#70966/openclaw#107680 cite no human serialization incident; protocol payloads are JSON values and local records use those values/primitives. Network validation remains at the transport boundary. - Already-validated binding hashes are not parsed again after normalization (openclaw#164197/ffd07590546). Initial persisted-input validation and the human fingerprint-overflow fix openclaw#104503 remain intact. - The bootstrap decision no longer accepts a duplicate projection input (21b8ae5): its only production caller already puts the same projection into expectedBinding, whose canonical comparator checks it. No separate recoverable scenario or public reason contract is lost. Sibling Codex source contract inspected: codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes. codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and v2/mcp.rs:208-224 define JSON MCP results and string errors. Net production reduction: 249 lines (+97/-346), excluding tests, fixtures, test support, generated files and declarations. Phase E memory is untouched. Detailed scope/provenance coverage remains in the requested .local/y12 ledgers. Proof so far: independent P0-P2 review scoped-clean, targeted source-graph typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and git diff --check pass. Post-review edits only remove an unused test import and mechanically migrate one remaining decoder spy without weakening its assertion. Focused tests, canonical typed lint and static cycles remain pending; this is not an all-green or merged claim. Package SDK declaration preparation timed out under load and the selector dry-run exited SIGILL. Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still describes incomplete-frame recovery. Replace that description with malformed frames producing a redacted diagnostic and being dropped while subsequent valid frames continue normally. * refactor(codex): remove duplicate approval and projection machinery Use the standard deep comparator at the existing approval rewrite-denial boundary, trust the typed host approval result, reuse collected assistant fallbacks and prepared catalog connection options, remove redundant internal metadata copies and normalized agent-directory fallback, and inline the sole account-usage registrar while retaining lazy loading and administrator scope. Forward optional release arguments once without changing ownership/settlement. The first focused run exposed cursor retargeting after cache removal. Retain the existing regression test and carry the resident's captured requestOptions to every hydration page. Published config can be edited in place; the original commit's blanket immutable-config description was too strong. No cloning or global snapshot cache is restored. Best-effort tradeoffs accepted - A typed host approval result with a getter/proxy decision can now throw or be read normally, rather than receive descriptor inspection. openclaw#70751 added synthetic defenses, not a cited human incident. The production host returns authenticated Gateway JSON. Null-unavailable, cancellation and two-phase decision settlement remain unchanged. - Non-JSON hook replacements may be conservatively denied by deep comparison rather than canonical JSON text. openclaw#82496 protects a real rewrite-denial boundary, which remains; the private recursive serializer is not a contract. - Internal cached session metadata is returned without defensive cloning. openclaw#134660 introduced the copies without a metadata-mutation human incident; openclaw#164197 moved them unchanged. The sole parser only reads metadata and still clones exposed tool input schemas. A future mutating internal consumer must own its copy instead of requiring every read to clone the full object. - The agent directory no longer has a second fallback after connection setup already resolved it (openclaw#120366, owner split openclaw#151753). Invalid hand-constructed internal runtime objects are unsupported; production always supplies it. Catalog hydration retains source.assertCurrent before using captured connection options: WebSocket start options may contain credentials. Source authority is not an accepted best-effort tradeoff. Opaque cursors still stay with their selected home's prepared connection options. Exact sibling Codex contract personally inspected at 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157: codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only adds the LF delimiter, and :87-93 writes those serialized bytes directly. transport/websocket.rs:313-320 sends the same serializer result unchanged. This confirms the earlier malformed raw-LF reconstruction removal; external JSON parsing, warn/drop diagnostics and subsequent valid frames remain. Branch total: 330 net production LOC removed (+125/-455), excluding tests, fixtures, test support, generated files and declarations. Phase E memory, inactive foundations, public contracts, live authority, resource limits and write settlement remain untouched. Detailed requested coverage/provenance is in the task-local y12 ledgers. Proof: the 30-suite focused run passed 533 cases and failed one unchanged native-hook fallback case at its existing five-second execution budget. A failed-case-only replay hit the same deadline (95s case wall time under load). No main-side test replay establishes attribution; do not call it main-red or claim fully green focused proof. Retained cursor regression passed 9/9; lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics all reproduce on independently installed pinned main 377d73b with matching unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof. Independent final-input review's only finding incorrectly requires a boolean third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares the options object, and isolated Node 26.5 confirms skipPrototype:true behavior. Reject that finding on source/runtime evidence, not with a cast or suppression. Earlier full-candidate review's sole index-only cursor finding was resolved by staging the repair. No remaining accepted actionable finding. Canonical Madge and SDK-artifact lint preparation remain unproven after prior load-limited attempts; changed-selector preparation failed with native SIGILL. Runtime value cycles are zero. The only new import edge is a Node builtin; account registration contracts index-to-registrar-to-runtime to index-to-runtime. Final-source catalog proof: 25/25 pass, including obsolete-source list/pin rejection and cursor affinity. Final targeted source-backed typecheck exits0, including the exact comparison call questioned by review. Format and diff checks pass. No public SDK export, schema, protocol, dependency, permission, durability or retention change. Below500 branch-only handoff; no PR or merge. * docs: align Codex framing and worktree cache behavior * fix: preserve MCP schema filtering and release assertions Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts.
* test(ui): migrate message and pane fixtures to Solid * test(ui): mount queue and prediction fixtures with Solid * test(ui): provide application context to native chat goal fixtures * test(ui): report packaged Workboard startup failures * refactor: deslop gateway and Codex extension (wave-5 bundle D) (openclaw#173092) * refactor(gateway): simplify diagnostic state and internal metadata paths Consolidate worker catalog loading and remove duplicate internal copies, metadata reconstruction, cleanup, and speculative diagnostic ordering machinery. Keep authentication, live effect authority, persisted shapes, shutdown write settlement, bounded caches, and terminal admission/spawn limits. Best-effort tradeoffs accepted Provenance below identifies synthetic/speculative introduction evidence, not a linked human actual-use incident. Security, durability and real resource limits remain independently protected. - Health publication generations (openclaw#116681, synthetic overlap reproduction): overlapping passive/probe samples now publish in completion order; next refresh replaces stale diagnostics. Separate probe work and public/admin audiences stay. - Observer request generations (openclaw#112958, structured-review race): an A-B-A model change during one in-flight digest can accept that digest; cancellation, current session/model checks and disclosure authorization remain. - GitHub target early registry invalidation (openclaw#167189, synthetic invalidation test): discovery may be stale for its existing 15-second TTL; publication verifies Git afresh and cached reads still check current connection/source authority. - Automation badge build epochs (openclaw#104730, structured review): latest completed service start supplies display facts; scheduling and stale-owner unregister stay. - Terminal victim claim/release protocol (openclaw#116101, synthetic autoreview interleavings): reserve pooled free+idle capacity instead, then select the actual unviewed idle victim at registration. Newly viewed victims survive; a replacement without an eligible victim fails and kills its backend. Both hard limits remain. - Launch JSON snapshot/revalidation (openclaw#123033, synthetic caller mutation): trust the tunnel-owned prepared descriptor; a caller violating ownership can mutate it. Negotiated options still use a shallow copy and node input validation remains. - Worker catalog output copies (openclaw#142095, schema mirrors) and display settings clone: trust closed-schema-validated, documented process-stable metadata and internally owned settings. A future provider violating that contract can mutate cosmetic metadata or miss notifications until a later row/config refresh or restart; live allocation validation remains. - Artifact descriptor freezing/refreezing (openclaw#163446, immutable-result assertion): readonly types govern internal consumers; an internal type-contract violation can mutate shared metadata. Archive verification and worker-close ordering stay. - Post-fetch CI summary reread (openclaw#160108, synthetic identity review): exact selected head diagnostics may finish while the PR summary refreshes; UI selected-head matching, upstream identity and live disclosure/credential checks remain. - Startup-log generation switching (openclaw#141736/openclaw#126627, synthetic supersession behind startup admission): a queued boot log may describe boot rather than replacement facts. Plugin attachment, trust enforcement and service ownership stay current. - Hook replay promise/object identity checks (openclaw#139155): private writers cannot replace or prune pending/active entries. If a future writer breaks that invariant, completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay. - Boxed-primitive JSON coercion probes (openclaw#158572, synthetic boxed-value cases): ordinary tool payloads retain measured early budget rejection. Exotic boxed strings may serialize before rejection by the unchanged final exact byte cap; native JSON owns their coercion instead of custom per-value probes. Model detail reads use the exact configured inventory already built in the same synchronous request frame instead of resolving agent membership a second time (openclaw#114388/openclaw#159177). Syntax, authentication, read scope and exact membership stay. GitHub publication keeps its covering finally release instead of releasing twice. The attempted prepared-workspace cache substitution was dropped: ordinary late ACK publications can hide live authority while durable staged facts still exist. Phase E standalone session memory and its tests are untouched. BELOW-500 lane packet for coordinator bundling; no standalone PR. Net production LOC: 217 removed (109 added / 326 removed, 20 files). Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus largest-first owner sweeps exhausted sound candidates; rejected cuts stay out. Local proof - Full core production types and all four Gateway test-type graphs passed. - Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward. - Changed-file format, diff checks, targeted production/test lint passed after correcting the terminal selector to toSorted. No new suppression. - Lint-suppressions: 3 tests passed on the settled source. - Startup post-attach owner: 88 tests passed in the final isolated run. - Focused runs reported passing terminal lifecycle/eviction/detach, health, hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron, chat state, observers, real models HTTP e2e, publication database/provisioning/ availability and GitHub read/target-discovery cases. The aggregate selections were intentionally stopped, so this is not a full-suite pass claim. - Independent review completed. Two final findings were declined with source evidence: the retained unconditional finally releases the sole publication acquisition, and closed metadata schemas still reject unknown properties. Proof gaps - server.hooks.test.ts / handles auth, wake, and agent flows timed out at 120000ms during Gateway startup (207133ms reported elapsed). Its requests have no idempotency key and bypass the removed replay checks, but no conclusive head-vs-main attribution was established. Later successful Gateway startups are not a claimed repair. No retry, timeout increase, skip, or weaker assertion. - Expanded local selections were stopped rather than running more unchanged guest/integration variants on the loaded host. Bundle CI remains broad proof. - Full check-changed was stopped during the broad SQLite inventory. Preceding conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and reproduced on the untouched base index. No budget was changed. This is base evidence, not current-main CI attribution. - No qualified before/after timing comparison or performance claim. No hosted PR CI exists for this branch-only lane packet. * refactor(gateway): consolidate MCP schemas and Talk target ownership Use Node's maintained deep comparator for MCP JSON schemas and remove defensive throwing-getter readers plus their synthetic-only fixture. Keep schema input validation, advertised-schema invocation membership, normalization, top-level copies and the equal-schema warning/deduplication behavior from human issue openclaw#98437. Inline Talk's sole-caller storage resolver and forwarding assertion adapter. All four callers still assert the exact prepared target at the original effect. Trust Rastermill's dimension fitting instead of rechecking encoder output; retain input limits and the byte-limit check/error. Drop the optional initial metadata catch-up event version fence; retain actual model readiness and runtime authority. Best-effort tradeoffs accepted - Throwing in-process tool metadata getters/spread (openclaw#88410, ad9acf4): the introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not a live client report. A broken plugin getter now fails the request clearly rather than silently omitting that tool. Security and schema shape checks stay. - Exotic non-JSON schema objects: the custom comparator from openclaw#103171 now uses isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including insertion order, stays; symbol-bearing or exotic JS objects may warn differently. Preserve the real issue openclaw#98437 warning reduction and process-lifetime dedupe. - Encoder output dimension recheck (openclaw#169449, ce6a64f): the introducing cutover explicitly made Rastermill own fitting, confirmed in its implementation. A future encoder contract bug can produce an oversized-dimension image; repair that owner rather than validate its output again in Gateway. Input/byte bounds stay. - Initial chat metadata catch-up versions (openclaw#123433, 1ae5f94): synthetic restart/Testbox provenance without a linked human incident. Overlapping initial catch-up and model invalidation can briefly mark display availability and cause an optional refresh warning; the next publication converges. Current model readiness, runtime authority/failure handling and write settlement stay. Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC. Phase E standalone memory backend, machinery and tests are untouched. Same branch, no conflict/rebase, no PR at the below-500 ending threshold. Provenance openclaw#88410 openclaw#103171 openclaw#98437 openclaw#169449 openclaw#123433 openclaw#169622 Proof - Fresh full core production types, targeted core type-aware lint, formatter and diff checks passed. Changed-check classification completed. - Fresh runtime cycles: 0; Madge cycles: 0; no new component. - Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged. Loaded-host wall time: 1711.09s including cold preparation; no before/after performance claim. - Independent review completed scoped-clean P0-P2; no actionable findings. - Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall: union/prototype properties, malformed/boolean variants, literal constraints, real HTTP equal-schema warning dedupe, and orientation-aware resized delivery. The name filter left 96 unrelated cases unrun; no test skips were added. - Initial root-config lint failed before linting while unrelated plugin SDK declarations timed out at 300000ms. Correct source-backed core-config routing passed without skipping preparation or increasing any timeout. Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup without conclusive head-vs-main attribution; a later successful startup is not a claimed repair. Earlier expanded local selections and full check-changed were stopped under load. The earlier env-var budget failure reproduced on its untouched base, not current-main CI. No timeout increase, retry, skip, assertion weakening, or baseline change was used. Full Gateway/integration proof belongs to bundle CI. No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage, provenance, rejected candidates and proof are retained in .local/y06-ledger.md. * refactor(codex): simplify transport and catalog bookkeeping Remove malformed JSON reconstruction and its continuation-only bookkeeping, redundant config copies, post-write rereads and duplicate internal checks. Reuse the existing final-config hook builder. Preserve valid JSON framing, external input validation, redaction, live effect authority, resource bounds, normal concurrent sessions, persisted shapes and write settlement. Best-effort tradeoffs accepted - Raw LF inside JSON strings is no longer reconstructed. Direct commit 67de049 and follow-ups openclaw#101221, openclaw#151399 and openclaw#162559 use synthetic malformed frames, not a cited human incident. Such frames warn/drop; later valid frames continue. A missing RPC reply can reach the existing request timeout. This also removes the recovery-only pending-route and per-request row-budget snapshots. - Unsupported in-place mutation of published config/start objects may become visible to a request. Ordinary reload replaces the config object. openclaw#162912 fixed human heap-OOM openclaw#162802 by sharing clones; removing copying preserves that allocation protection without another snapshot cache. - A node finalization commit followed by a rejected promise now surfaces the error. openclaw#106927's lost-receipt path was synthetic, with no cited human incident. The durable binding stays installed; next Continue retries the same deterministic session. Same-session/home/harness write checks stay. - Invalid numeric waiter facts from a trusted internal producer are no longer discarded by redundant diagnostics validation. openclaw#149616 supplied synthetic correlation proof, not a human incident. Egress string allowlists and all resource bounds remain; catalog results are unaffected. - An unsupported offline writer changing a row immediately after successful CAS/ownership recording is no longer caught by another reread. openclaw#168479, openclaw#166575 and openclaw#170511 supplied synthetic migration machinery, not a cited competing-writer human report. CAS conflicts, initial/post-register checks, leases and retained-sidecar recovery stay. Next migration reconciles it. - An impossible-on-wire cyclic/BigInt tool value now throws rather than silently omitting output. openclaw#70966/openclaw#107680 cite no human serialization incident; protocol payloads are JSON values and local records use those values/primitives. Network validation remains at the transport boundary. - Already-validated binding hashes are not parsed again after normalization (openclaw#164197/ffd07590546). Initial persisted-input validation and the human fingerprint-overflow fix openclaw#104503 remain intact. - The bootstrap decision no longer accepts a duplicate projection input (21b8ae5): its only production caller already puts the same projection into expectedBinding, whose canonical comparator checks it. No separate recoverable scenario or public reason contract is lost. Sibling Codex source contract inspected: codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes. codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and v2/mcp.rs:208-224 define JSON MCP results and string errors. Net production reduction: 249 lines (+97/-346), excluding tests, fixtures, test support, generated files and declarations. Phase E memory is untouched. Detailed scope/provenance coverage remains in the requested .local/y12 ledgers. Proof so far: independent P0-P2 review scoped-clean, targeted source-graph typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and git diff --check pass. Post-review edits only remove an unused test import and mechanically migrate one remaining decoder spy without weakening its assertion. Focused tests, canonical typed lint and static cycles remain pending; this is not an all-green or merged claim. Package SDK declaration preparation timed out under load and the selector dry-run exited SIGILL. Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still describes incomplete-frame recovery. Replace that description with malformed frames producing a redacted diagnostic and being dropped while subsequent valid frames continue normally. * refactor(codex): remove duplicate approval and projection machinery Use the standard deep comparator at the existing approval rewrite-denial boundary, trust the typed host approval result, reuse collected assistant fallbacks and prepared catalog connection options, remove redundant internal metadata copies and normalized agent-directory fallback, and inline the sole account-usage registrar while retaining lazy loading and administrator scope. Forward optional release arguments once without changing ownership/settlement. The first focused run exposed cursor retargeting after cache removal. Retain the existing regression test and carry the resident's captured requestOptions to every hydration page. Published config can be edited in place; the original commit's blanket immutable-config description was too strong. No cloning or global snapshot cache is restored. Best-effort tradeoffs accepted - A typed host approval result with a getter/proxy decision can now throw or be read normally, rather than receive descriptor inspection. openclaw#70751 added synthetic defenses, not a cited human incident. The production host returns authenticated Gateway JSON. Null-unavailable, cancellation and two-phase decision settlement remain unchanged. - Non-JSON hook replacements may be conservatively denied by deep comparison rather than canonical JSON text. openclaw#82496 protects a real rewrite-denial boundary, which remains; the private recursive serializer is not a contract. - Internal cached session metadata is returned without defensive cloning. openclaw#134660 introduced the copies without a metadata-mutation human incident; openclaw#164197 moved them unchanged. The sole parser only reads metadata and still clones exposed tool input schemas. A future mutating internal consumer must own its copy instead of requiring every read to clone the full object. - The agent directory no longer has a second fallback after connection setup already resolved it (openclaw#120366, owner split openclaw#151753). Invalid hand-constructed internal runtime objects are unsupported; production always supplies it. Catalog hydration retains source.assertCurrent before using captured connection options: WebSocket start options may contain credentials. Source authority is not an accepted best-effort tradeoff. Opaque cursors still stay with their selected home's prepared connection options. Exact sibling Codex contract personally inspected at 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157: codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only adds the LF delimiter, and :87-93 writes those serialized bytes directly. transport/websocket.rs:313-320 sends the same serializer result unchanged. This confirms the earlier malformed raw-LF reconstruction removal; external JSON parsing, warn/drop diagnostics and subsequent valid frames remain. Branch total: 330 net production LOC removed (+125/-455), excluding tests, fixtures, test support, generated files and declarations. Phase E memory, inactive foundations, public contracts, live authority, resource limits and write settlement remain untouched. Detailed requested coverage/provenance is in the task-local y12 ledgers. Proof: the 30-suite focused run passed 533 cases and failed one unchanged native-hook fallback case at its existing five-second execution budget. A failed-case-only replay hit the same deadline (95s case wall time under load). No main-side test replay establishes attribution; do not call it main-red or claim fully green focused proof. Retained cursor regression passed 9/9; lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics all reproduce on independently installed pinned main 377d73b with matching unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof. Independent final-input review's only finding incorrectly requires a boolean third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares the options object, and isolated Node 26.5 confirms skipPrototype:true behavior. Reject that finding on source/runtime evidence, not with a cast or suppression. Earlier full-candidate review's sole index-only cursor finding was resolved by staging the repair. No remaining accepted actionable finding. Canonical Madge and SDK-artifact lint preparation remain unproven after prior load-limited attempts; changed-selector preparation failed with native SIGILL. Runtime value cycles are zero. The only new import edge is a Node builtin; account registration contracts index-to-registrar-to-runtime to index-to-runtime. Final-source catalog proof: 25/25 pass, including obsolete-source list/pin rejection and cursor affinity. Final targeted source-backed typecheck exits0, including the exact comparison call questioned by review. Format and diff checks pass. No public SDK export, schema, protocol, dependency, permission, durability or retention change. Below500 branch-only handoff; no PR or merge. * docs: align Codex framing and worktree cache behavior * fix: preserve MCP schema filtering and release assertions Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts. * fix: remote model catalogs stop refreshing on newer modalities (openclaw#173038) * fix: keep remote model catalogs refreshing across releases Project both hosted formats to released input modalities and isolate malformed remote model rows. Preserve strict generator validation and transport sanitization. Fixes openclaw#173027. * test: cover catalog row isolation through refresh and publication Narrow dynamically loaded parser functions for script typechecking. Update integration expectations to preserve valid rows instead of rejecting entire downloads, as required by openclaw#173027. * fix: retain the last catalog when no valid model rows survive * fix: preserve standalone pricing-only v1 catalogs * fix: omit catalog models with no supported input modalities * fix: preserve catalog publication gates after modality filtering * fix: omit empty inputs produced by catalog hydration * perf(models): preserve catalog sanitizer entry compaction * test(gateway,media,secrets,browser,agents,otel): remove low-value tests (batch d123) (openclaw#173141) * test(gateway): deslop x4070 tests * test(media-understanding): deslop x4071 tests * test(secrets): deslop x4072 tests * test(browser): deslop x4074 tests * test(agents): deslop x4073 tests * test(diagnostics-otel): deslop x4077 tests * test: retain distinct session and credential rollback coverage
What Problem This Solves
Native session bindings still expose host-thread persistence and synchronous preparation through harness adapters.
User Impact
Native binding preparation and ordinary lifecycle mutations can complete through the worker while released synchronous integrations remain supported.
Released native lifecycle forms are deprecated with their replacements. Final effect-time authority checks remain synchronous. The Codex warm path rechecks the owner after its awaited binding read.
Why This Change Was Made
Adds the V2 native binding lifecycle and async harness ownership companion, then migrates Codex and AgentsAPI callers. Native settlement remains explicitly selected for initialization, incognito and mixed released participants. Worker failure or unknown settlement never triggers a native retry.
This is part 2 of the nine-part S7 state/binding migration stack. Targets
dbasync/sw7b-1(parent PR); validation compares this part with its actual stack parent5915284db816. The stack integrates pinned main413d5f9bb3f7.Evidence
Changed lines against the parent: production +897 / -345; tests and fixtures +1013 / -566.
Focused integrated receipts cover native leases and generation authority, AgentsAPI persistence, and Codex binding/lifecycle settlement: 808 passed, 0 skipped, mapped to 33/33 changed test files. These are recorded integrated file versions, not independent runs of every prefix; per-part counts are not additive. Stack totals are 3,296 passing receipts, 3,295 after removing one known relocation duplicate, and three skipped cases across 177 files; no required focused file remains missing.
Recorded file spans total 418.102s. The relevant repaired integration batch took 496.047s wall time for 22 files; that is not a standalone timing for this part. File spans and invocation wall times are distinct; CI runner seconds were not measured.
Owner-reviewed native SDK digest:
52d998fe8ebd703af9f7c48b4c98aa726c9c27eb69507da71d8206119208220c. Zero released export removals; the digest reconciles to this parent/head through the generated-only baseline change. The async native-ownership hook is optional; the synchronous hook remains.The S7 family audit at c3667d2 resolved 18,862 inputs, 1,766 calls, 521 imports and 78 member references: 153 explicitly classified retained edges, zero unknown edges or async-contract errors. The publisher repair changed five scanned modules containing none of those captured family edges; retained-edge sources stayed unchanged. Final source differs from the passing repair head only by its generated assertion baseline. This preserves the original scan provenance rather than claiming a new full scan.
Core and extension production typechecks passed for all nine source prefixes; the final generated-only assertion-baseline adjustment does not change their code. The selected check-changed commands were executed, with the inherited failures below preserved.
Inherited failures remain explicit: Knip flags
.github/actions/setup-release-harness/narrow-lockfile.mjsandsrc/infra/sqlite-source-fence-admission.ts; the production export scan flagsPUBLIC_SESSION_ENTRY_SCRIPT; core lint has 10 unchanged max-lines findings; the environment-name count is 456/455, including unchangedOPENCLAW_PITCH. Relevant source/config blobs equal the pinned base. No blanket check-changed-green claim is made.Three scoped review rounds completed. Accepted correctness findings were repaired; remaining scoped follow-ups are recorded in the relevant PR descriptions.
Final repair checks passed at
4b7d96b620ea: scoped lint (30.02 s), affected test types (342.12 s), import-cycle guard (23.46 s), and Madge (14.91 s).Exact-final remote pnpm build passed in 369.642s. The qualified Matrix cold-import snapshot measured 104.992 MiB peak RSS, +58.199 MiB versus the empty baseline, and 383.791ms process CPU. Child/process-group cleanup and temporary-home removal were verified. This is a cold-import snapshot; the dependency closure is not attested. Statement-gate evidence follows separately; the update cell remains pending for the lander.
Paired statement and request evidence
SQL statement gate
The native measurement group completed with exit 0. Its outer wrapper later returned 7 while reporting terminal telemetry; native completion receipts were reconciled, and the workload was not rerun merely for that reporting failure.
Accepted for
5915284db816 → 8a729050a0a2. Same synthetic workload, ten warmed turns per run; three original alternating pairs followed by two extra pairs. All five pairs are retained. Adjacent-prefix comparisons in this PR stack share intermediate samples; each filtered base/head sequence remains alternating. Values below are base→head medians; warmed SQL/requests are per turn, while warmed wall time covers all ten turns. MAIN is Gateway-main-thread SQL. Wall ratio is head/base; no duration skew.The warmed increase is +1.2 SQL/turn (+0.1194%), within the ≤0.5% unchanged-owner tolerance. All warmed native SQL stacks across all five pairs were compared with this PR's changed paths: none intersects them. MAIN remains 6.9 SQL/turn. The exact total-median samples are run 2 on both sides, for both primary3 and cumulative5; their ten-turn difference reconciles as follows.
data_version,main.page_size,main.wal_checkpoint(NOOP)config_machine_statecontent-version readsThe auth stack is
readAuthProfileRows → prepareSqliteReadCache/readCacheToken → readSqliteWalState; auth requests stay 30→30. Shared facts run throughwithSessionRowDatabaseFacts → refreshBatch → drainand stay 65→65 requests. Pending-input reads stay 10→10; mention snapshots 30→30. Their producing modules are unchanged. The only changed warmed sender module,session-accessor.sqlite-deletion.ts, carries publication/lifecycle work with unchanged request counts and neutral SQL in the total-median samples. Every warmed window retains 110 patch commits, ten turn commits, ten lifecycle projections and 50 domain publications.The RAW follow-up is extra5: whole SQL 22100→22094 and requests 3404→3404. Extra4's 21880→22004 SQL / 3384→3400 requests remains visible above. The final second-session increase is +19 SQL (+0.494%), within 2%, from existing projection and schema admission; cron +4 is within ten statements and includes the existing
observeRecoveryProposalsrequest (+6 SQL, offset by other reads). Compaction +1 is the existing passive WAL checkpoint. Shutdown SQL is unchanged; its extra request is a zero-SQL close. The verdict uses raw all-thread totals and unchanged-owner attribution, not foreground subtraction.The published-driver × candidate update cell is pending (lander). No release, package publication or Plugin SDK major bump is included.