fix(outbound): retry proven pre-connect failures#101024
Conversation
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
Codex review: needs changes before merge. Reviewed July 7, 2026, 2:07 AM ET / 06:07 UTC. Summary PR surface: Source +140, Tests +559, Docs +1. Total +700 across 12 files. Reproducibility: yes. Current main marks Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Remove the changelog entry, then land the shared pre-connect cleanup if maintainers accept the narrow classifier boundary; keep Discord idempotent reconciliation and existing stuck-row recovery as separate follow-up work. Do we have a high-confidence way to reproduce the issue? Yes. Current main marks Is this the best way to solve the issue? Yes, with one release-flow cleanup. A shared classifier for provable DNS/connect failures is the narrow maintainable fix for observed pre-dispatch failures, while Discord reconciliation remains the safer separate path for true unknown-send cases. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b66220948882. Label changesLabel justifications:
Evidence reviewedPR surface: Source +140, Tests +559, Docs +1. Total +700 across 12 files. View PR surface stats
Acceptance criteria:
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
Review history (1 earlier review cycle)
|
ab09620 to
87ee2e8
Compare
Co-authored-by: 0668000539 <[email protected]>
87ee2e8 to
364173b
Compare
|
Land-ready maintainer rewrite complete at signed head
Known proof gap: I did not repeat the credentialed real Discord Wi-Fi-cut send. The linked issue contains that live reproduction; this verification targets the shared duplicate-send safety invariant and the exact transport error shapes that decide replay. |
|
Merged via squash.
|
* fix(outbound): retry proven pre-connect failures Co-authored-by: 0668000539 <[email protected]> * refactor(infra): keep retry attempt metadata internal --------- Co-authored-by: Peter Steinberger <[email protected]>
* fix(outbound): retry proven pre-connect failures Co-authored-by: 0668000539 <[email protected]> * refactor(infra): keep retry attempt metadata internal --------- Co-authored-by: Peter Steinberger <[email protected]>
* fix(outbound): retry proven pre-connect failures Co-authored-by: 0668000539 <[email protected]> * refactor(infra): keep retry attempt metadata internal --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes #100979. A queued Discord or other channel send that fails before connecting to the platform can retain
send_attempt_started; recovery then treats it as an unknown send and refuses replay even though no request left the host.Why This Change Was Made
The original patch cleared queue evidence in a separate mutation and classified only the terminal error. That left split-state failure windows, omitted best-effort and recovery branches, and could erase evidence when an adapter's final safe-looking retry hid an earlier ambiguous attempt.
This maintainer rewrite:
The classifier follows actual Node/Undici and Slack SDK wrapper shapes. It does not use error-message inference, add config, or special-case Discord policy in core.
User Impact
Messages queued during a full network outage can replay after connectivity returns when the runtime can prove the platform connection was never established. Truly ambiguous failures remain guarded against blind replay and duplicate messages.
Evidence
tbx_01kwxh9xadqgh8a3yrdafdy52b: 210 focused core tests passed across retry, live delivery, SQLite storage, recovery, and queue-to-replay integration.pnpm check:changedpassed for core, core-test, and docs lanes.TypeError->AggregateErrorwith summaryECONNREFUSED-> twoECONNREFUSED/connectchildren.git diff --check: passed.The linked issue contains the credentialed real Discord Wi-Fi-cut reproduction. This maintainer pass did not repeat that bot send; it validated the exact runtime error graph, persisted queue transition, and eventual replay path on Testbox.
Co-authored-by: 0668000539 [email protected]