Skip to content

fix: reduce filesystem stalls during chat turn preparation - #191075

Merged
steipete merged 6 commits into
mainfrom
steipete/perf-micro-main-thread-sync-fs-on-turn-path-20260919
Nov 2, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/perf-micro-main-thread-sync-fs-on-turn-path-20260919

Conversation

@steipete

@steipete steipete commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reduces chat-turn stalls when filesystem operations block the Gateway event loop. Turn preparation and delivery synchronously read TTS preferences and repeat filesystem identity/path probes even when their owners already hold the required facts.

User Impact

TTS preference reads now await filesystem I/O, and prepared session/turn paths avoid several redundant synchronous probes. Existing synchronous SDK contracts remain supported. No configuration, dependency version, or database schema changes.

Performance follow-up passed: this is a partial mitigation, not a zero-sync Gateway. Eight quiet-host A/B pairs did not reproduce the cold-loop regression; exact-head CI remains the landing gate. The lead accepts the original cold elapsed and first-row tails as A/A noise (50% and 74% control spread), and accepts +107 production lines. Remaining sandbox/state-lock/database/skill/bootstrap/plugin-artifact paths still issue synchronous filesystem calls.

Why This Change Was Made

The actor factory now acquires and retains the database execution used by the turn; write admission consumes the existing retained physical identity and live registry guard. Prepared readers and row refreshes consume their owner's prepared source/filename. TTS's asynchronous routes share parsing and projection with the preserved synchronous SDK functions. Text/inline/sandbox media hydration no longer eagerly discovers host media roots, and attachment construction no longer probes existence before the actual read.

Production delta: +107 lines (353 added, 246 removed). Growth is mainly the synchronous SDK compatibility boundary plus asynchronous TTS routes and explicit database execution custody; smaller redundant paths are deleted. No new persistent cache.

Evidence

Built isolated Gateway, real chat.send → agent.wait, synthetic 35.000 GiB SQLite database with 5,000 sessions and 62,000 workspace files / 1.116 GB. Local APFS, not a btrfs reproduction. Instrumentation records main-thread synchronous fs/fs-safe/SQLite API stacks, counts and duration without argument/file contents. Nested calls are counted once; API calls are not a kernel syscall census.

Acceptance recorded before candidate measurement: five serial interleaved A1/B/A2 triples, cold and warm separate, no unexplained ≥20% regression, changed-owner sync work eliminated, and warm event-loop maximum below 50 ms under an injected 500 ms TTS filesystem delay. Timing disables wrappers; sampled V8 allocations use a separate cohort. Each process runs one first-use and two warm turns; p95 at n=5 is the maximum, not a population-tail estimate.

Warm metric, median / p95 Baseline A1 Candidate B Baseline A2
Elapsed ms 200.558 / 240.087 196.755 / 223.285 197.156 / 245.119
Main-thread CPU ms 172.915 / 185.325 159.824 / 179.752 162.882 / 168.639
Process CPU ms 759.765 / 792.792 615.212 / 838.756 690.169 / 793.086
Event-loop max ms 34.734 / 41.943 28.721 / 30.605 32.850 / 34.341
Sampled allocation MB 60.567 / 62.008 59.602 / 60.222 58.602 / 59.483

Matched injected-delay proof: baseline warm loop maxima 525.07/522.45 ms; candidate 27.03/25.61 ms. Write-admission owner benchmark (five A1/B/A2 triples × 2,000 calls): synchronous calls 5 → 0; median main CPU 28.586/8.387/30.991 µs; sampled bytes 20,540/18,779/20,626; delayed heartbeat 506.500/1.951/507.395 ms.

Follow-up acceptance before the new run: eight serial alternating A/B pairs on a quiet host, one fresh Gateway/first-use turn each, identical copied synthetic fixture and pinned builds, every pair retained. Quiet admission requires ≥85% CPU idle and one-minute load ≤4.2 on 14 logical CPUs. Compare all pair-level loop maxima and their median/p95; an unexplained ≥20% cold-loop increase remains a stop. Baseline is 1313c75c3bc7, candidate 671d3a3ca78e.

