Repository navigation
fix(reply): queue visible turns behind active replies - #87044
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 27, 2026, 1:48 AM ET / 05:48 UTC. Summary PR surface: Source +6, Tests +68. Total +74 across 4 files. Reproducibility: yes. source inspection gives a high-confidence reproduction path: current main’s visible admission can call the low-level idle waiter without a timeout, and that waiter supplies the 15s default. I did not run the timer repro because this was a read-only review. 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:
Proof guidance: Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the caller-scoped timeout split after real channel proof shows visible turns are delivered after an active reply while cleanup and follow-up paths remain bounded; if owners do not want unbounded visible waits, add an explicit visible watchdog instead. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence reproduction path: current main’s visible admission can call the low-level idle waiter without a timeout, and that waiter supplies the 15s default. I did not run the timer repro because this was a read-only review. Is this the best way to solve the issue? Yes, the code direction is the narrow maintainable fix: make the timeout explicit at callers that need cleanup/retry behavior and leave visible admission to wait for active reply completion. The remaining question is proof and owner acceptance of the unbounded visible-wait tradeoff. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against e74a03903594. Label changesLabel justifications:
Evidence reviewedPR surface: Source +6, Tests +68. Total +74 across 4 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
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
22e201f to
a47837f
Compare
a47837f to
dca5fba
Compare
Co-authored-by: Keshav's Bot <[email protected]>
dca5fba to
cba1038
Compare
|
Landed via squash onto
Thanks @keshavbotagent! |
Remove the hidden 15s default from reply-run idle waits so visible user turns do not inherit cleanup-settle behavior while waiting behind an active same-session reply operation. Keep the 15s timeout explicit for queued follow-up retry/defer paths and interrupt/reset cleanup waits, and add reply-admission regressions for both visible and queued follow-up behavior. Also preserve the original cause on a nearby sessions-send fallback error to keep current lint green after rebasing onto main. Thanks @keshavbotagent. Co-authored-by: Keshav's Bot <[email protected]>
Remove the hidden 15s default from reply-run idle waits so visible user turns do not inherit cleanup-settle behavior while waiting behind an active same-session reply operation. Keep the 15s timeout explicit for queued follow-up retry/defer paths and interrupt/reset cleanup waits, and add reply-admission regressions for both visible and queued follow-up behavior. Also preserve the original cause on a nearby sessions-send fallback error to keep current lint green after rebasing onto main. Thanks @keshavbotagent. Co-authored-by: Keshav's Bot <[email protected]>
Summary
Verification
pnpm -s exec oxfmt src/auto-reply/reply/reply-run-registry.ts src/auto-reply/reply/reply-turn-admission.ts src/auto-reply/reply/reply-turn-admission.test.ts src/auto-reply/reply/get-reply-run.ts src/agents/tools/sessions-send-tool.tspnpm -s exec oxlint src/auto-reply/reply/reply-run-registry.ts src/auto-reply/reply/reply-turn-admission.ts src/auto-reply/reply/reply-turn-admission.test.ts src/auto-reply/reply/get-reply-run.ts src/agents/tools/sessions-send-tool.tsgit diff --checkpnpm -s tsgo:core:testpnpm -s tsgo:corepnpm lint --threads=8fnm exec --using v24.15.0 -- pnpm -s exec tsx -e '...'.agents/skills/autoreview/scripts/autoreview --mode local.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/mainReal Behavior Proof
Behavior addressed: Visible user turns arriving while a same-session reply operation is active should wait for that operation to clear instead of being skipped by the reply-run registry's cleanup-settle timeout.
Real environment tested: Local OpenClaw source checkout on Node 24.15.0, against PR head
cba103871a493fc1db922bce519d7824400d967c.Exact steps or command run after this patch: Ran a terminal probe with Node 24.15.0 against the patched OpenClaw source checkout. The probe created an active reply operation, admitted a visible turn for the same session key, confirmed no
15_000timer was scheduled and the turn stayed pending, completed the active operation, then confirmed the visible turn was admitted with the active session id. The same terminal probe admitted a queued follow-up and confirmed it still schedules the explicit15_000retry/defer timeout.Evidence after fix: Terminal output from the OpenClaw source checkout:
Observed result after fix: The visible reply admission remained pending while the active reply operation was running, scheduled no
15_000cleanup timer, then became owned after the active operation completed. The queued follow-up path still scheduled the15_000retry timeout and returnedskipped active-run, so a stuck active run does not wedge the follow-up drain.What was not tested: I did not force a deployed Telegram message to wait behind a deliberately held active operation. The changed core admission behavior was exercised directly in a local OpenClaw source checkout.