Skip to content

Stop verification at the first unanswered request - #40

Merged
glopesdev merged 1 commit into
harp-tech:mainfrom
glopesdev:port-disconnect-reporting
Sep 13, 2026
Merged

glopesdev merged 1 commit into
harp-tech:mainfrom
glopesdev:port-disconnect-reporting

Conversation

@glopesdev

Copy link
Copy Markdown
Contributor

A request left unanswered for 2000 ms now ends the run. Continuing is unsafe since the protocol carries no request identifier, so replies are correlated by address and message type alone, and a reply arriving after its deadline stays in the stream where it can satisfy a later check with a stale frame and a stale timestamp.

The rule lives in Runner.RunAllAsync, the single point every result from every suite passes through. A timeout can otherwise arrive three ways: thrown out of a check, caught by a check's own handler and returned as an ErrorResult, or returned directly by a helper such as RegisterHelpers.AssertReadableAsync where no exception ever escapes. Placing the rule at the choke point covers all three and keeps test authors from having to know the concern exists.

The identity and protocol version reads at startup no longer swallow a timeout either. An error reply is still information, so a device that answers R_VERSION with an error is still held to v1.

Verified on hardware

Found by banchan86 reviewing #38, where unplugging a device mid-run produced 93 timeout results in a report that otherwise looked complete. Reproduced here by unplugging a Behavior device mid-run, twice, with the same command.

build timeout entries in the report stopped at
runner-level rule only 2 check 18 of 28
result-level rule, this change 0 check 16 of 28

The first row is what found the remaining hole. Two checks had caught the timeout themselves and recorded it as an error before a third finally aborted, which is why the rule inspects results rather than exceptions. The final run records 14 passed and 1 skipped, with nothing failed and nothing errored, so every check in the report ran against a device that was still answering.

Documentation

The article no longer says silence produces an error result, since silence now ends the run, and states what an unanswered request does and that the report is still written. The exit code section covers a run that cannot continue.

A request left unanswered for 2000 ms now ends the run instead of being
reported as one errored check, since a late reply can be matched to a
later check by address and message type. The rule lives in the runner,
which promotes any result carrying a TimeoutException into an abort, so
a check that catches the timeout itself and returns an error result
cannot absorb it either. The console names where the run stopped, the
exit code stays 1, and a report requested with --report is still
written and states that the verification is incomplete.

The identity and protocol version reads at startup no longer swallow a
timeout either. An error reply is still treated as information, so a
device that answers R_VERSION with an error is still held to v1.
@glopesdev glopesdev added the feature New planned feature label Sep 13, 2026
@glopesdev
glopesdev merged commit d929c1b into harp-tech:main Sep 13, 2026
9 checks passed
@glopesdev
glopesdev deleted the port-disconnect-reporting branch September 13, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New planned feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants