Conversation
…ubstring The submit classifier matched 4xx codes by substring-checking the rendered transport error message. On Linux runners the random ephemeral port (range 32768-60999) frequently contained substrings like '404' or '429', causing legitimate ECONNREFUSED errors to be mis-classified as RpcRejected instead of ConnectionLost. macOS ephemeral range starts at 49152, so the collision never reproduced there — hence the platform-sensitive test failure tracked in #322. Switch to structured matching on TransportErrorKind::HttpError and read http.status as u16 directly. 4xx still surfaces as RpcRejected (deterministic, caller should not rebuild submitter); 5xx and any other transport error fall through to ConnectionLost so the caller reconnects on the next tick. Closes #322.
2 tasks
obchain
added a commit
that referenced
this pull request
Apr 26, 2026
* ci: restore fmt + clippy gates and switch rust job back to Linux Followup to #319 (clippy unblocked), #320 (workspace fmt), #322 (submit classifier Linux-safe). - Add cargo fmt --all -- --check as the first rust-job step. - Add cargo clippy --workspace --all-targets --locked -- -D warnings before tests, so lint regressions block merge instead of leaking in. - Switch rust job from macos-latest back to ubuntu-latest. The platform-sensitive ECONNREFUSED classifier was fixed by #334 (substring match -> structured TransportErrorKind::HttpError.status check), so the macOS pin is no longer needed. Linux runners are faster and cheaper. Reviewer (blockchain-code-reviewer) confirmed step ordering, cache locality, action syntax, and permissions are clean. * ci: cargo fmt --all on token_meta.rs (introduced post #335)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TransportErrorKind::HttpError(http).statuscheck.Test plan
cargo test -p charon-executor submit::— 11 passed locally on macOS.Closes #322.