Repository navigation
Conversation
A process-local driver failure does not terminate a durable swap. Resume the same payment hash while it remains pending; stop on shutdown, completion, or a missing durable record.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46afaeaf77
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for { | ||
| err := drive(s.rootCtx) |
There was a problem hiding this comment.
Requeue failed receives instead of monopolizing worker slots
When a receive driver errors while its durable summary remains pending, this loop retries without returning, so the deferred finishReceiveWorker never releases activeReceives or transfers the slot to the FIFO. If the pool is saturated—especially with MaxActiveReceiveSwaps=1—one permanently failing session can prevent every queued or overflow receive from ever being attempted; requeue the failed hash behind the existing backlog before retrying it.
AGENTS.md reference: swapclientserver/AGENTS.md:L97-L105
Useful? React with 👍 / 👎.
| s.log.Warnf("%s swap %s stopped while still pending; "+ | ||
| "retrying: %v", direction, key, err) |
There was a problem hiding this comment.
Lower the severity of recurring retry messages
During a sustained transport or mailbox outage, every pending worker reaches this branch once per second indefinitely, generating repeated Warn alerts rather than one actionable event; with the receive pool at its default size this can produce more than a hundred warnings per second, plus any pay workers. Emit recurring retry noise at Info/Debug or rate-limit it so an outage does not flood operator alerts.
AGENTS.md reference: AGENTS.md:L38-L41
Useful? React with 👍 / 👎.
An ordinary pay or receive can lose its process-local driver while the durable swap is still pending. Previously the daemon abandoned that worker after a resume or wait error until something else restarted it. Retry the same payment hash after a bounded pause while its durable record is pending. Stop on successful completion, daemon cancellation, terminal state or a missing record. A read error is logged distinctly and does not pretend the swap is terminal. This creates no work for an empty wallet.
Extracted from the shared worker portion of #1139. This changes two swap-service files only. There are no channel APIs, wallet options, generated code, server protocol changes or dependency pins. This is independent of the ordinary receive-acceptance timeout in #1639.
Local checks on main: full tagged
./swapclientserverunit package, formatting, changed lint, actor checks and commit messages passed. An additional raw pay-worker test with pending, terminal and absent records, alongside the receive disconnect regression, passed five consecutive runs. Hosted CI is separate.