Repository navigation
test(gateway): avoid async facade mock race - #118708
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 10:24 AM ET / 14:24 UTC. ClawSweeper reviewWhat this changesThe branch moves the gateway Merge readinessKeep this PR open for normal maintainer landing. Current Priority: P3 Review scores
Verification
How this fits togetherGateway RPC dispatch lazily loads the flowchart LR
A[Gateway RPC request] --> B[Lazy server-method dispatcher]
B --> C[Effective-tools handler]
C --> D[Session and configuration resolution]
D --> E[Runtime facade]
E --> F[Tool inventory and policy]
F --> G[Gateway response]
H[Integration-test manual mock] --> E
Before merge
Agent review detailsSecurityNone. PR surfaceSource +68, Tests -56. Total +12 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Land the narrow synchronous manual-mock repair after normal maintainer approval and required-check completion; retain the real session/config ownership paths in this integration test. Do we have a high-confidence way to reproduce the issue? Yes. The PR identifies the ordered gateway-method test sequence and documents a pre-fix CI watchdog stall, followed by repeated remote after-fix runs of that sequence without a stall or retry. Is this the best way to solve the issue? Yes. Replacing the same-façade asynchronous partial mock at the test boundary is narrower and more maintainable than changing worker settings, retries, timeouts, or production runtime behavior; the manual mock preserves the owner paths under test. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ffcca757eb3a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) fix(plugins): reject external public-artifact hardlinks (#118689)
* origin/main: (78 commits) fix(parallels): recover Windows poll transport failures (#118479) fix(channels): deny unauthorized Discord and Telegram binding access (#118704) fix(test): bound shared git inventory lookup (#111171) fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) ...
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (openclaw#118702) docs: show canonical agent roster configuration (openclaw#118722) fix(channels): generate catalog from package manifests (openclaw#118097) fix(zalouser): distinguish probe timeout from auth failure (openclaw#111336) improve(ui): cut E2E shard runtime by reusing the bundle (openclaw#118697) fix(cli): publish completion caches atomically (openclaw#118715) fix(whatsapp): honor disabled self-chat without widening group access (openclaw#118711) fix(voice-call): terminate carrier calls after realtime startup failures (openclaw#118699) fix(slack): isolate GovSlack media trust and delivery (openclaw#118695) fix(browser): wrap page-controlled action results (openclaw#118691) fix(security): sanitize JSON-escaped forged content boundaries (openclaw#118698) test(qa): prove real yielded-child completion and channel delivery (openclaw#118707) fix(doctor): honor explicit plugin-only migration authority (openclaw#118700) fix(security): detect child_process calls through aliases and computed members (openclaw#116304) test(gateway): avoid async facade mock race (openclaw#118708) fix(gateway): preserve final speech during transcription shutdown (openclaw#118693) fix(gateway): resume durable outbound delivery retries (openclaw#118694) fix(plugins): reject external public-artifact hardlinks (openclaw#118689)
Summary
Root cause
In CI run 30818181352, the first gateway-methods attempt reported 144 of 145 files and 2,846 tests, then remained silent until the 300-second watchdog killed it. The sole missing file was tools-effective.global-agent.integration.test.ts. The automatic retry passed all 145 files and 2,849 tests in 59.13 seconds, producing a 439.91-second wrapper wall.
The missing file was the only gateway-methods test with an async importOriginal partial mock of tools-effective.runtime.js. That factory crossed the shared non-isolated worker's mock-resolution boundary after another file had completed. The replacement facade is synchronous and complete, so it cannot re-enter resolution of the module it is mocking.
Proof
No sharding, worker, concurrency, timeout, retry, production, docs, or coverage behavior changes.