Skip to content

fix: keep gateway responsive during transcript and task database work - #157634

Merged
fuller-stack-dev merged 15 commits into
mainfrom
fix/gateway-database-responsiveness-20260924
Sep 25, 2026
Merged

fuller-stack-dev merged 15 commits into
mainfrom
fix/gateway-database-responsiveness-20260924

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes gateway event-stream stalls while looking up older child answers or processing task completion and cron work under database contention.

User Impact

The gateway can keep processing events while these reads and writes are pending. Complete child answers, cancellation, run ownership, and committed cron state retain their existing behavior. No migration or configuration change is required.

Public V1 custom hooks, native permission/kill/requester-wake commits, cron reservation creation, and untouched timer/manual finalizers retain their synchronous contracts. This change does not claim a universal latency bound.

Why This Change Was Made

Several async entry points still performed SQLite work on the gateway thread. Transcript discovery and matching now run in the existing read-only history worker. Task lifecycle callers await prepared registry/flow reads and revalidate their owner after yielding. Cron activation, reservation cleanup, stale-family removal, and deferred receipt finishing use the existing SQLite broker.

Cancellation stops the caller's observation while accepted writes keep their settlement owner. Terminal cleanup clears the exact active run before completion subscribers observe it. Deletion waits recognize drained local receipt owners, preserve foreign-owner fences, and recheck cleanup authority after awaits. These changes complement #157484's periodic WAL repair.

Evidence

Private fixtures reproduced foreground transcript scans and blocked task/cron coordinator waits on 809808b76ad78fab4d69eaa02fb1b3e5ff127edb. Existing worker controls serviced host events while the holder remained locked. The repaired paths return the exact answer and terminal task/cron rows while allowing host events before completion or lock release.

Review also exposed cancellation rereads and stale active-run state at terminal dispatch. Both were reproduced through real caller/subscription paths. The terminal regression failed only for cancelled completion; ordinary completion, deferred ownership, and outstanding task controls passed before the fix.

The cancellation follow-up passed the complete 51-case stream preparation file and all 44 requester-settle wake cases. After adding the required non-retry field to the terminal event fixture, the five affected cases and production types passed again. The same external API fixture changed cancelled terminal observation from active to inactive, and independent source-blind validation passed all five clauses, including normal/deferred controls, varied and boundary inputs, and independently checked resource cleanup. Independent follow-up review was clean through P2. All 25 test type graphs, targeted lint, formatting, and whitespace checks passed. The current candidate is 93ec1d966553f601732d8853bd8dfd7af9e5a9ca, including canonical 691d2e5cd48c0ddda650123b8b9ee0089fa39004. Publication resolves the updater-helper conflict with the exact canonical implementation. No runtime or test bytes changed from the preceding head. Current-head CI passed: 149 successful jobs and 16 skipped jobs. Security and dependency review also passed. After integrating the upstream runner refactor, all four terminal ownership controls passed in 52.18 seconds wall time, with 22.96 seconds of Vitest time and cold worker preparation. Production types passed in 11.56 seconds. Integrated proof on b320b4f4e983a277229b5eb416e60f76bbfa21a1 passed 283 tests across 16 complete files, production types, all 25 core test type graphs, targeted lint, import-cycle checks, Kysely guardrails, and database-first checks. The earlier ordered retry-grace E2E failure remains unexplained. An uninstrumented run passed 13 cases and failed one; a later diagnostic passed 11 and failed three. Announces returned retryable before delivery with live signals; draining admitted work did not change the result. On the preceding e89585956f, one complete original-order run with pass-through guard/error observations passed all 14 cases in 99.20 seconds of Vitest time. All 38 active-child checks were false and all 48 descendant counts were zero; no wait or runtime-error calls occurred. This passing diagnostic does not identify or prove a fix for the earlier failures. Temporary instrumentation was restored byte-for-byte, with no production patch, assertion change, extra wait, or retry increase. The bounded investigation is recorded here while normal hosted CI and review gates remain required. Earlier validation passed 573 affected tests, announcement E2E coverage, and a full build in 800.94 seconds. These are earlier-candidate results, not an exact final-head build.

The preceding exact-head CI run exposed three fixture failures: a missing async lookup mock in sessions-spawn, an unused async import crossing a legacy dispatch mock boundary, and the existing guest-question authority fixture defect tracked in #157708. Both task-related failures reproduced locally before correction. The final sessions-spawn file passes all eight cases in 34.64 seconds wall time; legacy dispatch and adjacent ownership pass all 42 cases in 27.25 seconds. The guest-question helper uses the exact separately reviewed fix 0753dff38a37b3a6ca28f349ee45248353a83b32; its owner recorded the unchanged lifecycle passing in 61.12 seconds of Vitest time. The four-file follow-up passed independent review through P2, all three affected test type graphs, targeted lint, formatting, and whitespace checks. Those three failing jobs passed in the next hosted run. Canonical 229ab8a1fe now contains the Guest-question repair; this PR uses that exact helper and has no net UI change. Required final-head CI remains authoritative.

The next hosted run exposed an upstream updater fixture defect and a Node 24 setup download failure. The updater reproduction passed 16 of 19 cases; three stopped at VM linking because a new mixed default/type import omitted the synthetic node:fs default. The reviewed helper repair recognized that import and loaded the real filesystem authority/removal dependencies with the pinned fs-safe package. The same 19 cases pass in 0.89 seconds, and the unchanged CI wrapper passes in 3.88 seconds. All backup-retention, byte-content, verified-deletion, failure, and unexpected-dependency assertions remain. Whole-file audit, the full selected changed-file gate, and independent P2 review passed. No updater production code changed. The Node 24 failure was a pnpm archive download connection reset before tests; it is retained as infrastructure evidence, with no obsolete-head retry.

The 2539 CI run reproduced the retry-grace failure: 13 cases passed and the sibling-delivery case failed before the first alpha delivery, with zero agent calls and a retryable announcement. An independent audit found no proven override, private-store, or cleanup defect. One original-order diagnostic on 93ec1d9665, whose affected bytes are unchanged, observed return decisions and errors without changing assertions, waits, or outcomes. All 14 cases passed in 56.92 seconds wall time, 52.57 seconds Vitest, with 16.42 seconds of tests. No failing decision was captured. Both production files were restored exactly. The failure remains unresolved; passing diagnostics do not establish a fix. No timeout, retry, assertion, or coverage was weakened. Canonical integration is needed to resolve a real merge conflict, not to replay CI for green.

On the published 93ec1d9665 head, the changed-files CI job passed the unchanged retry-grace file: all 14 cases, including the previously failing sibling-delivery case. Test time was 15.039 seconds and Vitest duration was 20.77 seconds; completed worker-generation verification also passed. This current-head success does not establish a cause or fix for the earlier failures.

Canonical 691d2e5cd4 independently repaired the updater fixture using native VM dependency specifiers and the real filesystem dependency closure. This PR adopts that exact helper, removing it from the net diff. The unchanged CI wrapper passed all 19 native assertions in 3.93 seconds wall time, 2.14 seconds Vitest. The optional Node 24 lane was skipped on the 2539 run, so it is not a passing rerun of the earlier download failure.

While CI ran, main advanced to 42db2c3f2be8b7a07de1949253a4aac56ce7213a, including state schema 19 and lease-heartbeat changes. The merge request was held for dependency verification. A temporary merge with the unchanged PR head produced tree 3c5e581a6f668ad2484223ae460a9b9523bb96e7. All 11 cases across the complete transcript-match, detached-task lookup, and cron responsiveness worker files passed in 70.47 seconds wall time, with completed worker-generation verification. Production types passed in 10.66 seconds. The temporary merge was then aborted, restoring the exact published head. No new authored changes or test relaxations were needed.

A second combined-main check covered the dependency refresh, shared test-runtime preload, and plugin retained-work changes through 2abecd703d. With its frozen dependencies installed, merged tree 13f21798175544e0bdf98c9068ee776f60b15883 passed all 11 worker-responsiveness cases in 84.07 seconds, all four terminal-ownership cases in 19.08 seconds, and production types in 38.05 seconds. Worker-generation verification passed. The other 47 terminal-file cases were intentionally filtered; their earlier complete-file proof remains recorded above. The temporary merge was aborted and exact published head 93ec1d9665 restored clean. Later main movement through a4656d4eea changes filesystem imports to the same pinned fs-safe helpers and splits an unrelated bootstrap test file. No authored path overlaps or new references to deleted wrappers were found. These changes preserve the tested worker and terminal contracts, so no further replay was needed.

Source-blind API probes verified full-text equality, cancellation while a coordinator remained held, ownership retirement, persisted cron outcomes, and drained-receipt behavior. Accepted writes still committed. Monitor probes covered local, foreign, and unverifiable old receipt ownership, wrong agent/operation refusal, and private fixture/process cleanup. These are private runtime compositions, not a live fleet rollout or proof of later filesystem deletion.

Measured local test costs

Each row used node scripts/run-vitest.mjs <file> --maxWorkers=1. Values are measured standalone wall seconds, including runner preparation. The final stream preparation run included 79.36 seconds of cold native preparation; its Vitest duration was 92.71 seconds. The new four-case ownership table took about 2.3 seconds inside that run. Requester wake Vitest duration was 26.78 seconds. Earlier broad validation used grouped commands; those totals are not standalone file costs or CI seconds.

File Passed Wall seconds
attempt-stream-settle.test.ts 29 184.49
attempt-phase-lifecycle.test.ts 16 93.73
attempt-stream-prepare.test.ts 51 192.82
attempt.async-tasks.test.ts 12 37.65
detached-task-lookup.worker.test.ts 5 58.07
session-transcript-match.worker.test.ts 2 49.29
session-accessor.sqlite-archive-read.test.ts 6 100.55
attempt-prompt-submit.steering.test.ts 4 65.64
run-admission.responsiveness.test.ts 4 57.99
run-admission-conflict.test.ts 6 52.22
server-claws-monitors.test.ts 35 307.04
agent-deletion-cleanup.test.ts 22 107.41
session-utils.queued-collector-admission.test.ts 2 135.53
session-utils.queued-collector.test.ts 34 178.91
subagent-registry.persistence.resume.test.ts 37 207.79
subagent-registry.completion-authority.test.ts 22 78.86
subagent-announce.requester-settle-wake.test.ts 44 67.27

Hosted job timings are available in the linked final-head CI run.

Test audit and pruning

Audited all 36 changed executable test files, seven helpers, and the routing registry in full, including assertions, fixtures, imports, setup/teardown, and skips. Existing coverage was reused where adequate. The unchanged updater native consumer and CI wrapper, guest-question lifecycle consumer, and legacy-dispatch shared helper were also inspected.

Four redundant announcement compositions were removed. Stronger retained cases cover active-run steering, leaf completion, two-child synthesis with one wake, and ordered child-parent delivery. One vacuous metadata insert/readback case and its sole helper were removed; retry/count/deadline coverage remains. A result assertion duplicating its wait helper was removed. Weak absence/self-routing assertions were replaced with observable outcomes, and unused fixtures/imports were pruned. No valid failing case was removed or skipped, and no assertion, timeout, or retry count was weakened to get green.

Worker-backed writes invalidated host-connection fault fixtures. Those now observe actual worker precommit results or persistent SQLite failure triggers, preserving real SQL, admission, and rollback. Registry fixtures join accepted work and release pending callbacks before reset. Steering cleanup now releases and joins its pending operation even after a failed assertion. Terminal event coverage uses the real subscription and private task stores. Its default mock and fixture setup live in the existing support file to keep the test within the line budget.

The CI follow-up repairs two incomplete mock boundaries exposed by the async cutover. The sessions-spawn fixture now provides the async lookup with the same available/no-task result as its synchronous fixture. Two mock aliases pointing to nonexistent paths were removed; the valid module mocks remain. Early-return controls join their own child cleanup in finally, and the MCP case always releases its gate and joins cleanup, including on an acceptance or cache assertion failure. The legacy V1 suite isolates unused async core lookups with typed throwing spies and verifies they were never called, preserving real synchronous runtime behavior. All eight lifecycle cases and all 13 legacy cases remain. The adjacent 29 ownership cases pass unchanged. The guest-question helper reuses the separately reviewed fixture fix from #157708, commit 0753dff38a37b3a6ca28f349ee45248353a83b32, to capture and release production operator authority. Its reconnect, answer, and cancellation assertions remain unchanged. The helper is now identical to main and no longer part of the net diff. The updater helper audit removed the redundant atomic alias and duplicate errno predicates in favor of canonical implementations; all 19 existing native cases remain. That helper is now identical to main and is recorded as a historical audit outside the final diff.

Audited paths:

  • src/agents/embedded-agent-runner/run/attempt-phase-lifecycle.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-build.provenance.test.ts
  • src/agents/embedded-agent-runner/run/attempt-prompt-submit.steering.test.ts
  • src/agents/embedded-agent-runner/run/attempt-stream-prepare.test-support.ts
  • src/agents/embedded-agent-runner/run/attempt-stream-prepare.test.ts
  • src/agents/embedded-agent-runner/run/attempt-stream-settle.test.ts
  • src/agents/embedded-agent-runner/run/attempt.async-tasks.test.ts
  • src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts
  • src/agents/openclaw-tools.subagents.sessions-spawn.test-harness.ts
  • src/agents/subagents/announce/subagent-announce-result.test.ts
  • src/agents/subagents/announce/subagent-announce.format.e2e.test.ts
  • src/agents/subagents/announce/subagent-announce.requester-settle-results.test.ts
  • src/agents/subagents/announce/subagent-announce.requester-settle-wake.test.ts
  • src/agents/subagents/completion/subagent-completion-admission.test-helpers.ts
  • src/agents/subagents/registry/subagent-registry-lifecycle-completion.test-support.ts
  • src/agents/subagents/registry/subagent-registry-lifecycle-wake.retry.test.ts
  • src/agents/subagents/registry/subagent-registry-lifecycle.test.ts
  • src/agents/subagents/registry/subagent-registry-sweeper-recovery.test.ts
  • src/agents/subagents/registry/subagent-registry.announce-loop-guard.test.ts
  • src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts
  • src/agents/subagents/registry/subagent-registry.lifecycle-waits.test-support.ts
  • src/agents/subagents/registry/subagent-registry.persistence.resume.test.ts
  • src/agents/subagents/registry/subagent-registry.persistence.test-support.ts
  • src/config/sessions/session-accessor.sqlite-archive-read.test.ts
  • src/config/sessions/session-accessor.test.ts
  • src/config/sessions/session-transcript-match.worker.test.ts
  • src/cron/service.stale-family.test.ts
  • src/cron/service/ops.run-admission-cleanup.test.ts
  • src/cron/service/ops.run-admission.test.ts
  • src/cron/service/owner-hardening.test.ts
  • src/cron/service/run-admission.lost-queued.test.ts
  • src/cron/service/run-admission.responsiveness.test.ts
  • src/cron/service/run-admission.worker.test.ts
  • src/cron/service/run-recovery.settlement.test.ts
  • src/gateway/agent-turn/agent-run-dispatch.legacy.test.ts
  • src/gateway/server-claws-monitors.test.ts
  • src/gateway/server-cron.test.ts
  • src/gateway/session-message-events.test.ts
  • src/gateway/session-utils.queued-collector-admission.test.ts
  • src/sessions/background-session-result.test.ts
  • src/tasks/detached-task-lookup.worker.test.ts
  • src/tasks/task-registry.store.test.ts
  • test/helpers/cron/runtime-mutation.ts
  • test/vitest/vitest.database-worker-core-paths.mjs

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 24, 2026 22:26
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: XL labels Sep 24, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 9:51 PM ET / September 25, 2026, 01:51 UTC (Revision 4).

ClawSweeper review

What this changes

Moves transcript matching, detached-task reads, and selected cron run and receipt operations into existing database workers so Gateway events can continue during database waits.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: the branch addresses work still present on current main, and the linked WAL repair covers a different database path. This review found no concrete introduced defect or unresolved product choice. The earlier retry-grace test failure is documented with a bounded investigation under repository policy.

Priority: P2
Reviewed head: 93ec1d966553f601732d8853bd8dfd7af9e5a9ca

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The branch has focused before/after boundary evidence and no identified blocking defect, while its broad runtime cutover warrants normal exact-head review gates.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR's captured before/after private production-path probes exercise transcript lookup and cron/task work while database coordination is held, then report continued host-event service, exact answers, and committed outcomes. Worker receipt checks and replacement-owner controls cover the changed authority path. No stored-data format or migration contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR's captured before/after private production-path probes exercise transcript lookup and cron/task work while database coordination is held, then report continued host-event service, exact answers, and committed outcomes. Worker receipt checks and replacement-owner controls cover the changed authority path. No stored-data format or migration contract changes.
Evidence reviewed 9 items Current main retains the synchronous cron path: The fetched main revision still calls the synchronous cron row transaction and receipt activation from run admission; this PR's worker cutover is not already on main.
Transcript read boundary: The introduced transcript matcher uses the existing history worker for durable reads and rechecks state admission after preparation; the process-held incognito path remains explicit.
Commit authority: The host checks admission and current ownership at worker grants, then publishes only an acknowledged committed outcome.
Findings None None.
Security None None.

How this fits together

The Gateway handles conversations and scheduled work while reading transcripts and coordinating task and cron state. Worker adapters perform the database operations and return results to the Gateway owners that publish outcomes or continue execution.

flowchart LR
  A[Gateway events] --> B[Transcript and task requests]
  A --> C[Cron run requests]
  B --> D[Read-only history worker]
  C --> E[SQLite write worker]
  D --> F[Owner revalidation]
  E --> F
  F --> G[Answers and committed state]
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 and test lines production +1686/-627; tests +2501/-1235 The production growth spans several existing worker owners and is accompanied by fault and lifecycle coverage described in the PR.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/cron/service/startup-run-repair.ts, migration/backfill/repair: src/cron/service/timer-scheduler.ts, migration/backfill/repair: src/cron/store/run-recovery.types.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep transcript reads and cron writes with their existing worker owners, with exact run and receipt authority checked before effects and committed results published before observers run.

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

Yes. Current-main synchronous paths and the PR's held-coordinator and transcript-scan scenarios give a specific reproduction route; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. The branch uses established history and SQLite worker owners, retains the existing stored-row contract, and checks run ownership around asynchronous work.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2042d60441eb.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR's captured before/after private production-path probes exercise transcript lookup and cron/task work while database coordination is held, then report continued host-event service, exact answers, and committed outcomes. Worker receipt checks and replacement-owner controls cover the changed authority path. No stored-data format or migration contract changes.

Label justifications:

  • P2: Database contention can stall Gateway events, but the reported path has a limited, contention-dependent scope.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR's captured before/after private production-path probes exercise transcript lookup and cron/task work while database coordination is held, then report continued host-event service, exact answers, and committed outcomes. Worker receipt checks and replacement-owner controls cover the changed authority path. No stored-data format or migration contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR's captured before/after private production-path probes exercise transcript lookup and cron/task work while database coordination is held, then report continued host-event service, exact answers, and committed outcomes. Worker receipt checks and replacement-owner controls cover the changed authority path. No stored-data format or migration contract changes.

Evidence

What I checked:

  • Current main retains the synchronous cron path: The fetched main revision still calls the synchronous cron row transaction and receipt activation from run admission; this PR's worker cutover is not already on main. (src/cron/service/run-admission.ts:459, 2042d60441eb)
  • Transcript read boundary: The introduced transcript matcher uses the existing history worker for durable reads and rechecks state admission after preparation; the process-held incognito path remains explicit. (src/config/sessions/session-transcript-match.ts:62, 93ec1d966553)
  • Commit authority: The host checks admission and current ownership at worker grants, then publishes only an acknowledged committed outcome. (src/cron/service/runtime-mutation.ts:87, 93ec1d966553)
  • Final receipt check: The cron worker checks the current receipt in its write transaction before terminal settlement and updates the existing job row format. (src/cron/store/run-admission.worker.ts:129, 93ec1d966553)
  • Changed-owner controls: Focused tests cover replacement of a durable receipt, an agent becoming unavailable, and replacement of the local reservation owner during worker preparation. (src/cron/service/run-admission.worker.test.ts:128, 93ec1d966553)
  • Contributor proof and limits: The complete captured PR body, 15,992 UTF-16 units with SHA-256 d9b0c88669c2fd24e1bccea9fd836fea09f56537024c06c313fd7e116c168383, describes before/after held-coordinator probes, continued host-event service, exact result and committed-row checks, and negative owner controls. It also records an unexplained retry-grace test failure without claiming that a passing diagnostic fixed it.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: 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 (3 earlier review cycles)
  • reviewed 2026-09-25T00:05:47.371Z sha e895859 :: blocked before merge. :: none
  • reviewed 2026-09-25T00:50:31.917Z sha 7c8a9a1 :: blocked before merge. :: none
  • reviewed 2026-09-25T01:19:24.197Z sha 2539f61 :: blocked before merge. :: none

@fuller-stack-dev

fuller-stack-dev commented Sep 25, 2026 •

Copy link
Copy Markdown
Member Author

I rechecked the complete 101-file diff at 93ec1d966553f601732d8853bd8dfd7af9e5a9ca against the two remaining compatibility flags in the updated review.

  1. No public configuration, default, configuration schema, or normalization behavior changes are present. The agent-availability callback consumes prepared deletion facts internally. Public synchronous custom hooks retain their existing contract. Both the updater and Guest-question fixtures now exactly match main and have no net PR diff. Canonical integration removes the earlier helper-only updater repair from this PR without changing updater production behavior.
  2. No stored-data model, migration, backfill, or repair algorithm changes are present. InterruptedStartupRun moves unchanged from src/cron/service/startup-run-repair.ts to src/cron/store/run-recovery.types.ts. timer-scheduler.ts and ops-lifecycle.ts only update that type import. These cited paths are unchanged since the preceding reviewed head. The current review itself confirms: "No stored-data format or migration contract changes." The automated unknown-truncated-pull-files flag is not evidence of a migration. Existing tables and row codecs remain the contract.

The earlier updater and service-lifecycle disposition still applies. These are database execution changes during individual runs; the PR does not change installation, updater behavior, service-manager registration/restart, or Gateway startup/shutdown. An updater-to-candidate test does not exercise the changed product contract. The separate updater fixture repair passed its existing 19 native cases and unchanged CI wrapper with real filesystem behavior.

Relevant compatibility evidence covers persisted cron jobs, exact reservation and receipt ownership, committed activation/cleanup, unavailable or replaced owners, rollback, and accepted-write settlement. The PR records the actual results and limits, including the unexplained earlier retry-grace failures. No additional compatibility patch or migration test is justified by these flags.

The exact-head review found no introduced defect or security issue. Final-head CI remains required before merge; this disposition does not treat pending or failed checks as passed.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 25, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper review

Candidate 2539f61aab1bfc065fde9f1c1e100f23b2190404 adds the reviewed updater test-fixture repair and integrates current main. The existing updater cases reproduce the missing mixed-default import before the repair and pass 19/19 afterward; the unchanged CI wrapper also passes. Real filesystem authority/removal implementations remain in the fixture. All affected local checks and independent P2 review passed. The Guest-question helper now exactly matches main. The PR body records test audits, prior failures, limits, and the current CI run.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 25, 2026
# Conflicts:
#	scripts/tests/update-restart-swap-fixture.mjs
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 25, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Sep 25, 2026
@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) September 25, 2026 02:24
@fuller-stack-dev
fuller-stack-dev merged commit 628bf6d into main Sep 25, 2026
259 of 260 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/gateway-database-responsiveness-20260924 branch September 25, 2026 02:43
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…openclaw#157634)

* fix: keep gateway responsive during transcript and task database work

* fix(cron): keep worker contracts independent of implementations

* fix: settle cancelled task reads and retire drained receipt owners

* fix: recheck local drain before preparing databases

* fix: retire cancelled run before terminal delivery

* test: align lifecycle fixtures with async task reads

* test: load updater filesystem owners in restart fixture
karmafeast pushed a commit to karmaterminal/openclaw that referenced this pull request Sep 26, 2026
Put back upstream b1c68b9 content that the continuation line had
silently reverted in shared files. Every row has a keep/restore
disposition recorded in the round journal. Feature hunks are preserved.

Production:
- announce deps: use callSubagentLifecycleGateway for the wake and
  cleanup deps (openclaw#146369 inherited Gateway binding).
- reply-delivery: clear blockSourceText on superseded deferred replies
  (openclaw#143722).
- stream-rendering: record a block reply as delivered only when it has
  text (openclaw#135751).
- gateway runtime handles: carry hotReloadStatus through the managed
  reload.
- sweep-kill and sweeper: honor retired cancellations
  (reconcileRetiredSubagentCancellation), and pass the run's Gateway
  context resolver into sweep session deletes.
- registry read: per-child snapshot reads (openclaw#154727), so the Gateway
  event loop is not blocked.
- session delivery queue: read the post-enqueue status inside the SQLite
  worker instead of on the main thread, restoring the openclaw#147887 invariant.

Tests restored to upstream's coverage:
- task-registry kernel test: back to upstream's kernel functions.
- double-announce: real outbound adapter retry outcomes (openclaw#131419).
- side-question: listener-failure hooks case (openclaw#144828).
- session-delivery storage: main-thread-SQL idle assertion (openclaw#157458).
- media-only: the re-resolved auth selection assertion.
- resume persistence: activation uses the real recovery-runtime shape.

The resume "steered requester turn" test was adapted for upstream's
async task lookup (openclaw#157634). Its stub now settles like the real waker,
and the test waits for settle before an exact count, with a
no-pending-wake assertion added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fq5EX9ESA3CG9cuZxVoKAK
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 gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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