Original loaded-host observation, retained for comparison: elapsed p95 A1/B/A2 2,757.821/3,680.458/1,838.427 ms; main CPU 1,280.631/1,794.217/1,223.107 ms; loop max 189.137/417.595/191.234 ms. First-row main CPU p95 18.898/26.995/20.748 ms. The candidate outlier samples existing synchronous plugin-artifact hashing, with unchanged relevant source, but exact-outlier operation counts are unavailable and extra CPU is not causally explained. That profile alone did not clear the gate; the eight-pair follow-up below addresses it.

Quiet-host follow-up completed all eight alternating A/B pairs on a 14-logical-CPU macOS host using byte-verified copies of both built runtimes and the same synthetic database/workspace. Each process passed the ≥85% idle / load≤4.2 admission; no timed sample was discarded. Copy-triggered Spotlight indexing was resolved by moving only the task directory under .noindex before any measurement. Baseline/candidate cold-loop medians 85.098/86.376 ms, observed p95/max 89.194/90.636 ms: +1.5%/+1.6%; largest paired increase 6.3%, no recurrence of the original418ms candidate stall. Fixed AB ordering retains filesystem-cache warmth; these are process-first-use measurements, not disk-cold or a population-p95 estimate.

Pair Baseline loop max ms Candidate loop max ms B/A
1 89.194 85.393 0.9574
2 84.935 83.821 0.9869
3 86.114 87.032 1.0107
4 84.804 88.801 1.0471
5 85.852 88.670 1.0328
6 85.262 90.636 1.0630
7 84.476 85.721 1.0147
8 84.279 83.952 0.9961

Lead accepted: cold elapsed p95 and first-row tails are inside A/A noise (A/A spans 50%/74%); warm event-loop pauses with 500 ms injected fs delay 525→27 ms.

CPU limits remain visible: quiet-cohort main CPU median 871.369→877.613 ms (+0.72%), process CPU median 4519.330→4552.086 ms (+0.72%). Process CPU observed maximum grows 4614.889→5775.170 ms (+25.14%), concentrated in pair1 (+42.57% paired); no uniform CPU improvement is claimed. The lead’s follow-up landing condition is the cold-loop comparison above.

The +107 production-line growth is accepted. The quiet cohort used production head671d3a3ca78e; subsequent head 14a3c9f229c3 changes only test consumers, their exact guards, and PostgreSQL test isolation. The first CI failures were PR-caused and repaired: two missing async-TTS mock exports, two unawaited model-alias assertions, and the instrumentation suppression inventory. The first repair passed 54 affected tests; the next two missed async consumers passed 8 tests after an exact-head red reproduction. Scoped lint/format and fresh Codex reviews pass. Three obsolete mock exemptions were removed. The only new lint inventory entry records the probe's two Module._load accesses, required to observe native addon exports bypassing node:fs; this is a narrow, source-verified instrumentation exception, with no product suppression.

Live-model runs completed three actual synthetic file reads each, with and without Docker sandboxing. The model's final text incorrectly described the files despite correct read-tool results on both baseline and candidate; these prove tool execution, not semantic answer correctness. Final warm sandbox calls fell from 3,749/3,723 to 3,377/3,388; substantial synchronous work remains.

Focused owner regressions fail on exact parent 1313c75c3bc71c94be7f02dde5ce2f979320f9b9 and pass with the fix. Owner/caller suites, prompt-prefix stability, 6 Chromium browser tests and 16 UI E2E tests passed. Build, typechecks, lint, formatting and database guards passed. Codex autoreview is scoped-clean through P2 after fixing a harness history-limit finding.

pnpm check:changed also exposes inherited dead-export regressions reproduced on that exact parent: involvement helper introduced by b129ffcd845009cb7c284ab18a93e4536b318ef9 (#184511), three hook types by 71e516af03a11fb1e309ff4fd2a0b8dccee506da (#190906), and the parent's realtime-voice type after 403b0ced4f6b8e3806cfd435907de5b7a4cc9571 (#164816) removed its final SDK forwarding. These are main regressions, not ignored noise. Final six-file verification passed 268 tests; mock-export, line-cap, scoped lint and formatting gates passed after deleting six obsolete mock exemptions. No new baseline allowance was added.

Reproduction entry points:

node --import ./scripts/tsx.mjs scripts/build-all.mts qaRuntime
node --import ./scripts/tsx.mjs scripts/perf/transcript-turn-gateway.mts --root /path/to/new-proof-directory --sync-fs --state-fixture /path/to/synthetic-state --turns 3
node --import ./scripts/tsx.mjs scripts/perf/transcript-turn-gateway.mts --root /path/to/new-proof-directory --sync-fs --state-fixture /path/to/synthetic-state --turns 3 --delay-ms 500 --delay-match readTtsPrefs

Use --timings or --allocations for separate metric cohorts, and --live / --sandbox for live-provider tool proof. Fixtures must be synthetic; never point this workload at a live state directory.

The completed second CI run also exposed an inherited PostgreSQL test-isolation regression from 6fd646e86cd7c4decdaadd8901dd7f2846b837c2 (#188978): an unrelated test deleting its restore_% schema changed this test's global before/after listing. Deterministic foreign-schema cleanup reproduces the same failure on exact parent 1313c75c3bc7. This PR gives the test a dedicated database while retaining the full namespace leak-detection assertion; the same interference passes locally and cleanup leaves zero owned databases/namespaces. Test-only fix is net zero lines, with scoped lint/format and independent review passing. This is a repaired main regression, not ignored CI noise.

Final CI run 41451470249 completed with all jobs passing except the Workshop due-review test and its aggregate gate. Its global fake-timer census expected one timer and observed two. The test now waits for the scheduler’s 30-second timer directly, preserving clock advancement, current-config identity, policy refusal, and no-agent-run assertions. All 19 affected Bun tests and scoped lint/format pass; fresh Codex review is clean through P2. Production code is unchanged.

The fragile timer-count assertion originated in 60bee201456bc00cb61d42bfd0912b9013e9af01 (#173557). Exact-parent 1313c75c3bc7 proof deliberately overlaps a real worker task’s 60-second watchdog with the scheduler timer: the old assertion fails both policy variants with 2 vs 1; the repaired assertion passes both with the same two timers. Unmodified parent/candidate runs passed naturally, so this is explicitly injected proof of the pre-existing test assumption; the CI log does not identify its original extra timer. This main test regression is repaired here rather than treated as noise.

Related source-only dependency work: openclaw/fs-safe#1055 moves POSIX built-in root/read admission off synchronous filesystem paths. It is not adopted here; no dependency bump, release, or publication is part of this PR.

Integration qualification: 1d3e43aed595 completed CI run 41455499559 successfully. Main then independently landed the restore-test isolation fix in #190918 (e68dfaf78a58), causing a textual conflict with our duplicate test repair. After confirmed retirement of the pinned auto-merge request, main 9ee8b7020c41 was integrated and its PostgreSQL test retained byte for byte, including the sibling-schema interference regression. Production files merged cleanly; growth remains +107 (354 added /247 removed relative to the new main). Fresh Codex review of the full PR against that main is scoped-clean through P2; 63 message-send tests, 10 session-reader tests and the PostgreSQL test pass. The resolved head is a80b1cc86aa1a588b7930ad700e4ed1781dbc12a; prior-head CI is retained as prior-head evidence, with fresh CI required for this head. The performance tables measure the original pinned production candidate, not a new measurement of integrated main.

Current integrated-head qualification: pnpm check:changed now exits 0, including the full-tree dead-export scans (zero entries). Prompt-prefix (41), transcript lifecycle (14), and attempt setup (11) tests also pass after integration. The historical old-base dead-export failures above are not outstanding local failures.

CI run 41461796263 on exact head a80b1cc86aa1a588b7930ad700e4ed1781dbc12a exposed a newly observed main regression: test/scripts/test-projects.test.ts > Windows CI partitions > keeps explicit coverage disjoint without repeating small project setup names missing src/infra/sqlite-snapshot-staging.cancellation.test.ts. Introducing commit e68dfaf78a587b8be63168e397fc52290ea3eff0 (#190918) deleted that test while retaining its Windows manifest target. The unmodified exact integrated main parent 9ee8b7020c413fd2c23c923c6abf2b44ce1e5cc3 reproduces the identical assertion (1 failed, 209 skipped). Manifest, failing invariant, validator and execution-owner blobs are unchanged between the actual CI main parent 59373145f005e606dc25c6cc1dc88f3429a9e308 and tested merge 12dc95b3882b326011dd25772c01077ffdcc66ac; the missing path is absent in both. This is an attributed main regression for follow-up, not CI noise or a green-CI claim. The task authorizes a pinned-head admin landing when only proven inherited reds remain and local proof is green; native qualification is pending complete CI job accounting.

Landed: reviewed head a80b1cc86aa1a588b7930ad700e4ed1781dbc12a was squash-merged as 161f76d795a55943a88fc8ed00bac122b7ceba4e on 2026-11-02 14:55:40 UTC through the native inherited-failure exception. All 87 CI jobs reached terminal state; only the attributed Windows manifest job and its downstream aggregate failed. Security and all three PostgreSQL shards passed. Native landing-parent audit matched 67416fcc273715af02c827f1736f665d67991982; completion receipt is complete. Final squash production delta: 353 added /246 removed = +107. The Windows manifest regression remains a main follow-up; no green-CI claim. fs-safe#1055 remains open/unmerged and source-only.

Await TTS preference reads and reuse owner-held database identities in prepared turn and row paths. Avoid eager media root and redundant attachment/path probes while preserving read containment and synchronous SDK contracts.

Includes main-thread filesystem instrumentation and synthetic Gateway delay proof. This mitigates measured owners; remaining synchronous paths and unresolved cold performance tails are documented in the PR.
@clawsweeper

clawsweeper Bot commented Nov 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: XL labels Nov 2, 2026
@steipete
steipete marked this pull request as ready for review November 2, 2026 12:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T14:28:11.871004Z a80b1cc New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 2, 2026
Preserve real TTS exports in the MCP and system-prompt command tests, await published model aliases, and remove their obsolete mock exceptions. Record the exact two native-addon instrumentation suppressions required by the opt-in filesystem census.
Migrate the Telegram loopback mock to the asynchronous TTS hint while preserving real exports, await minimal web-search prompts, and remove the obsolete mock exemption. Preserve all existing behavior assertions.
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR makes TTS preference reads asynchronous and removes redundant filesystem probes from prepared chat-turn paths.

Example: A warm chat turn encounters an injected 500 ms TTS preference-file delay.

  • Before: Recorded Gateway event-loop pauses reach approximately 525 ms.
  • After: Recorded pauses fall to approximately 27 ms while preference I/O is awaited.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Strong production-path performance evidence supports the change, but two confirmed consumer-migration defects leave exact-head CI failing.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied built-Gateway chat.send to agent.wait measurements exercise asynchronous TTS reads and prepared turn paths, including injected filesystem delay and live-model file reads with and without sandboxing; the test-only follow-up leaves those production paths unchanged.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Filesystem work during chat preparation can pause the Gateway and delay otherwise unrelated activity.
Reason: The bounded mitigation has measured user value, preserves existing settings and SDK behavior, and has maintainer direction accepting its documented performance tradeoffs.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open: this PR provides a useful, measured reduction in Gateway stalls, but two missed asynchronous test-consumer migrations currently block CI.

Priority: P2
Reviewed head: 3a22c65b94bd88b73aefb62d60c1607c03f40f66

Before merge

  • Await the remaining web-search prompt assertions (P2) - Making this builder asynchronous changes even minimal-mode results into Promises. The test in src/agents/openclaw-tools.web-search.test.ts still assigns render(true) directly to prompt and asserts on it, so the exact-head check fails at line 146 instead of checking the rendered guidance. Make that test asynchronous and await all three render calls while preserving its assertions.
  • Migrate the Telegram loopback test's TTS mock (P2) - The new async TTS call is reached by prepareCliRunContext in test/loopback-ask-user-telegram-channel.test.ts, whose mock at lines 38–42 exports only buildTtsSystemPromptHint. Exact-head CI consequently throws a missing buildTtsSystemPromptHintAsync export error before the Telegram question flow executes. Preserve the real module exports and override the asynchronous hint, matching the other migrated consumers.

Findings

  • [P2] Await the remaining web-search prompt assertions — src/agents/system-prompt-config.ts:38
  • [P2] Migrate the Telegram loopback test's TTS mock — src/agents/system-prompt-config.ts:95-98

Provenance

  • Historical source coverage: original intent not found (unknown: The local history search found relevant merged work, but git blame could not read an older TTS blob in this partial checkout; no unsupported introduction attribution is made.)
Agent review details

How this fits together

Gateway chat preparation assembles prompts, acquires session actors, hydrates media, and prepares delivery using TTS preferences and database-owner facts.

flowchart TD
  A[Chat request] --> B[Turn preparation]
  B --> C[Async TTS preferences]
  B --> D[Session actor and database owner]
  B --> E[Media hydration]
  C --> F[Model prompt and reply delivery]
  D --> F
  E --> F
Loading

Technical review

Best possible solution:

Retain the existing-owner performance changes and complete the two missed test migrations without weakening their assertions.

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

Current-main source retains synchronous TTS preference reads, and supplied baseline Gateway measurements demonstrate their event-loop impact; this read-only review ran no target code.

Is this the best way to solve the issue?

The approach removes redundant work through existing owners, shares TTS parsing and projection, and preserves released synchronous SDK contracts; the remaining repairs are test-consumer updates.

Full review comments:

  • [P2] Await the remaining web-search prompt assertions — src/agents/system-prompt-config.ts:38
    Making this builder asynchronous changes even minimal-mode results into Promises. The test in src/agents/openclaw-tools.web-search.test.ts still assigns render(true) directly to prompt and asserts on it, so the exact-head check fails at line 146 instead of checking the rendered guidance. Make that test asynchronous and await all three render calls while preserving its assertions.
    Confidence: 1
  • [P2] Migrate the Telegram loopback test's TTS mock — src/agents/system-prompt-config.ts:95-98
    The new async TTS call is reached by prepareCliRunContext in test/loopback-ask-user-telegram-channel.test.ts, whose mock at lines 38–42 exports only buildTtsSystemPromptHint. Exact-head CI consequently throws a missing buildTtsSystemPromptHintAsync export error before the Telegram question flow executes. Preserve the real module exports and override the asynchronous hint, matching the other migrated consumers.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/agents/openclaw-tools.web-search.test.ts test/loopback-ask-user-telegram-channel.test.ts --maxWorkers=1
  • pnpm check:test-mock-exports
  • git diff --check

What I checked:

  • Exact introduced change: Reviewed the merge-base-to-head changes, separating them from subsequent base movement; current main still uses the synchronous configured prompt builder. (src/agents/system-prompt-config.ts:38, 3a22c65b94bd)
  • Confirmed asynchronous consumer failures: The exact-head check reports an assertion failure in openclaw-tools.web-search.test.ts and a missing buildTtsSystemPromptHintAsync mock export in loopback-ask-user-telegram-channel.test.ts; source inspection confirms both causal links to the changed prompt builder. (src/agents/system-prompt-config.ts:38, 3a22c65b94bd)
  • Production-path performance evidence: The PR records isolated built-Gateway chat.send to agent.wait measurements, injected-delay recovery, and live-model file reads with and without Docker sandboxing; the subsequent commit changes test consumers and instrumentation inventory only. (scripts/perf/transcript-turn-gateway.mts:278, 671d3a3ca78e)
  • Accepted performance tradeoffs: The maintainer-authored PR explicitly accepts the original cold elapsed and first-row tails, necessary production growth, and the quiet-host cold-loop comparison as its follow-up landing condition; it disclaims uniform CPU improvement. (3a22c65b94bd)
  • Compatibility and ownership preserved: Synchronous SDK TTS functions remain exported, both read paths share parsing and settings projection, and durable actor commands retain existing lifetime and worker authorization guards; no persisted format or schema is changed. (src/tts/tts-settings.ts:253, 3a22c65b94bd)
  • Additional CI failure remains unattributed: PostgreSQL conformance fails an expected-schema assertion in update-cohort-restore.postgres.test.ts; available evidence does not establish whether this PR causes it, so no contributor repair is assigned for that failure. (src/infra/database-engine/update-cohort-restore.postgres.test.ts:278, 3a22c65b94bd)

PR surface

Source +107, Tests +150, Docs +5, Other +435. Total +697 across 78 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 41 354 247 +107
Tests 32 391 241 +150
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 4 475 40 +435
Total 78 1225 528 +697

Labels

Label changes:

  • add P2: The change addresses measured chat-turn stalls with a bounded performance improvement; the confirmed remaining defects affect test consumers.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The change addresses measured chat-turn stalls with a bounded performance improvement; the confirmed remaining defects affect test consumers.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 2, 2026, 8:01 AM ET / 13:01 UTC.

Use a dedicated fixture database so another conformance test removing a restore schema cannot invalidate the refusal-before-effect assertion. Preserve the whole-database namespace equality check and clean up the owned database.

The shared namespace assertion was introduced by #188978. Deterministic foreign-schema cleanup reproduces the failure on the exact parent and passes with this fixture isolation.
@steipete
steipete enabled auto-merge (squash) November 2, 2026 13:57
@steipete
steipete disabled auto-merge November 2, 2026 14:19
@steipete
steipete merged commit 161f76d into main Nov 2, 2026
151 of 155 checks passed
@steipete
steipete deleted the steipete/perf-micro-main-thread-sync-fs-on-turn-path-20260919 branch November 2, 2026 14:55
@steipete

steipete commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
…191075)

* fix: reduce filesystem stalls during chat turn preparation

Await TTS preference reads and reuse owner-held database identities in prepared turn and row paths. Avoid eager media root and redundant attachment/path probes while preserving read containment and synchronous SDK contracts.

Includes main-thread filesystem instrumentation and synthetic Gateway delay proof. This mitigates measured owners; remaining synchronous paths and unresolved cold performance tails are documented in the PR.

* test: migrate remaining asynchronous prompt consumers

Preserve real TTS exports in the MCP and system-prompt command tests, await published model aliases, and remove their obsolete mock exceptions. Record the exact two native-addon instrumentation suppressions required by the opt-in filesystem census.

* test: await remaining tool and channel prompt builders

Migrate the Telegram loopback mock to the asynchronous TTS hint while preserving real exports, await minimal web-search prompts, and remove the obsolete mock exemption. Preserve all existing behavior assertions.

* test: isolate PostgreSQL restore cohort namespaces

Use a dedicated fixture database so another conformance test removing a restore schema cannot invalidate the refusal-before-effect assertion. Preserve the whole-database namespace equality check and clean up the owned database.

The shared namespace assertion was introduced by openclaw#188978. Deterministic foreign-schema cleanup reproduces the failure on the exact parent and passes with this fixture isolation.

* test: observe the Workshop review timer directly
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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant