Repository navigation
fix(slack): dispatch independently routed threads concurrently - #114552
Conversation
|
Codex review: found issues before merge. Reviewed August 26, 2026, 1:38 AM ET / 05:38 UTC. ClawSweeper reviewWhat this changesThe PR defers Slack ingress scheduling until message routing resolves an OpenClaw session, allowing independently routed threads to overlap while same-session turns stay serialized. Merge readiness⛔ Blocked by patch quality or review findings - 7 items remain Keep open: a routed Slack turn that throws releases its session predecessor before durable retry handling, allowing a later same-session turn to dispatch first. The prior retry-order blocker remains unresolved. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherSlack events enter durable ingress, then the Slack message handler resolves the OpenClaw session before dispatch. The new scheduler uses that resolved session to control concurrency while retaining channel-level migration ordering. flowchart LR
A[Slack event] --> B[Durable ingress]
B --> C[Message handler]
C --> D[Session routing]
D --> E[Session queue]
E --> F[Agent dispatch]
F --> G[Retry or adoption]
B --> H[Channel migration fence]
H --> F
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +130, Tests +303. Total +433 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the predecessor’s session position through retry, releasing it only after terminal adoption or terminal failure, and prove a failed first turn cannot be overtaken by its same-session successor. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: make a first routed turn throw after session routing, queue a same-session successor, then observe that the successor is released before the first durable row retries. This review did not execute the harness because the checkout is read-only. Is this the best way to solve the issue? No; the current catch releases session ownership too early. The scheduler must retain retry precedence for the same durable claim, with a focused failed-first ordering test. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f61ae1193d0c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (13 earlier review cycles; latest 8 shown)
|
17f50d5 to
c1fe53c
Compare
Mantis Slack Desktop Smoke QASummary: Mantis ran Slack QA inside a Crabbox Linux VNC desktop, started an OpenClaw Slack gateway in that VM, opened Slack Web in the visible browser, and captured screenshot/video evidence.
Slack desktop/VNC browser Slack motion preview Motion-trimmed clips: Full videos: |
1c40d8a to
0e709ce
Compare
f2fee98 to
a611653
Compare
|
Land-ready exact head a611653: Independent Slack threads serialized unnecessarily, while flawed lane release allowed channel migrations to overtake both active and deferred messages. Preserve independent thread concurrency and same-session FIFO, while holding a separate authoritative channel-lifecycle fence until durable active or deferred turns actually settle. Real Bolt events use SQLite-backed queues safely; active/deferred channel messages always finish before migration, with no stalled watchdog or overtaken session. 205 Slack and shared queue tests including actual Bolt 5 and real SQLite active/deferred migration red-to-green proof; clean full-branch P1 review, strict type/lint checks, and exact full hosted CI gate all pass. |
|
Merged via squash.
|
…law#114552) * fix(slack): dispatch independently routed threads concurrently * test(slack): satisfy strict thread dispatch fixture types * fix(slack): preserve queued session ownership through adoption * test(slack): reuse typed ingress watchdog fixture * fix(slack): fence channel migrations behind active turns * test(slack): avoid returning event-loop handles from executor * fix(slack): hold migration fences through deferred adoption


Problem
Independent Slack threads were serialized behind one channel lane, while splitting lanes before routing could corrupt shared sessions and break persisted event replay.
Repair
Keep shipped durable channel lanes intact and release them only after authoritative session routing. Serialize by resolved session ownership while allowing independently owned thread turns to overlap.
Verification
121 owner and sibling tests passed, including real SQLite/Bolt ingress, shared-session serialization, persisted replay, and channel-ID migration. Independent review passed. Authenticated Slack Desktop proof is being requested separately.