• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wboayue / rust-ibapi / 25269136218
92%

Build:
DEFAULT BRANCH: main
Ran 03 May 2026 03:49AM UTC
Jobs 1
Files 114
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 May 2026 03:48AM UTC coverage: 88.507% (-0.1%) from 88.612%
25269136218

push

github

web-flow
feat(connection): require protobuf server version on connect (#492)

* feat(connection): require protobuf server version on connect

rust-ibapi 3.x is protobuf-only. Previously, connecting to a TWS or IB
Gateway older than server version 201 would complete the handshake and
then fail opaquely once we sent a protobuf StartApi request the gateway
could not parse.

Add `require_protobuf_support()` and call it in both sync and async
`establish_connection` between handshake and start_api. An old gateway
now fails fast with `Error::ServerVersion(201, actual, "protobuf
transport — rust-ibapi 3.x requires TWS or IB Gateway with server
version 201 or later; please upgrade")` and no further bytes hit the
wire.

* test(connection): extract common.rs tests to sibling file

Per CLAUDE.md, tests must live in their own *_tests.rs file wired in
via `#[path = "..."] mod tests;`, not in inline `#[cfg(test)] mod tests`
blocks. `connection/common.rs` was the lone holdout; sync.rs and
async.rs already follow the convention. Move every test (including the
new require_protobuf_support tests) into common_tests.rs, no logic
changes.

* refactor(connection): tighten require_protobuf_support per review

- Inject server_versions::PROTOBUF into the error message via format!
  instead of hard-coding "201", so the prose stays in sync with the
  variant tuple.
- Narrow visibility from `pub` to `pub(crate)` — only sync, async, and
  in-crate tests call it.
- Replace magic-number byte arithmetic in the new sync/async tests with
  a direct comparison against `connection_handler.format_handshake()`,
  which is what `handshake()` actually writes. Same guarantee, no
  hand-rolled frame parsing.
- Collapse the duplicate helper call in test_require_protobuf_support_
  rejects_older to a single call + match-by-reference, and derive the
  rendered-string check from PROTOBUF instead of a literal "201".

15 of 15 new or added lines in 3 files covered. (100.0%)

16911 of 19107 relevant lines covered (88.51%)

25.1 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25269136218.1 03 May 2026 03:49AM UTC 114
88.51
GitHub Action Run
Source Files on build 25269136218
  • Tree
  • List 114
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25269136218
  • a156d4f2 on github
  • Prev Build on main (#25269131536)
  • Next Build on main (#25269203718)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc