fix(gateway): reduce WebChat ingress latency#80670
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 27, 2026, 1:00 AM ET / 05:00 UTC. Summary PR surface: Source +519, Tests +916, Docs +1. Total +1436 across 17 files. Reproducibility: yes. at source/test level: the PR body gives a blocked-lane WebChat path, and the added test holds dispatch while checking JSONL append before release. I did not rerun it because this review is read-only. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Rebase onto current main, preserve the newer Do we have a high-confidence way to reproduce the issue? Yes at source/test level: the PR body gives a blocked-lane WebChat path, and the added test holds dispatch while checking JSONL append before release. I did not rerun it because this review is read-only. Is this the best way to solve the issue? Unclear until rebase: eager append plus entry-scoped suppression is a plausible narrow fix, but it must be integrated with current main's user-turn recorder and media-offload handling before it is the best merge path. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 44c1cc8285c8. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +519, Tests +916, Docs +1. Total +1436 across 17 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
1153e45 to
240fc10
Compare
|
Maintainer merge request for head $sha. Summary:
After-fix verification from local OpenClaw source checkout:ode scripts/test-projects.mjs src/gateway/server-methods/chat.directive-tags.test.ts -> 73 passed.ode scripts/test-projects.mjs src/agents/pi-embedded-runner/run/attempt.prompt-helpers.test.ts src/gateway/server.chat.gateway-server-chat.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts src/auto-reply/reply/agent-runner-utils.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/followup-runner.test.ts src/agents/pi-embedded-runner/run.overflow-compaction.loop.test.ts -> 7 files / 195 tests passed.ode_modules.bin\oxfmt.CMD --check --threads=1 src\gateway\server-methods\chat.ts -> passed.
GitHub checks observed on the latest SHA:
Please merge when maintainer-required CI/review is satisfied. |
e88e845 to
5367508
Compare
|
Update after rebasing onto latest origin/main (839e9e9): head is now $sha. Mergeability:
Re-run local verification after rebase:ode scripts/test-projects.mjs src/gateway/server-methods/chat.directive-tags.test.ts -> 73 passed.ode scripts/test-projects.mjs src/agents/pi-embedded-runner/run/attempt.prompt-helpers.test.ts src/gateway/server.chat.gateway-server-chat.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts src/auto-reply/reply/agent-runner-utils.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/followup-runner.test.ts src/agents/pi-embedded-runner/run.overflow-compaction.loop.test.ts -> 7 files / 195 tests passed.ode_modules.bin\oxfmt.CMD --check --threads=1 src\gateway\server-methods\chat.ts src\gateway\server-methods\chat-user-transcript-persistence.ts src\gateway\server.chat.gateway-server-chat-b.test.ts src\agents\pi-embedded-runner\run\attempt.prompt-helpers.ts src\agents\pi-embedded-runner\run\attempt.prompt-helpers.test.ts -> passed.
Known local check gap:
Please merge once required CI/review is satisfied. Re-review progress:
|
|
CI follow-up for the latest head (
Local verification after the fix: I also attempted the full CI shard locally with |
|
Maintainer merge request update:
Please merge once the required queued checks complete, unless another maintainer concern comes up. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Diff Drake Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
Summary
chat.sendACK and before agent dispatch enters the serialized session lane.Verification
corepack pnpm exec oxfmt --check --threads=1 CHANGELOG.md docs/web/webchat.md src/agents/pi-embedded-runner/run.ts src/agents/pi-embedded-runner/run/attempt.prompt-helpers.test.ts src/agents/pi-embedded-runner/run/attempt.prompt-helpers.ts src/agents/pi-embedded-runner/run/attempt.ts src/agents/pi-embedded-runner/run/params.ts src/agents/session-tool-result-guard-wrapper.ts src/auto-reply/get-reply-options.types.ts src/auto-reply/reply/agent-runner-run-params.ts src/auto-reply/reply/followup-runner.ts src/auto-reply/reply/get-reply-run.ts src/auto-reply/reply/queue/types.ts src/gateway/server-methods/chat.ts src/gateway/server-methods/chat-user-transcript-persistence.ts src/gateway/server.chat.gateway-server-chat-b.test.ts src/gateway/session-utils.tscorepack pnpm test src/agents/pi-embedded-runner/run/attempt.prompt-helpers.test.ts src/gateway/server.chat.gateway-server-chat.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts src/auto-reply/reply/agent-runner-utils.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/followup-runner.test.ts src/agents/pi-embedded-runner/run.overflow-compaction.loop.test.tscorepack pnpm tsgo:corecorepack pnpm tsgo:core:testcorepack pnpm check:changedcorepack pnpm buildgit diff --checkReal behavior proof
ignored eager user transcript suppression after session rollover.mainControl UI against the user's running 5.7 gateway because the gateway protocol versions differ; that combination previously produced a protocol mismatch. The PR branch was validated with targeted gateway/Pi tests andpnpm buildinstead.AI-assisted disclosure
codex review --base origin/main,codex review --uncommitted, andcodex review --commit HEAD; each attempt timed out locally without producing findings.