You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while preparing the #198 order test. Two linked defects, one of which is a regression we shipped.
D1 — shape_of collapses a list to its FIRST element, so field variation is invisible
scripts/robinhood_smoke.py's shape_of reduces a list to [shape_of(value[0]), "... N items"]. Every probe therefore validates one element and reports a match for the whole collection.
Measured live on trading_pairs (89 pairs):
results[0] = BILL-USD
keys: asset_code, asset_increment, is_api_tradable, max_order_size,
quote_code, quote_increment, status, symbol
BTC-USD keys: ...same... PLUS min_order_amount
DISTINCT key-sets across all 89 pairs: 2
63 pairs WITH min_order_amount <- includes BTC-USD, ETH-USD
26 pairs WITHOUT min_order_amount <- includes BILL-USD, which is results[0]
The probe has reported 5/5 and 6/6 matched while blind to a field present on 71% of pairs, including every asset keel trades.
D2 — the regression: min_order_amount is real, and #218 removed it
min_order_amountexists and is populated for BTC-USD (0.1). #218 deleted it from tests/fixtures/rh_trading_pairs.json on the strength of a probe run whose results[0] happened to be one of the 26 pairs lacking it. That instruction was mine and it was wrong.
Consequences:
The committed fixture is now missing a field the venue sends for every asset keel trades.
shape_of must summarise the whole list, not the first element. Union the keys across all elements and mark which are present on only some (e.g. min_order_amount: str (63/89)), so a partially-present field is visible rather than silently absent. A field present on some elements is a real and common API shape; the probe must model it.
Add a regression test: a two-element list where the second element carries a key the first lacks must produce a reported difference, not a match.
Why this matters beyond the one field
Every "shape matches" this probe has reported was a claim about results[0]. That is much weaker than how the results were read — including by me, in the #198 comment asserting the shapes were corroborated. The confidence needs restating once the probe actually checks what it claims to.
Related: #218 (removed the field), #198 (carries the false claim), #216 (the probe).
Found while preparing the #198 order test. Two linked defects, one of which is a regression we shipped.
D1 —
shape_ofcollapses a list to its FIRST element, so field variation is invisiblescripts/robinhood_smoke.py'sshape_ofreduces a list to[shape_of(value[0]), "... N items"]. Every probe therefore validates one element and reports a match for the whole collection.Measured live on
trading_pairs(89 pairs):The probe has reported 5/5 and 6/6 matched while blind to a field present on 71% of pairs, including every asset keel trades.
D2 — the regression:
min_order_amountis real, and #218 removed itmin_order_amountexists and is populated for BTC-USD (0.1). #218 deleted it fromtests/fixtures/rh_trading_pairs.jsonon the strength of a probe run whoseresults[0]happened to be one of the 26 pairs lacking it. That instruction was mine and it was wrong.Consequences:
min_order_amountis exactly that source.Fixes
shape_ofmust summarise the whole list, not the first element. Union the keys across all elements and mark which are present on only some (e.g.min_order_amount: str (63/89)), so a partially-present field is visible rather than silently absent. A field present on some elements is a real and common API shape; the probe must model it.min_order_amounttorh_trading_pairs.jsonand correct the README plus Prerequisites before wiring Robinhood to the live execution path #198's claim.Why this matters beyond the one field
Every "shape matches" this probe has reported was a claim about
results[0]. That is much weaker than how the results were read — including by me, in the #198 comment asserting the shapes were corroborated. The confidence needs restating once the probe actually checks what it claims to.Related: #218 (removed the field), #198 (carries the false claim), #216 (the probe).