Skip to content

tests: make the paper-trading compatibility suite compile again (ibx#397) - #398

Open
userFRM wants to merge 1 commit into
deepentropy:mainfrom
userFRM:fix/paper-compat-does-not-compile
Open

tests: make the paper-trading compatibility suite compile again (ibx#397)#398
userFRM wants to merge 1 commit into
deepentropy:mainfrom
userFRM:fix/paper-compat-does-not-compile

Conversation

@userFRM

@userFRM userFRM commented Jul 31, 2026

Copy link
Copy Markdown

Problem

tests/ib_paper_compat does not build. Thirteen call sites construct request and command variants that have since gained fields, so the whole target fails to compile and every phase in it is dead — fourteen entry points driving a hundred and fifty-four phases against a paper account.

Nothing reported it. The suite only runs with live credentials, so ordinary development never builds it, and cargo check without a target name does not reach it.

It had also quietly become the baseline: work in this repo compares the suite's error set before and after a change to show nothing broke. Thirteen errors is the number being matched, which makes a broken target look like a fixed point.

What this changes

Each site gets the value it would have had before those fields existed — default contract-details filters, no initial trailing-stop trigger, no adjustable trailing amount or unit. No phase behaviour changes.

The target now compiles clean and enumerates its fourteen tests.

Why it matters

This is the only end-to-end coverage against a real gateway. Every wire-level claim in this repo currently rests on unit tests and reasoning, with nothing exercising a full session — which is the coverage that catches a tag emitted in the wrong position, an order the gateway rejects, or a reply the parser mishandles.

Run against a paper account

With it building, the suite runs. All seven phases pass:

cancel_by_perm_id_phase_live         PASS   (ibx#191 PR B)
cross_session_recovery_phase_live    PASS   (ibx#191 PR A)
reclaim_and_symbol_search_phase_live PASS   (ibx#233 / ibx#228)
rtt_ping_phase_live                  PASS   (ibx#158)   RTT 3.78 ms
snap_to_tick_phase_live              PASS   (ibx#216)
submit_ex_bracket_child_phase_live   PASS   (ibx#224 / ibx#215)
timeout_sweeps_phase_live            PASS   (ibx#231 / ibx#227)

test result: ok. 7 passed; 0 failed; finished in 195.65s

So the phases still describe the server's behaviour correctly — the suite had gone stale in its call sites, not in what it asserts.

Keeping it built

cargo check --tests reaches every target by name and would have caught each of these on the day the field was added. #300 adds a CI workflow; this belongs in it.

Closes #397.

`tests/ib_paper_compat` has not built. Thirteen call sites construct request and command variants that have since gained fields, so the whole target fails to compile and every phase in it is dead code — fourteen entry points driving a hundred and fifty-four phases against a paper account.

Nothing reported it because the suite only runs against live credentials, so ordinary development never builds it, and `cargo check` without a target name does not reach it either.

The fields each site is missing were added with defaults in mind: contract-details filters, the optional initial trailing-stop trigger, and the adjustable stop's trailing amount and unit. Each site now passes the value it would have had before those fields existed, which is what the phases were written against.

No phase behaviour changes. This is the difference between a suite that cannot be run and one that can.

Closes deepentropy#397.
userFRM added a commit to userFRM/ibx that referenced this pull request Aug 3, 2026
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.

tests: the paper-trading compatibility suite does not compile, so all 154 phases are dead

1 participant