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
{{ message }}
Repository navigation
Commit 0c174d9
Browse filesBrowse the repository at this point in the historyBrowse files
Docs: the arm options, the adoption table and the grid re-lowering waiver (R5 gap lane N13, item 3)
native-engine.md: WaitForApplied's first_match and scope next to the L7b
knobs; the adapter paragraph restated for the host-sized Book child with the
per-shape {anchored, adopted, withdrawn} table and each retained shape's
measured reason; and the formal waiver of the Pine adapter's grid
re-lowering.
The waiver is lane R7's STEP 2 trial re-run after L8b on this tree (the
adapter submits raw levels, project() declares QuantizeFillsAndTriggers +
HalfUp). B1 is closed: no run aborts (R7: nine zero-offset-trail tapes and
six POOC panels; now 449/450 and 183/183). B2 still moves 30 pinned checks
in four units with no adapter-side remedy (24 + 3 + 2 + 1) and 12 more with
an adapter-side cause; the corpus differs on 5/312 probes in the engine-only
entry-incarnation column only. No class of triggers is byte-identical on its
own -- the grid is a run-wide switch -- so nothing is re-lowered and design
row PG records it as measured-infeasible for the Pine adapter.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
(cherry picked from commit d292458b2f1fefbd9f71a2679652c63dd2ed90c9)
| FP3 | Commission: percent / cash per unit / cash per execution (`fee_kind_for` pine_adapter.cpp:415-422) |**yes** — `NativeFeeKind` native_run_spec.hpp:19-23; `quote_execution_commissions` engine_execution.cpp:960-996 | K | — | F:G2 O:H8 S:F1| — |
147
147
| FP4 | Booked fill quantized to the instrument tick, nearest or directional (`nearest_tick` pine_adapter.cpp:252-255, `source_bar_fill` pine_adapter.cpp:9553-9562, `directional_tick` pine_adapter.cpp:297-301) |**no** — `price_tick` is only a slippage multiplier native_execution_consumer.cpp:3671; `bar_fill_price` engine.hpp:1198 is reachable only through `NativeCurrentPriceRule::NearestTick` native_execution_consumer.cpp:3851-3852; reference helpers are dead engine.hpp:1338, engine.hpp:1348, engine.hpp:1388 | K | L8 | O:H4 O:H6 F:G4 S:F3|**Disagree:** O kernel / F, S "stays adapter, no promotion". R5-3: own kernel lane. |
148
148
| FP5 | Trigger tested against the tick-quantized bar |**no** — the kernel tests raw prices against raw levels | K+A | L8 | O:H5 F:G4 S:F3| R5-3: the optional quantized trigger test is K; TV's exact half-tick rule (`source_trigger_threshold` pine_adapter.cpp:328-376) is A on top. |
149
+
| PG | The Pine adapter on the kernel price grid: raw levels submitted, `project()` declaring `QuantizeFillsAndTriggers` + `HalfUp`, `source_trigger_threshold` deleted (lane R7; re-tested after L8b by gap lane N13) | **measured-infeasible for the Pine adapter** — B1 (the sub-tick cursor-print abort) is closed by L8b's `ActivationGrid`: 0 aborted runs under the trial (R7: 9 zero-offset-trail tapes + 6 POOC panels; now `test_zero_offset_trail_rides_l4c` 449/450, `test_pooc_short_close_tick_l4d` 183/183). B2 (TradingView quantizes per order kind, the grid is one run-wide rule) still moves 30 pinned checks in 4 units with no adapter-side remedy: `test_coof_market_limit_recross_l4c` 24, `test_stop_tick_rounding_l4d` 3, `test_adapter_grid_relower` 2, `test_zero_offset_trail_rides_l4c` 1; 12 more checks in 3 units have an adapter-side cause (`test_trail_fill_snap_l4c` 2, `test_native_margin_hooks` 2, `test_adapter_brackets_relower` 8 book digests). Corpus: 5/312 probes differ, in the engine-only entry-incarnation column only (every probe runs a 0.01 tick on an on-grid feed, so it cannot arbitrate) | A | waived (R7, N13) | — | **Waiver.** No class of triggers is byte-identical on its own: the grid is a run-wide switch and a per-kind mask would spell TradingView's inconsistency into the kernel (not generic, R5-3). The adapter stays on `NativePriceGrid::None` and keeps `source_trigger_threshold` and its call sites; native-engine.md "The Pine adapter's grid re-lowering is waived". |
149
150
| FP6 | Account-currency FX |**partial** — scalar `account_fx` + immutable `NativeFxCurve` native_host.hpp:484 in batch; the stream refuses a non-empty curve native_execution_consumer.cpp:1251-1261, native-engine.md:415. **Closed by audit lane N6:** the declared curve is the run's immutable FX epoch and a confirmed-bar stream runs under it exactly as a batch does (stream twin in `tests/test_native_margin_fx_roll.cpp`); no realtime rate ingestion and no tick-driven input under a curve are stated as permanent limits with their reasons (native-engine.md, "Stream FX") | K | unassigned → N6 | F:D9 S:F4|**Disagree:** F out of scope ("O7 clock" native-engine.md:739-744) / S its P10, a stream-safe FX epoch. No R5 lane → §4 U4 (answered by N6: S's "same curve in batch and stream", without a new clock or callback). |
@@ -677,6 +678,7 @@ template <class Key> class OrderBook; // id
677
678
```
678
679
679
680
- A leg with owner `WaitForApplied` / `BindOpening` and a non-absolute anchor gets its level when the owner's fill arms it (`ArmedEvent` native_order.hpp:716-723 already exists) (O). Fallback with no kernel change: the toolkit materializes relative levels from the host's `on_native_applied` (F).
681
+
- Gap lane N13 (after R4d): two facts of the arm were missing and are now opt-in fields appended to `WaitForApplied`, each default byte-identical and folded only when set. `NativeArmFirstMatch { AtArmPrint, AfterArmPrint }`: whether the armed leg is a candidate at its owner's fill print or, like a request born in the owner's fill callback, only after it. `NativeArmScope { OwnerLot, Book }`: whether an armed closing leg closes the lot its owner opened or is bound at the arm to the whole position (a `BookClose`), under which it may be `HostSized`. Ruling: generic — both are broker models of a contingent child, neither names a source language — and they are what makes an anchored child the very request a host would submit from `on_native_applied`. The Pine adapter's relative `strategy.exit` legs use both; R4d's owner-lot spelling left a later same-id add open where the source leg closes the book (`rel-pyramid-set-once`, tests/test_adapter_brackets_relower.cpp).
680
682
- Not adopted (R5-2): S's kernel bracket object, its C symbols `strategy_native_bracket_*` and its TU list (`engine_orders.cpp`, `engine_execution.cpp`).
| explicit `qty=` (`rel-qty-explicit`) | `{0,0,0}` | `exit()` stages an explicit quantity per origin (`pending_bracket_legs_`) and submits it at a later flush: the fill point has no request for a child to be |
693
+
| `strategy.cancel(exit id)` in the same evaluation (`rel-cancel-exit-id`) | `{0,0,0}` | the definition is gone before the evaluation ends: no leg exists |
694
+
| `close_entries_rule = "ANY"`, stream runs | not anchored | the fill-point leg is cohort-bound (`BindCohort`), a scope the arm does not spell; a stream's fill point stages the leg |
695
+
| a parent re-issued, cancelled or declined (`rel-limit-parent` `{12,4,8}`, `rel-reissue-changed` `{18,2,16}`, `rel-breakout-pair` `{40,14,24}`, `rel-declined` `{2,0,2}`) | withdrawn | the kernel ends a waiting child with its parent (`OwnerGone`), a replaced parent included; keeping the children across a replace needs a re-parent transition in the event log, which is an epoch decision |
696
+
| a sibling with no capacity left (`rel-two-exits` `{4,2,2}`), a level below zero (`rel-negative-short` `{2,1,1}`) | withdrawn | the fill point submits nothing for that leg |
697
+
698
+
Over the 47 pending-parent scenarios R4d pinned, the split moved from
699
+
`{203, 98, 105}` to `{216, 119, 93}` (`{220, 123, 93}` with the two
700
+
same-id-add scenarios this lane added), and every formerly `{0,0,0}` shape
701
+
but the two recorded above runs on the kernel. The queued definition and its
702
+
shadow row stay: the definition outlives parents (it may be declared before
703
+
any entry exists and is re-anchored when a parent is replaced) and is what
704
+
the fallback re-runs, and the shadow row is the source projection of a child
705
+
the kernel deliberately does not list. The remaining TradingView rules stay adapter
634
706
policy because no kernel primitive expresses them: the legacy broker rides
635
707
the *tick-quantized* running best, which the adapter still spells as a
636
708
half-a-tick trailing distance (`TrailTicks{0.5}`) rather than the kernel's
0 commit comments