fix(gateway): reduce WebChat ingress latency#80670
Conversation
|
Codex review: found issues before merge. Reviewed July 4, 2026, 12:32 AM ET / 04:32 UTC. Summary PR surface: Source +519, Tests +916, Docs +1. Total +1436 across 17 files. Reproducibility: no. high-confidence live current-main reproduction was run in this read-only review. Source inspection plus the canonical issue show the timing class around Review metrics: 2 noteworthy metrics.
Stored data model 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 findings
Review detailsBest possible solution: Port the useful WebChat durability goal onto the current shared user-turn recorder/session-accessor path and prove busy same-session, rollover, media, hook, and failure paths there. Do we have a high-confidence way to reproduce the issue? No high-confidence live current-main reproduction was run in this read-only review. Source inspection plus the canonical issue show the timing class around Is this the best way to solve the issue? No, not as written. The direction is plausible, but current main now has a shared user-turn recorder boundary and this branch needs a port plus busy same-session proof before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 26cb189276af. Label changesLabel 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?
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(gateway): reduce WebChat ingress latency This is item 1/1 in the current shard. Shard 8/20. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
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.