Repository navigation
isotp: discard unread captured traffic without transmitting - #104
Conversation
A server that timed out mid-conversation had no way to drop the traffic it had not read: Begin and a segmented Send both reposition the receive position but transmit first. Reset repositions it to the current end of the capture and sends nothing, so a caller can resynchronise the receive address. Reset takes the receiving token, so it cannot move the position under an active Receive, segmented Send, or open Exchange, and it reports the caller's context error or the bus failure instead of waiting indefinitely. As with every cursor, it discards captured traffic only and does not flush the driver's receive queue. Amp-Thread-ID: https://ampcode.com/threads/T-01a15485-21ac-76eb-a8a3-dbbf21de0692 Co-authored-by: Amp <amp@ampcode.com>
Codex Review SummaryThis 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d93ff0c08
ℹ️ 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".
When the token, ctx.Done and bus.Done are all ready, select may take the token, so a cancelled Reset could still reposition the link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recovering a receive address after a timeout required transmitting:
Beginand a segmentedSendboth reposition the receive position, but only as a side effect of sending. A server that has already answered, or that must not answer, had no way to drop traffic it had not read.Reset(ctx)repositions the link's receive position to the current end of the capture and transmits nothing, so the nextReceiveorExchange.Nextobserves only frames that arrive afterwards. It takes the receiving token, so it waits for an in-progressReceive, a segmentedSend, or an openExchangeinstead of moving the position underneath one, and reports the caller's context error or the bus failure when that wait ends first. As with every cursor it discards captured traffic only; it does not flush the driver's receive queue.acquire'sselectcan take a free token even when the context or bus has already ended, soResetrechecks both after it holds the token and releases the token on failure.TestResetwalks one server link through the contract inside asynctestbubble:Reseton an idle link fails, 32 times over, and never moves the position.Resetdrops a captured stale payload and transmits nothing.Receivereturns only the fresh payload.Resetunder an open exchange stays blocked until the exchange closes.Resetreportsgocan.ErrBusClosed.Each of three mistakes makes the test fail: dropping the post-acquire recheck, skipping the token, and skipping the reposition.
🤖 Generated with Claude Code