Skip to content

Queue the FTDI test reply at the JTAG call. - #71

Merged
jon merged 1 commit into
mainfrom
work/ftdi-wire-test
Sep 20, 2026
Merged

jon merged 1 commit into
mainfrom
work/ftdi-wire-test

Conversation

@jon

@jon jon commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Fix the intermittent failure in TestWireMethodsShareEndpoint by queuing the fake JTAG reply after the preceding write-only SWD call returns. The test now checks that SWD completed no USB reads and that JTAG returned the expected sample. The change is confined to the test fixture; production channel behavior and its unsolicited-payload guard are unchanged.

Why

The fake releases queued replies on the next USB write. Preloading the JTAG reply let the earlier SWD write release it before JTAG had a pending response. Depending on goroutine timing, the receive path could report “received payload without a pending response” and poison the channel. Queuing the reply at the JTAG call makes the fixture match the exchange it is testing.

Documentation

No public API, ownership, or hardware behavior changes. The existing FTDI documentation remains accurate.

The endpoint-sharing test preloaded a JTAG reply which the fake released
on the preceding write-only SWD call. The receive goroutine could reject
that unsolicited payload before JTAG started, intermittently poisoning
the channel.

Queue the reply after SWD returns, check that the write-only call
completed no USB reads, and verify the JTAG sample. This corrects the
test fixture while preserving the channel's unsolicited-payload guard.
@jon

jon commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-20T20:59:52.853818Z f665826 Manual request
🔒 Security Review ✅ Completed 2026-09-20T21:00:39.741929Z f665826 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: f665826d96

ℹ️ 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".

@jon
jon merged commit 7499064 into main Sep 20, 2026
9 checks passed
@jon
jon deleted the work/ftdi-wire-test branch September 20, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant