fix(auto-reply): guard missing dispatcher getFailedCounts without weakening the SDK type#89318
Conversation
…kening the SDK type getDispatcherFinalOutcomeCounts called dispatcher.getFailedCounts() without optional chaining while the adjacent getCancelledCounts?.() was guarded, so dispatcher variants omitting getFailedCounts threw "TypeError: dispatcher.getFailedCounts is not a function". Keep the public ReplyDispatcher.getFailedCounts contract required (no plugin-facing SDK break) and add an internal DispatcherOutcomeCountsView plus a readDispatcherFailedCounts helper for the defensive accounting paths in core dispatch (dispatch-from-config, dispatch-acp-delivery) and the Feishu extension bot, each falling back to zero counts when a non-conforming runtime dispatcher omits the method. Fixes #89116 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…kening the SDK type
|
Codex review: passed. Reviewed June 2, 2026, 12:16 AM ET / 04:16 UTC. Summary PR surface: Source +24, Tests +35. Total +59 across 5 files. Reproducibility: yes. from source inspection. Current main calls 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. Next step before merge
Security Review detailsBest possible solution: Land the narrow internal guard with the focused regression coverage while keeping the plugin-facing dispatcher API unchanged. Do we have a high-confidence way to reproduce the issue? Yes from source inspection. Current main calls Is this the best way to solve the issue? Yes. The PR fixes the crash at the internal count-reading boundary and covers sibling direct call sites without weakening the SDK-visible AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against ffbd02fe8ed9. Label changesLabel justifications:
Evidence reviewedPR surface: Source +24, Tests +35. Total +59 across 5 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
|
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
…kening the SDK type (openclaw#89318) Summary: - Adds defensive failed-count reads in auto-reply/ACP accounting and Feishu fallback paths, plus a focused regression test, while keeping `ReplyDispatcher.getFailedCounts` required. - PR surface: Source +24, Tests +35. Total +59 across 5 files. - Reproducibility: yes. from source inspection. Current main calls `dispatcher.getFailedCounts().final` and si ... issing that method follows a clear TypeError path; the source PR also supplied terminal before/after proof. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(auto-reply): guard missing dispatcher getFailedCounts without wea… Validation: - ClawSweeper review passed for head 0bdfb4a. - Required merge gates passed before the squash merge. Prepared head SHA: 0bdfb4a Review: openclaw#89318 (comment) Co-authored-by: Alix-007 <li.long15@xydigit.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…kening the SDK type (openclaw#89318) Summary: - Adds defensive failed-count reads in auto-reply/ACP accounting and Feishu fallback paths, plus a focused regression test, while keeping `ReplyDispatcher.getFailedCounts` required. - PR surface: Source +24, Tests +35. Total +59 across 5 files. - Reproducibility: yes. from source inspection. Current main calls `dispatcher.getFailedCounts().final` and si ... issing that method follows a clear TypeError path; the source PR also supplied terminal before/after proof. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(auto-reply): guard missing dispatcher getFailedCounts without wea… Validation: - ClawSweeper review passed for head 0bdfb4a. - Required merge gates passed before the squash merge. Prepared head SHA: 0bdfb4a Review: openclaw#89318 (comment) Co-authored-by: Alix-007 <li.long15@xydigit.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Makes #89148 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.
ClawSweeper 🐠 replacement reef notes:
Inherited issue-closing references from the source PR:
Fixes #89116
Co-author credit kept:
fish notes: model gpt-5.5, reasoning high; reviewed against 0bdfb4a.