Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. What this changesThis PR adds an optional post-deferral watchdog and gives WhatsApp a seven-day adoption window. Example: A WhatsApp follow-up waits six minutes before reply-lane adoption.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open for the distinct WhatsApp recovery-policy decision; current main protects healthy queued waits, but does not implement the proposed separate deadline contract. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherWhatsApp socket events enter a durable ingress queue, pass through debounce and reply scheduling, and settle through the shared drain's adoption lifecycle. flowchart LR
A[WhatsApp socket] --> B[Durable ingress queue]
B --> C[Shared ingress drain]
C --> D[WhatsApp debounce]
D --> E[Reply scheduler]
E --> F[Adoption or abandonment]
F --> C
C --> G[Complete retry or failure]
Technical reviewBest possible solution: Prefer the existing queue-owned renewal flow unless a distinct current WhatsApp failure warrants an approved separate watchdog. Do we have a high-confidence way to reproduce the issue? No current-main failing run was supplied or executed; source and shipped tests show that owned queued waits now renew the watchdog, so the original unconditional five-minute-loss premise no longer establishes the remaining need. Is this the best way to solve the issue? This is a plausible bounded mitigation on its original base, but not an established best current fix: the existing queue lifecycle already distinguishes owned waits from silence without extending lost-handoff recovery to seven days. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fd4bc6556220. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +27, Tests +354, Docs +21, Generated 0. Total +402 across 11 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 17, 2026, 6:09 PM ET / 22:09 UTC (Revision 5). |
240a2d8 to
8b19e3b
Compare
|
Addressed the P1 liveness finding on exact head The unbounded Inspectable proof now includes a committed real-timer owner-fault harness using the production WhatsApp ingress monitor and an ephemeral SQLite queue. It deliberately returns a non-terminal deferred result, observes the bounded failure, then verifies successor dispatch on the same lane. It uses no live WhatsApp account, credentials, or message send. Validation on the rebased head:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review The prior re-review workflow completed without replacing the older verdict. Please re-review exact head |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
CI status note: the only code-test failure is the unrelated |
|
@clawsweeper re-review Please re-review exact head The description now includes an inspectable, redacted full scheduler-owner trace through mock socket → durable ingress → WhatsApp debounce → actual follow-up queue lifecycle owner → bounded
This was a local ephemeral exact-head proof with no account credentials, live send, production queue, or production mutation. The separate maintainer policy decision on the seven-day owner-local bound remains explicit. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
2026-09-10 current-main audit at |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Summary
handler-timeoutwhen a deferred scheduler never adopts or abandons, aborting late work and releasing the conversation lane.turnAdoptionLifecyclecontract.Related to #120265 and #116547. This fixes the WhatsApp owner path without introducing an unbounded scheduler-owned deferral mode.
What problem this solves
The generic ingress watchdog is appropriate while a claimed message is dispatching, but WhatsApp may legitimately defer adoption while its debounce and reply scheduler waits behind an active turn. Applying the same five-minute clock across both phases can dead-letter healthy queued work.
Clearing the watchdog after handoff is also unsafe: WhatsApp's scheduler has terminal callbacks but no independent liveness timeout, so a never-settling scheduler promise could refresh the durable claim and block the conversation lane forever.
This revision uses two bounded policies:
deferredAdoptionStallTimeoutMsresets the watchdog only when deferral actually occurs;The seven-day value is an operational recovery policy, not a scheduler-derived semantic maximum. A renewable scheduler heartbeat remains the stronger future refinement if arbitrarily long healthy waits must be supported.
Safety and public contract
handler-timeout, and failed-tombstone behavior.Review verdict and scope
Evidence
54b018b8ae641d29934291feb50c2cf948e3fa3d.main:5295f2578e1be11671987df79a2110f36e663daa, normal-merged as74b2cacc12c; the sole genuine conflict was the generated Plugin SDK JSONL baseline, resolved by canonical regeneration. Earlier refreshes likewise preservedmain's generated-contract changes.EBUSYremovals of open SQLite temp files; the repository's test-only database closer was added before cleanup, after which all focused tests passed.pnpm tsgo:core.pnpm tsgo:extensions.pnpm tsgo:core:test.pnpm tsgo:extensions:test.git diff --checkpassed.main, including the review runner's independent 7.5-second scan.Owner-path proof available today
The current automated proof reaches the real OpenClaw ownership seams but uses an ephemeral durable queue and mock Baileys socket. It does not use credentials or send live traffic.
{"scenario":"lost-scheduler-adoption","transport":"mock-baileys-socket","durableQueue":"ephemeral","timers":"real","configuredProductionBoundMs":604800000,"harnessBoundMs":50,"path":["messages.upsert","durable-delivery","whatsapp-debounce","turnAdoptionLifecycle.onDeferred","handler-timeout","same-lane-successor"],"sameLaneSuccessorDispatched":true,"lateAdoptionRejected":true,"credentials":false,"liveSend":false}The sibling healthy-path regression uses the same owner path, keeps the second same-lane event pending, adopts through the supported
turnAdoptionLifecycle.onAdoptedcontract, and then observes successor dispatch. Core-owner tests separately prove queue admission behavior, reset-at-handoff timing, timeout dead-lettering, late-adoption fencing, and adoption/abandonment timer cancellation.Outstanding acceptance — do not merge yet
AI assistance
AI-assisted investigation, implementation, tests, merge maintenance, and PR preparation. Review findings were independently reproduced by tracing the shared watchdog and the real WhatsApp debounce/reply ownership path before the bounded revision was implemented.