Skip to content

feat(plugin-sdk): awaited session persistence; deprecate sync transcript writes - #163264

Merged
steipete merged 18 commits into
mainfrom
dbasync/sdk-async
Oct 2, 2026
Merged

steipete merged 18 commits into
mainfrom
dbasync/sdk-async

Conversation

@steipete

@steipete steipete commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Session transcript persistence has an incomplete awaited SDK: bundled callers still use synchronous writes, and some async message calls silently fall back to caller-thread SQLite.

User Impact

Plugins can await transcript mutations, extension session changes, and provider replay metadata until the existing SQLite writer commits. The synchronous APIs retain their current behavior as deprecated third-party compatibility adapters until the next Plugin SDK major, with one warning per method per process.

Incognito remains with its existing host-owned store until its worker migration activates. Native compaction retains its existing synchronous source-authority row check for callbacks that must fail immediately; transcript persistence is awaited through the writer. Transcript formats, schemas, retention, and update/Doctor behavior are unchanged; no data conversion is required.

Why This Change Was Made

SDK-owner direction: Peter Steinberger explicitly requested this public SDK evolution on October 1, 2026: “i rather have us build better SDK calls now and deprecate sync stuff.” This is the owner-directed addition of awaited calls and deprecation of retained synchronous adapters; it does not shorten their compatibility window.

Complete the existing SessionManager async family and move bundled callers onto it. Keep FIFO admission, input custody, live authority, atomic compaction accounting, branch/leaf semantics, and committed view publication with their existing owners. A known commit that cannot be published is reported without replaying the write.

This is one PR because separating provider replay into a follow-up would leave bundled Google and ClawRouter replay calling the deprecated synchronous path in the SessionManager PR. The API replacements and their consumers need to move together.

API migration

Synchronous API Awaited replacement
SessionManager.appendMessage appendMessageAsync
appendMessageWithTranscriptAnchor appendMessageWithTranscriptAnchorAsync
appendCompaction appendCompactionAsync
appendResetBoundary appendResetBoundaryAsync
appendCustomEntry appendCustomEntryAsync
appendSessionInfo appendSessionInfoAsync
appendCustomMessageEntry appendCustomMessageEntryAsync
appendLeafControl appendLeafControlAsync
appendLabelChange appendLabelChangeAsync
branch branchAsync
branchWithSummary branchWithSummaryAsync
removeTrailingEntries removeTrailingEntriesAsync
persist persistAsync
prepareTranscriptRewrite prepareTranscriptRewriteAsync, then await its commit
SessionManager.appendMessageToTranscript SessionManager.appendMessageToTranscriptAsync
SessionManager.open / openBounded openAsync / openBoundedAsync
SessionManager.openDetachedBounded / openModelContext openDetachedBoundedAsync / openModelContextAsync
setSessionTarget / reloadPersistedTranscript setSessionTargetAsync / reloadPersistedTranscriptAsync
ExtensionAPI.appendEntry appendEntryAsync
ExtensionAPI.setSessionName / setLabel setSessionNameAsync / setLabelAsync
AgentSession.setSessionName setSessionNameAsync
ProviderReplaySessionState.appendCustomEntry ProviderReplaySessionStateV2.appendCustomEntryAsync
ProviderPlugin.sanitizeReplayHistory sanitizeReplayHistoryAsync with the V2 context
sanitizeGoogleGeminiReplayHistory sanitizeGoogleGeminiReplayHistoryAsync

Awaited methods preserve the corresponding entry ID/result. persistAsync remains a raw write and does not add an entry to the loaded tree. resetLeafAsync adds ordered in-memory navigation; synchronous resetLeaf remains supported. Existing promise-returning model/thinking changes and createBranchedSession keep their names.

const manager = await SessionManager.openAsync(target);
const entryId = await manager.appendCustomEntryAsync("plugin-state", { ready: true });
await manager.appendLabelChangeAsync(entryId, "ready");
await api.setSessionNameAsync("Research session");

Compatibility records in src/plugins/compat/session-persistence-records.ts, aggregated by registry-records.ts, are session-manager-sync-persistence, extension-session-sync-persistence, and provider-replay-sync-persistence. All use removalGate: "next-plugin-sdk-major"; none has a calendar removal deadline. The retained adapters are the deprecated SessionManager methods, their synchronous guard bindings, legacy ExtensionAPI/AgentSession bindings, and the legacy provider replay hook/state/helper. They remain solely for third-party compatibility.

Bundled migrations cover session runtime and replay, compaction and cleanup, worker/Gateway transcript commits, CLI transcripts, and Google-family, ClawRouter, and GitHub Copilot provider hooks. Runtime fixture helpers also use awaited setup; compatibility suites retain coverage of synchronous behavior. Caller audits use git grep plus an untracked-file check. The remaining direct synchronous calls outside SessionManager are the named ExtensionAPI entry/label adapter, AgentSession.setSessionName adapter, and legacy provider replay state adapter; active bundled flows use their awaited replacements.

Tracked bundled-caller audit command
git grep -n -E '\.(appendMessage|appendMessageWithTranscriptAnchor|appendCompaction|appendResetBoundary|appendCustomEntry|appendSessionInfo|appendCustomMessageEntry|appendLeafControl|appendLabelChange|branchWithSummary|removeTrailingEntries|prepareTranscriptRewrite|reloadPersistedTranscript|setSessionTarget|branch|resetLeaf)\(|SessionManager\.(open|openBounded|openDetachedBounded|openModelContext|appendMessageToTranscript)\(' -- src extensions packages ':!*.test.ts' ':!*test-support.ts' ':!*test-helpers.ts' ':!*test-harness.ts' ':!*harness.ts' ':!src/test-utils/*' ':!src/plugin-sdk/test-helpers/*'

Matches were inspected for receiver ownership; only the named compatibility adapters, SessionManager forwarding methods, supported local-only resetLeaf, and unrelated APIs remain. A separate persist/ExtensionAPI/provider-hook search and an rg pass including new files completed the audit. Awaited writes return into their existing settlement owners; worker notifications enqueue synchronously and are drained before completion.

Landing validation

Current head: ffcc2e9aac2b7e7d70503be44a073091cb7698cd. Exact-head CI run 37011923214 completed attempt 2 with 142 jobs settled: Windows passed its authorized single-job rerun; only the independently main-reproduced Linux assertion and its aggregate CI gate remain failed. ClawSweeper completed the exact-head review with no actionable correctness or security findings. The Windows failure was investigated under coordinator direction and passed its one authorized single-job rerun. The remaining inherited Linux failure follows the approved native admin route. The prior head a3638e99da6b455eb520b28b6c4bb7af8da4cfc5 passed CI run 37007596489, with 141 jobs settled and zero failures, and completed ClawSweeper review with no actionable correctness or security findings. That is retained prior-head evidence, not current-head CI.

Main subsequently conflicted in the assertion baseline. Merge commit 11756b4feb5260ff8397799a6dd0071741f908b6 incorporates main 96c556f653817b24bb95ee6e7c4e464562dffabb, preserving main's obsolete-row removal and this PR's shrink-only assertion counts. The awaited compaction boundaries, prompt-history tracking, and both transcript-worker operation families remain intact. No newly landed active bundled calls to deprecated persistence APIs were found.

The merged composition passed all 112 tests across eight session-boundary, compaction, async-message, maintenance, model-context, generation-readiness, and artifact-planning files (437.17s wall including source verification). Core types, SDK surface/exports, formatting, assertion safety, and the exact-parent database-worker ratchet pass; T1 does not increase. Commit ffcc2e9aac2b7 fixes two line-cap increases by moving hydration result types beside request types and extracting the CLI hook fixture. It preserves aggregate type exports and every test assertion. The full CLI reliability file passes 52/52 tests (88.129s); targeted semantic lint, core types, line-cap and suppression ratchets, and Madge (zero cycles) pass.

check-changed then reaches an independently reproduced main failure: 477 environment names against budget 476. Clean exact main 96c556f fails the same guard with the identical name set. Main commit cee0906f3877c436725a079d4e41537fc204f75c introduced OPENCLAW_PROMPT_CACHE_ASSERT in src/agents/embedded-agent-runner/prompt-cache-observability.ts without changing the budget. This PR adds or removes zero counted names, and the budget is unchanged. Current-head CI will determine whether an inherited-failure exception is needed.

Windows failure investigation and authorized rerun: job 110853876349 failed extensions/acpx/src/runtime-argv.process.test.ts in preserves ACP argv through real processes and reconnect (leased=true, command=path) with ACP_SESSION_INIT_FAILED after 5000ms. The coordinator authorized one single-job rerun after ruling out PR causation. The fixture calls ACPX ensureSession and its unchanged startup client. Its before/after-spawn lease callbacks use processLeaseStore.save → PluginStateKeyedStore.register → the shared plugin-state worker. They do not execute this PR's SessionManager async methods, deprecated sync wrappers, transcript writes, or session-history worker routing. The ACP reply-dispatch path is lazy and is not invoked by this fixture. The generated wrapper imports only Node built-ins; the synthetic peer imports Node built-ins and the ACP SDK. Protocol traffic uses stdout and diagnostics use stderr, and the log contains no persistence-deprecation warnings or JSON parse failures.

The 5000ms budget also covers wrapper/child startup and Windows descendant discovery after the initialize handshake. The exact slow phase is unknown. Compared with successful prior-head run 37007596489, the native Windows shard increased from 355.25s to 463.54s (+30.5%). Its Windows process group rose from 108.06s to 159.57s and its ACP group from 35.37s to 81.62s; together they account for about 90% of the increase. Unleased ACP cases and unrelated native/node/npm-shim CLI launches were substantially slower too. Worker compilation was faster and median matched passing-test time was unchanged, so this was broader process-startup slowdown, not uniform shard slowness. There is no CPU/load telemetry establishing the underlying cause.

The seven completed scheduled-main runs inspected from workflow 209874334 all passed Windows job 1; the newest scheduled run was queued. The bounded sample of recent failed PR runs likewise found passing applicable Windows rows, not the same timeout. Historical passes do not prove a flake. The reachability evidence independently satisfies the coordinator's condition for one targeted retry; no code, timeout, baseline, or assertion was changed. The one Windows-only rerun completed successfully as job 110861721133, attempt 2, at 13:52:16 UTC. No additional rerun was submitted. This passing retry is not presented as a code fix or proof of the original timing cause.

The other failed root, Linux job 110853879915, is independently proven inherited: untouched embedded-agent-runner.guard.test.ts still expects “missing tool result,” while main commit cee0906f intentionally changed the default interruption guidance. The full file on clean main 96c556f reproduces the identical failure (15 passed, 1 failed, 116.002s). All nine causal files match CI main fc17c21; the failing assertion, fixtures and text producer also match tested merge 292df717db8d3fda8610ff098018029274394935. The latest hourly main run predates the introducing commit; subsequent push runs are security-only. This qualified failure does not qualify the separate Windows timeout. The inherited Linux result remains failed evidence. Native admin evidence binds attempt 2, current failed job 110861730317, aggregate gate 110866559677, the exact tested merge, unchanged causal files, and the independent clean-main reproduction. All 142 jobs are terminal with no cancellations; security checks passed.

The important integration repairs keep an already-published newer native view when an older worker receipt arrives and move maintenance projection reconciliation to the host owner after worker commit. Previously a transient worker scheduled work the host could not observe, leaving bounded reads in rebuilding. Committed reconciliation facts now return to the existing host owner with the captured source/new-branch identity. Existing authority, custody, and settlement guards remain intact; schemas and public return types are unchanged.

Focused proof: the repair-tree Linux Testbox campaign passed 342 tests across 17 suites, with one existing platform skip (306.16s); both final projection regressions fail old production with SessionTranscriptProjectionUnavailableError: rebuilding (49.38s). Subsequent merged-composition proof passed 19 read-worker/session tests (156.78s), 12 recovery-report tests (213.96s including cache preparation), and all 66 memory-host, startup-WebChat, and terminal-failure tests after main's fixes (258.27s). These retain earlier proof for unchanged inputs; they are not a claim of green current-head GitHub CI.

Core production and affected test types, targeted lint/formatting, SDK export/surface checks, Madge (zero cycles), and the worker ratchet pass. The current candidate has no T1 growth against incorporated main 96c556f. The previous integration's native CI manifest passed with 73 selected rows. The selected shared-SDK package boundary and memory-wiki consumer compile also pass. Earlier check-changed reached the known 11 overdue compatibility records, independently reproduced on its base; this PR adds no date-eligible retirement record, and that guard was not weakened.

SDK compatibility: generated comparison on repair tree fa6e9d23da21 against 2ab22d8772fb passed in 297.308s: four added direct exports, no removed exports/entrypoints or changed direct signatures. Reachable declarations have 25 additions, 54 changes, and no whole removals; inheritance-aware inspection finds no missing public/protected members. Legacy extension/replay contracts remain compatible and new runtime hooks are optional. The introduced delta across session classes, provider owners, and the four SDK barrels is still byte-identical after the latest merge (324,272 bytes; SHA-256 aa2419e2d1c433dba0ce59f0c86de404b1ffa3d271c2318618f130ef88b57c9b). This reuses generated proof with source verification; it is not a freshly generated final-head global declaration digest.

Review: the full merged candidate completed both P2 review passes. One queued-rename finding was rejected against the actual owner: appendSessionInfoAsync calls appendEntryAsync and withSessionManagerWrite synchronously; the latter captures the original target before enqueueing, then rejects a changed target before invoking the write callback. The post-commit publication check protects the separate continuation boundary. The four-file extraction then completed fresh P2 review with no accepted/actionable findings. The earlier workspace-conflict retry finding was rejected after tracing typed recovery and atomic transcript deduplication; the 12-case recovery suite passes. Exact-head ClawSweeper completed successfully in workflow 37012006262 at 13:22 UTC with no correctness or security findings. Its generic compatibility checklist is covered by the recorded owner direction and unchanged stored formats.

CI failure handling: run 36986586871 exposed duplicate test routing; cef4b507b16a removes it. Run 36987779764 exposed the projection bug, asynchronous fixtures/mocks, host-broker routing, wrapper import closure, selected SDK producer alias, and formatting gaps; a35e3fb1ce8a repairs those owners. The inherited Codex request-array expectations were aligned with main's intended model-list lookup. These were investigated from exact logs and repaired without weakened guards.

Later CI exposed a one-second polling assumption before the blocked CLI run reached agent_end. 10739ebc4874 awaits the existing hook-entry signal while preserving early-settlement failure and hook-release assertions; two focused cases pass in 155.98s wall (3.656s and 1.804s test bodies). 9f891ab73d04 removes a redundant default type argument caught by semantic lint; targeted lint and fresh P2 review pass.

Run 36999794713 also observed a registry-generation race in managed-worktree session creation. The test activated a second process state root while retaining a suite Gateway whose projection keeps its startup environment. 1ee4acf32b15 uses that nested fixture only for filesystem paths (applyEnv: false), preserving all cwd, transcript-header, initial-run, follow-up, and registry-authority assertions. Unmodified main passed all ten cases in original order (172.229s), and the repaired candidate passed all ten (164.077s), with semantic lint and P2 review clean. The exact original callback interleaving was not captured; the main replay is non-reproduction, not qualification for an inherited-failure exception. No passing replay is presented as proof that the original race disappeared.

Run 37002321028 on 55dd92cc4929 finished with four failed root jobs: ten known roster/copy failure contexts. The latest main merge incorporates the landed memory-host, startup-WebChat, and authentication-copy repairs. Earlier independent main proof reproduced 14 exact failures across eight files, and a separate clean-main memory-host run reproduced its sole retired-default failure (34 pass/1 fail; 103.573s). The interrupted Workshop preparation and unrun later baseline cases remain unclaimed. No admin exception has yet been used; any remaining failure must qualify against the exact final CI head and tested merge.

Final prior run 37004843534 on b801345200071 finished with only two failed root jobs: six plugin session-read fixtures and one orphaned-recovery fixture still used retired roster shapes. Their exact failures were independently reproduced on main, but before using an exception we found both fixes landed in ef27c1fc2be3. The candidate now incorporates those fixes and the accompanying stronger session-owner/sharing admission guards. All 33 focused Gateway metadata-admission, SDK metadata-admission, plugin session-read, and orphaned-recovery tests pass in 292.53s. Both full-candidate P2 review passes are clean, and core types, SDK surface/export checks, formatting, and the exact-parent T1 ratchet pass. The historical inherited-failure draft is superseded; no admin exception has been used.

The native tooling dependency changed on main from fs-safe 0.22.0 to 0.23.0. A new clean trusted-main tooling checkout was created with frozen dependencies; the shared tooling root was not edited. The product merge uses main's committed lockfile, with no dependency override.

Measured changed-test costs use the native test wrappers with --maxWorkers=1; no timers, assertions, or baselines were relaxed. Earlier per-file repair command walls: AgentsAPI instructions 22.787s, environment 23.014s, Codex context-overflow 26.321s, subscription 27.385s, attempt-session-boundary 30.956s, transcript rewrite 53.221s, maintenance 37.795s. The planner run had 113 passes and one inventory-order failure in 69.855s; the corrected ownership/sorting assertion passed in 14.37s. Current-head CI timings will be recorded from its actual run.

Evidence before main integration

  • T1: 1,548 → 1,548 sites, 328 → 328 files (delta 0). pnpm check:database-worker-ratchet --base b156ca03970ceadb1600b1ef9479734d3cdf4ea6 passes (1.927s). New writes execute in workers; retained compatibility methods reuse existing synchronous kernels. The readers in session-accessor.sqlite-suffix-read.ts and session-transcript-maintenance-read.ts receive an already-admitted database; durable acquisition stays in the worker dispatcher, and incognito uses its captured native owner. No inventory classifications or T1 budgets increased.

  • Final-head runtime proof: 32/32 tests pass on Testbox: SDK metadata admission 12/12, 32.653s and worker transcript commits 20/20, 51.585s. This includes post-commit session retargeting and persisted/published assistant delivery facts. Negative controls on exact preceding commit 31f378dfd6267 fail for the intended defects: name publication resolves and emits the replacement name (23.747s); delivery persistence retains raw directives and lacks delivery facts (32.395s). Final types, lint, caps, T1 ratchet, Madge, and the SDK declaration comparison pass. The complete native proof invocation exited 0 with no failed gates; the two expected negative-control failures were separately verified.

  • Earlier focused Testbox proof: 266 selected tests passed. Proof is the native command result; the lease carrier workflow can show cancelled after cleanup. Individual suites used pnpm test <file> --maxWorkers=1; the grouped run used the repository test wrapper.

    Suite Tests Command wall
    Async entries 4 28.052s
    Async messages 6 19.619s
    Async maintenance 12 23.040s
    SDK metadata admission 11 31.567s
    Navigation, commit receipts, compaction, providers, and caller fixtures (15 files) 233 187.569s

    These cover returned IDs, FIFO ordering, worker commit and publication ordering, rejected writes, user/custom message worker custody, live authority, branch/leaf state, immutable rewrite publication, and once-per-method deprecation warnings. Earlier focused proof also passed static transcript notes, compaction boundaries/persistence, and provider replay runtime. Base negative controls failed for the intended defects: caller-thread message transaction (23.658s) and compaction publication before awaited authority (23.622s).

  • A broader 101-file / 1,666-test caller/sibling sweep took 26m34.116s, including 12m50.7s build preparation. It initially had 37 failures in 10 files; all 10 were repaired and passed focused follow-up. Neighbor fixture failures found during follow-up were also repaired and passed in the final run. The broad sweep was not repeated just to replace its recorded result.

  • node scripts/check-changed.mjs --base b156ca03970ceadb1600b1ef9479734d3cdf4ea6 reaches an inherited compatibility-policy failure (63.957s): 11 old records are already eligible for removal. An independently installed exact-base checkout reports the same 11. Base has 22 deprecated records; this branch has 25, with zero new removal-eligible records. The unrelated public contracts and guard were left intact; remaining selected gates were run through their native owners.

  • Core production types (42.894s), extension production types (49.221s), extension test types (76.554s), scripts types (40.683s), dead-export scans (76.499s), lint, formatting, file caps, and the selected schema/storage/import guards pass. All 27 core test-type graphs pass using retained unaffected results plus targeted repairs: the first five took 188.6s, 21 other successful Testbox graphs took 740.058s, and the repaired session graph passed locally in 9.930s. On the final head, both affected graphs passed again: sessions 37.768s, gateway 34.838s. The 22-graph continuation took 776.687s including its one subsequently repaired fixture failure. Final-head lint passed in 10.014s; both file-cap gates passed (10.015s, 0.503s).

  • Madge: 0 cycles, 25.238s. Full pnpm build: pass, 641.435s, including all 154 public SDK subpaths, 96 plugin distributions, and bootstrap/UI gates; subsequent changes were covered by focused runtime/type/declaration checks.

  • Canonical generated SDK API/declaration comparison against the pinned base passes (238.443s): 4 added direct exports, 0 removed exports, 0 removed entrypoints, and 0 changed direct-export signatures. The additions are the two V2 replay types on core and plugin-entry. The final digest matches the prior audited result; the declaration detail has 25 additions and 51 changed declarations, with no whole-declaration removals. The inheritance-aware reachable declaration audit found 0 missing public/protected class members; legacy replay state/context and ExtensionActions remain source-compatible. Reachable changes add async methods, V2 types, and optional hooks, alongside internal worker/helper moves. Raw emitted file text also reflects internal type/module moves, so it is not literally an insert-only text diff.

  • The SDK surface policy grows by exactly four exports for those requested V2 types; entrypoint and callable ceilings stay unchanged. Canonical surface check passes. Assertion baseline edits only remove obsolete assertions.

  • git grep and an untracked-file audit found no active bundled production calls to deprecated persistence APIs; all remaining calls are the named third-party adapters above. New persistence promises are awaited or returned to their settlement owner.

  • Diff size: +3,181 net production lines (+5,067/−1,886), +2,197 tests/support, +188 docs, and 0 net tooling/policy. This includes all new files. The larger implementation preserves pending-input custody, worker authority and settlement, atomic compaction accounting, and committed-view publication across the complete caller cutover. The deslop pass removed duplicated adapters and narrating comments; retained adapters have named public compatibility records. Independent Codex branch autoreview is clean through P2 on final head 461a575ed3266 (two complete passes, zero actionable findings). Session-name publication revalidates its binding after commit, and worker batches preserve assistant delivery facts. Both final regressions pass and their exact preceding-commit controls fail at the intended assertions. PR CI timings were not yet available at creation; runtime-suite times above are measured Testbox command walls. The 9.930s fixture type repair and its 26.182s lint check ran locally.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

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

These security sensitive changes were made:

  • src/agents/embedded-agent-runner/transcript-byte-preflight-authority.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 2, 2026, 9:46 AM ET / 13:46 UTC (Revision 17).

ClawSweeper review

What this changes

Adds awaited session persistence APIs, migrates bundled callers to worker-backed writes, and deprecates retained synchronous plugin APIs.

Merge readiness

⛔ Blocked before merge - 2 items remain

This PR remains useful: current main still routes some awaited message writes through synchronous persistence. No actionable correctness or security finding was established, and the prior generic upgrade blocker is covered by the accepted SDK direction and retained compatibility contracts.

Priority: P2
Reviewed head: ffcc2e9aac2b7e7d70503be44a073091cb7698cd

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, coherent persistence cutover with production-worker evidence and retained SDK compatibility; no actionable patch defect was established.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Recorded Testbox evidence exercises the production SessionManager and transcript-commit owners through real SQLite workers, including committed publication, queued revocation, and pre-commit rollback; inspected tests verify durable after-fix outcomes. No stored-data contract change requires a migration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Recorded Testbox evidence exercises the production SessionManager and transcript-commit owners through real SQLite workers, including committed publication, queued revocation, and pre-commit rollback; inspected tests verify durable after-fix outcomes. No stored-data contract change requires a migration.
Evidence reviewed 12 items Pinned introduction: Inspected the merge-base-to-head delta using the supplied pinned identities. The checkout is the original PR head; the supplied stale test merge was not used to infer removal of current-main behavior.
Current main still needs the cutover: Pinned current-main source still falls back to synchronous append for user messages and beforeFreshMessageCommit callbacks; provider replay also lacks the new V2 persistence contract. Main source was retrieved through the GitHub contents API after historical Git blob hydration encountered HTTP 403.
Accepted SDK direction: The existing worker-access documentation records the accepted direction: awaited twins for SessionManager persistence, migration of bundled callers, retained synchronous adapters, and removal at the next Plugin SDK major. This decision predates the introduced documentation changes and covers the current API evolution.
Findings None None.
Security None None.

How this fits together

Session persistence stores agent conversation history and plugin metadata in SQLite. Agent runs, extensions, and provider replay hooks submit mutations; committed receipts update the loaded conversation and notify downstream consumers.

flowchart TD
  A[Agent runs and plugins] --> B[Awaited session APIs]
  B --> C[FIFO write admission]
  C --> D[Live authority checks]
  D --> E[SQLite worker commit]
  E --> F[Committed receipt]
  F --> G[Conversation view and notifications]
  A --> H[Deprecated synchronous adapters]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test growth production +3,145 net; tests/support +2,205 net Production growth is justified by the complete caller cutover, worker admission, custody, and committed-view publication responsibilities.
SDK compatibility lifecycle 3 new deprecation records; removal at next SDK major The accepted migration retains existing third-party contracts without a calendar removal deadline.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/plugins/compat/session-persistence-records.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Use the existing worker writer for bundled persistence while preserving shipped synchronous plugin contracts through their documented SDK-major migration window.

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

Not applicable as an SDK feature review; current-main source confirms the synchronous fallback that motivates the cutover, and recorded worker regressions exercise the affected boundary.

Is this the best way to solve the issue?

Yes. Extending the existing persistence owner and migrating bundled callers together avoids competing writers while retaining third-party compatibility.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Recorded Testbox evidence exercises the production SessionManager and transcript-commit owners through real SQLite workers, including committed publication, queued revocation, and pre-commit rollback; inspected tests verify durable after-fix outcomes. No stored-data contract change requires a migration.

Label justifications:

  • P2: This is a normal-priority SDK and persistence improvement, with no established urgent user-facing regression.
  • merge-risk: 🚨 compatibility: Public plugin persistence APIs evolve under the accepted SDK direction; retained synchronous adapters and documented major-version removal cover the current compatibility tradeoff.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Recorded Testbox evidence exercises the production SessionManager and transcript-commit owners through real SQLite workers, including committed publication, queued revocation, and pre-commit rollback; inspected tests verify durable after-fix outcomes. No stored-data contract change requires a migration.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded Testbox evidence exercises the production SessionManager and transcript-commit owners through real SQLite workers, including committed publication, queued revocation, and pre-commit rollback; inspected tests verify durable after-fix outcomes. No stored-data contract change requires a migration.

Evidence

What I checked:

  • Pinned introduction: Inspected the merge-base-to-head delta using the supplied pinned identities. The checkout is the original PR head; the supplied stale test merge was not used to infer removal of current-main behavior. (ffcc2e9aac2b)
  • Current main still needs the cutover: Pinned current-main source still falls back to synchronous append for user messages and beforeFreshMessageCommit callbacks; provider replay also lacks the new V2 persistence contract. Main source was retrieved through the GitHub contents API after historical Git blob hydration encountered HTTP 403. (src/agents/sessions/session-manager-entries.ts, e8570948dad0)
  • Accepted SDK direction: The existing worker-access documentation records the accepted direction: awaited twins for SessionManager persistence, migration of bundled callers, retained synchronous adapters, and removal at the next Plugin SDK major. This decision predates the introduced documentation changes and covers the current API evolution. Public docs: docs/reference/database-schemas/worker-access.md. (docs/reference/database-schemas/worker-access.md:73, ffcc2e9aac2b)
  • Compatibility window retained: Three named compatibility records preserve synchronous session, extension, and provider replay APIs until the next SDK major, without calendar removal deadlines. Legacy replay hooks remain available when an awaited hook is absent. (src/plugins/compat/session-persistence-records.ts:11, ffcc2e9aac2b)
  • Authority remains bound through commit: Extension persistence captures the runtime and transcript target, composes their live assertions, and carries them into queued writes. Worker message admission rechecks pending-input authority at commit rather than treating transported custody facts as permission. (src/agents/sessions/extensions/metadata-actions.ts:14, ffcc2e9aac2b)
  • Production-boundary negative cases: Inspected real-worker coverage for pending-owner retirement at commit, closed queued extension capabilities, lifecycle replacement, and whole-batch rollback. Assertions reopen or read SQLite and verify no unauthorized transcript rows or notifications survive. (src/gateway/worker-environments/transcript-commit.test.ts:851, ffcc2e9aac2b)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • SunnyShu0925: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-02T10:40:41.455Z sha a860844 :: blocked before merge. :: none
  • reviewed 2026-10-02T11:00:28.677Z sha 10739eb :: blocked before merge. :: none
  • reviewed 2026-10-02T11:18:28.399Z sha 9f891ab :: blocked before merge. :: none
  • reviewed 2026-10-02T11:46:45.451Z sha 55dd92c :: blocked before merge. :: none
  • reviewed 2026-10-02T12:13:44.739Z sha b801345 :: blocked before merge. :: none
  • reviewed 2026-10-02T12:41:48.214Z sha a3638e9 :: blocked before merge. :: none
  • reviewed 2026-10-02T13:04:32.454Z sha a3638e9 :: blocked before merge. :: none
  • reviewed 2026-10-02T13:22:44.356Z sha ffcc2e9 :: blocked before merge. :: none

Preserve main's awaited custom-entry and projection behavior, integrate transcript maintenance into the hydration worker owner, and keep all bundled callers on awaited persistence. SDK-owner direction: add awaited calls while retaining deprecated synchronous adapters.
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Oct 2, 2026
@openclaw-barnacle openclaw-barnacle Bot closed this Oct 2, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 2, 2026
Model the retarget as an independent operation so the fixture reaches post-commit publication validation. Keep the committed receipt, accounting, and replacement-transcript assertions intact.
@openclaw-barnacle openclaw-barnacle Bot closed this Oct 2, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 2, 2026
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…ipt writes (openclaw#163264)

* feat(plugin-sdk): await session persistence and deprecate sync writes

* test(sessions): fix awaited persistence fixture types

* fix(sessions): preserve binding and delivery publication

* test(sessions): isolate compaction retarget authority

Model the retarget as an independent operation so the fixture reaches post-commit publication validation. Keep the committed receipt, accounting, and replacement-transcript assertions intact.

* fix(ci): remove duplicate database-worker test routing

Main already routes attempt-phase-lifecycle.test.ts through the database-worker owner. Remove the duplicate introduced by the SDK branch. Exact-head preflight and the native local manifest both reproduced the failure; the corrected manifest passes with 69 selected Node rows. Unique test coverage and the duplicate guard stay intact. Formatting and P2 review pass.

* fix(sessions): keep maintenance projections with the host owner

Return committed projection-rebuild facts from maintenance workers and schedule them through the existing host owner. Preserve custody, rollback, and synchronous compatibility. Update async fixtures and host-broker test routing, restore the native wrapper import inventory, and route memory visibility declarations through their existing producer.

Focused Linux proof passed342 tests across17 suites; old-code controls fail at pending projections. SDK declarations retain legacy signatures with four additive exports. Types, lint, T1, Madge, focused routing checks, and P2 review pass.

* test(cli): await blocked-run hook entry without polling

Await the existing hook-entry gate instead of racing awaited transcript persistence against vi.waitFor's one-second default. Preserve the early-settlement failure and the assertion that agent_end must finish before the CLI run settles.

The two focused cases pass in 155.98s including preparation; their test bodies take 3.656s and 1.804s. Fresh P2 review is clean.

* test(cli): use the deferred helper default type

* test(gateway): keep worktree fixture on the shared state root

Use the nested fixture only for workspace and device files. Activating its environment switches process state roots underneath the shared Gateway, whose projection retains its startup environment. Preserve the registry witness guard and every cwd, transcript, initial-run, and follow-up assertion.

CI observed AgentDatabaseRegistryChangedError during creation. The exact callback interleaving was not captured, and unmodified main passed the whole file in 172.229s; that is non-reproduction, not inherited-failure qualification. The corrected fixture passes all 10 cases in original order in 164.077s. Semantic lint, formatting, and fresh P2 review pass.

* refactor(sessions): separate hydration types and CLI hook fixtures

Keep transcript hydration results beside their request contracts and retain aggregate exports. Move the CLI hook fixture owner into test support without changing coverage. This removes both line-cap increases after main integration; 112 composition tests and all 52 reliability tests pass.
steipete added a commit that referenced this pull request Oct 15, 2026
…ply text (wave-4 bundle) (#172669)

* refactor(infra): remove redundant replay and freshness machinery

Trust successful migration statements inside their synchronous transactions,
reuse unchanged approval parses, share canonical package-root discovery,
namespace directory caches by plugin identity, and simplify ephemeral presence,
OS facts and suspension timer bookkeeping. Keep source validation, conflicts,
transaction durability, postcommit checks, security authority and write settlement.

Best-effort tradeoffs accepted

- Node-host own-write verification (#108457): no human successful-SQL-loss report; SQL errors still roll back, and independent source retirement checks remain.
- Workspace setup/attestation replay (#109147): no human driver-rewrite report; trust successful writes while retaining fingerprints and later source checks.
- APNs expected-ID replay (#108543): no human silent-insert-loss report; canonical parsing, tombstones and receipts remain.
- Device-auth presence assertion (#112663): no human successful-upsert-loss report; credential validation and transaction failure handling remain.
- Device-identity replay (#110392): no human silent-row-rewrite report; preserve independent post-await verification before source deletion.
- MCP OAuth replay (#161219): no human silent-write-loss report; canonical/source parsing and worker admission remain.
- Exec-approval read/parse/deep-compare replay (#114063): no human successful-driver-rewrite report; malformed policy stays fail-closed and actual authority is unchanged.
- Shared-auth target reread (#123349): no human silent-row-rewrite report; return the known SQL postimage and keep independent copy/flip/cleanup checks.
- Identical authored approval bytes (#168094) reuse the existing parse; changed normalized bytes still parse before publication.
- Plugin metadata fingerprinting (353d778): no human in-place metadata-mutation report; distinct objects remain isolated, and same-object edits use TTL/reset.
- Duplicate asset ancestor search (7224585): no human cached-miss incident; canonical realpath/wrapper discovery remains, while newly appearing packages need owner invalidation/restart.
- Presence logical clock (#134737): provenance is synthetic rollback/suspend tests; clock correction may temporarily retain or hide display rows until full update/reconnect, wall time catches up, or restart. TTL, capacity and connection privacy remain.
- Suspension timer generation (#130003): the removed test directly called a canceled callback; native timer cancellation and current-entry authority remain. An out-of-contract timer implementation could resume a renewed lease early.
- OS tuple-keyed cache (#135911): keep measured probe sharing and sticky labels; hot-patching OS identity needs restart rather than another namespace.
- Presence list type guards (409a160): callers supply validated arrays; existing normalization still owns their values.

Production +40/-228, net -188. Focused migration, asset/cache, presence/caller,
approval-publication and suspension/OS tests pass, as do production and infra-test
types, changed-file lint, assertion and suppression checks, and zero-cycle checks.
Independent final review has no actionable P0-P2 findings. No schema, durability,
retention, indexing, permission, recovery or public SDK change is intended.

Broad changed-check is not claimed green: the original base reproduces the
455-versus-454 environment budget failure. The initial Web Push Doctor timeout
remains unattributed; all Web Push production hunks were dropped and its exact
test passed on restored source. Full build and hosted CI remain unrun.

* refactor(agents): simplify reply preparation and refresh bookkeeping

Share typed actor-store adapters and prepared async auth reads. Reuse the
admitted memory-flush plan, retain last-good catalog views by provider, and
remove unused metadata bookkeeping and config projections. Preserve live
credential/effect authority, FIFO, transcript durability, and ordinary write
settlement. Net production reduction: 303 lines.

Best-effort tradeoffs accepted:
- Plugin-drain successors (#162301, synthetic): wait the current drain once;
  a later reload owns its own publication and recovery.
- A changed memory-flush plan during preparation (#162177/#121157, synthetic):
  finish with the admitted plan; the next turn resolves again.
- Per-row catalog freshness (#158113, synthetic): failed discovery retains
  the provider's last-good configured and supplemental overlays until success.
  Existing auth/profile/source gates and successful-empty replacement remain.
- MCP sibling invalidation during discovery (#138694, synthetic): a listing
  may briefly be stale; the next read observes the invalidation.
- Passive context metadata supersession (#119607, synthetic): late discovered
  metadata may win until refresh. Keep the single current-promise check before
  replacing configured limits, preserving the human capacity fix (#39857).
- Registration-time question answers (#110372/#134003, synthetic): a prompt
  can briefly race the answer; its terminal signal closes delivery.
- Duplicate or never-attached internal question registrations: both real
  producers attach once synchronously. Unsupported misuse loses its extra
  diagnostic/disposal wakeup; ordinary lifecycle rejection remains.
- Cancellation publication once/must-consume flags (#161124, synthetic): the
  sole internal producer invokes once. Keep active-scope/effect authority.
- In-flight placement-service replacement (#164744, synthetic): use the
  captured startup service, with its observation and writer authority intact.
- Compaction callback rebinding (#146732/#163264, synthetic): current work
  retains its captured callbacks and live assertion; later work captures anew.
- Re-entrant logging between synchronous run-owner checks: #162227 removed
  the awaited retry, making the second check redundant. Real post-await and
  mutation-effect checks remain.
- Startup diagnostic admission (#146792): the sole producer checks lifecycle
  immediately before recording. Remove only the recorder's duplicate check;
  preserve the human abort/recovery fix (#146692), reset, and admin redaction.

Release-note context: verbose diagnostics no longer include suppressed reply
text or background bash command contents. Execution and user replies remain
unchanged. Config show uses the same schema-aware redactor without cloning
an already detached result or redacting unused snapshot views.

Validation: touched core, messaging and Gateway-method type graphs passed;
49 changed TypeScript files passed targeted lint/format; runtime and Madge
cycles are both zero. Auth reader, question authority, memory flush, restart
claim, catalog worker, cancellation and compaction boundary proof is recorded
in the lane ledger. Final supplemental run: 392 tests passed, four failed
across 28 files, with final source verification. All 120 agents-support tests
passed, including refresh coalescing, publication, run-wait and compaction.
The four failures were an unchanged 120s ACP reset deadline and three MCP
fixtures settling before child startup markers (empty logs, existing 1-2s
connection/4s catalog deadlines). Narrow failed-case replay passed ACP reset
and two MCP cases; the one-second MCP retirement fixture still failed before
its first child marker. Clean lane-base comparison could not reach assertions:
the temporary checkout lacked workspace-local dependency links for worker
compilation. That case is unresolved, not proven inherited; coordinator-bundle
CI must adjudicate it. No deadline, retry, skip or assertion was weakened.
The final selected real-dispatch suppressed-reply logging regression passed
with completed source verification (one selected case, 202.58s wrapper).

Independent P0-P2 review completed four passes. Declined duplicate findings
about unsupported placement-service hot-swap (real observation/database/writer
authority remains) and alleged run-wait awaits (only synchronous logging lies
between the checks; real mutation and post-await checks remain).

Broad check-changed is NOT green: env-name budget 455/454 also fails on the
unchanged lane-base index, with no added env names; production/full-tree Knip
hit their existing 600s budget; the silent legacy-store scan was interrupted
after 782s. Those two scans are missing proof, not attributed inherited reds.
Hosted coordinator-bundle CI remains the broad gate. Owned mock/type/legacy
fixture findings were corrected and their targeted replays pass.

No changelog, dependency, database schema, durability, retention, permission,
or public API change is included. BELOW-500 branch-only coordinator handoff;
no lane PR or merge.

* chore: shrink stale reply assertion allowance

* test: align catalog publication calls with current contract
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
…ply text (wave-4 bundle) (openclaw#172669)

* refactor(infra): remove redundant replay and freshness machinery

Trust successful migration statements inside their synchronous transactions,
reuse unchanged approval parses, share canonical package-root discovery,
namespace directory caches by plugin identity, and simplify ephemeral presence,
OS facts and suspension timer bookkeeping. Keep source validation, conflicts,
transaction durability, postcommit checks, security authority and write settlement.

Best-effort tradeoffs accepted

- Node-host own-write verification (openclaw#108457): no human successful-SQL-loss report; SQL errors still roll back, and independent source retirement checks remain.
- Workspace setup/attestation replay (openclaw#109147): no human driver-rewrite report; trust successful writes while retaining fingerprints and later source checks.
- APNs expected-ID replay (openclaw#108543): no human silent-insert-loss report; canonical parsing, tombstones and receipts remain.
- Device-auth presence assertion (openclaw#112663): no human successful-upsert-loss report; credential validation and transaction failure handling remain.
- Device-identity replay (openclaw#110392): no human silent-row-rewrite report; preserve independent post-await verification before source deletion.
- MCP OAuth replay (openclaw#161219): no human silent-write-loss report; canonical/source parsing and worker admission remain.
- Exec-approval read/parse/deep-compare replay (openclaw#114063): no human successful-driver-rewrite report; malformed policy stays fail-closed and actual authority is unchanged.
- Shared-auth target reread (openclaw#123349): no human silent-row-rewrite report; return the known SQL postimage and keep independent copy/flip/cleanup checks.
- Identical authored approval bytes (openclaw#168094) reuse the existing parse; changed normalized bytes still parse before publication.
- Plugin metadata fingerprinting (f31bc71): no human in-place metadata-mutation report; distinct objects remain isolated, and same-object edits use TTL/reset.
- Duplicate asset ancestor search (40fb74f): no human cached-miss incident; canonical realpath/wrapper discovery remains, while newly appearing packages need owner invalidation/restart.
- Presence logical clock (openclaw#134737): provenance is synthetic rollback/suspend tests; clock correction may temporarily retain or hide display rows until full update/reconnect, wall time catches up, or restart. TTL, capacity and connection privacy remain.
- Suspension timer generation (openclaw#130003): the removed test directly called a canceled callback; native timer cancellation and current-entry authority remain. An out-of-contract timer implementation could resume a renewed lease early.
- OS tuple-keyed cache (openclaw#135911): keep measured probe sharing and sticky labels; hot-patching OS identity needs restart rather than another namespace.
- Presence list type guards (3965f6b): callers supply validated arrays; existing normalization still owns their values.

Production +40/-228, net -188. Focused migration, asset/cache, presence/caller,
approval-publication and suspension/OS tests pass, as do production and infra-test
types, changed-file lint, assertion and suppression checks, and zero-cycle checks.
Independent final review has no actionable P0-P2 findings. No schema, durability,
retention, indexing, permission, recovery or public SDK change is intended.

Broad changed-check is not claimed green: the original base reproduces the
455-versus-454 environment budget failure. The initial Web Push Doctor timeout
remains unattributed; all Web Push production hunks were dropped and its exact
test passed on restored source. Full build and hosted CI remain unrun.

* refactor(agents): simplify reply preparation and refresh bookkeeping

Share typed actor-store adapters and prepared async auth reads. Reuse the
admitted memory-flush plan, retain last-good catalog views by provider, and
remove unused metadata bookkeeping and config projections. Preserve live
credential/effect authority, FIFO, transcript durability, and ordinary write
settlement. Net production reduction: 303 lines.

Best-effort tradeoffs accepted:
- Plugin-drain successors (openclaw#162301, synthetic): wait the current drain once;
  a later reload owns its own publication and recovery.
- A changed memory-flush plan during preparation (openclaw#162177/openclaw#121157, synthetic):
  finish with the admitted plan; the next turn resolves again.
- Per-row catalog freshness (openclaw#158113, synthetic): failed discovery retains
  the provider's last-good configured and supplemental overlays until success.
  Existing auth/profile/source gates and successful-empty replacement remain.
- MCP sibling invalidation during discovery (openclaw#138694, synthetic): a listing
  may briefly be stale; the next read observes the invalidation.
- Passive context metadata supersession (openclaw#119607, synthetic): late discovered
  metadata may win until refresh. Keep the single current-promise check before
  replacing configured limits, preserving the human capacity fix (openclaw#39857).
- Registration-time question answers (openclaw#110372/openclaw#134003, synthetic): a prompt
  can briefly race the answer; its terminal signal closes delivery.
- Duplicate or never-attached internal question registrations: both real
  producers attach once synchronously. Unsupported misuse loses its extra
  diagnostic/disposal wakeup; ordinary lifecycle rejection remains.
- Cancellation publication once/must-consume flags (openclaw#161124, synthetic): the
  sole internal producer invokes once. Keep active-scope/effect authority.
- In-flight placement-service replacement (openclaw#164744, synthetic): use the
  captured startup service, with its observation and writer authority intact.
- Compaction callback rebinding (openclaw#146732/openclaw#163264, synthetic): current work
  retains its captured callbacks and live assertion; later work captures anew.
- Re-entrant logging between synchronous run-owner checks: openclaw#162227 removed
  the awaited retry, making the second check redundant. Real post-await and
  mutation-effect checks remain.
- Startup diagnostic admission (openclaw#146792): the sole producer checks lifecycle
  immediately before recording. Remove only the recorder's duplicate check;
  preserve the human abort/recovery fix (openclaw#146692), reset, and admin redaction.

Release-note context: verbose diagnostics no longer include suppressed reply
text or background bash command contents. Execution and user replies remain
unchanged. Config show uses the same schema-aware redactor without cloning
an already detached result or redacting unused snapshot views.

Validation: touched core, messaging and Gateway-method type graphs passed;
49 changed TypeScript files passed targeted lint/format; runtime and Madge
cycles are both zero. Auth reader, question authority, memory flush, restart
claim, catalog worker, cancellation and compaction boundary proof is recorded
in the lane ledger. Final supplemental run: 392 tests passed, four failed
across 28 files, with final source verification. All 120 agents-support tests
passed, including refresh coalescing, publication, run-wait and compaction.
The four failures were an unchanged 120s ACP reset deadline and three MCP
fixtures settling before child startup markers (empty logs, existing 1-2s
connection/4s catalog deadlines). Narrow failed-case replay passed ACP reset
and two MCP cases; the one-second MCP retirement fixture still failed before
its first child marker. Clean lane-base comparison could not reach assertions:
the temporary checkout lacked workspace-local dependency links for worker
compilation. That case is unresolved, not proven inherited; coordinator-bundle
CI must adjudicate it. No deadline, retry, skip or assertion was weakened.
The final selected real-dispatch suppressed-reply logging regression passed
with completed source verification (one selected case, 202.58s wrapper).

Independent P0-P2 review completed four passes. Declined duplicate findings
about unsupported placement-service hot-swap (real observation/database/writer
authority remains) and alleged run-wait awaits (only synchronous logging lies
between the checks; real mutation and post-await checks remain).

Broad check-changed is NOT green: env-name budget 455/454 also fails on the
unchanged lane-base index, with no added env names; production/full-tree Knip
hit their existing 600s budget; the silent legacy-store scan was interrupted
after 782s. Those two scans are missing proof, not attributed inherited reds.
Hosted coordinator-bundle CI remains the broad gate. Owned mock/type/legacy
fixture findings were corrected and their targeted replays pass.

No changelog, dependency, database schema, durability, retention, permission,
or public API change is included. BELOW-500 branch-only coordinator handoff;
no lane PR or merge.

* chore: shrink stale reply assertion allowance

* test: align catalog publication calls with current contract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: agentsapi extensions: clawrouter Extension: clawrouter extensions: codex extensions: github-copilot extensions: google gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: file-transfer proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant