Repository navigation
Commit 7328f4d
Docs: the migration page is a complete map, and a gate holds it complete (R5 lane L14-B, item 2)
Both audits measured docs/pages/pine-to-native.md against the tree and found
the same two defects: 43 of 96 offered `strategy.*` names had no row at all
(the whole trade-statistics namespace, strategy.margin_liquidation_price,
strategy.default_entry_qty, the oca / direction / commission constants), and
15 rows routed a reader to a roadmap lane for a feature that shipped
campaigns ago. The page is re-derived here against HEAD.
Every offered Pine name now has a row: 131 of them -- the 96 `strategy.*`, 11
`request.*` and 4 `barmerge.*` rows of the repository's own Pine v6 inventory,
`strategy()` itself, and the 19 named arguments of the declaration that the
inventory collapses into one row. 113 map to a kernel symbol; 18 are ruled
`none`, which is a decision with its reason and the place the behaviour lives
instead, not a gap. Each row carries the C++ symbol with its file:line, the C
spelling through native_c_api.h or pineforge.h, and a runnable host under
examples/native/ (or the test) that exercises it.
No row names a lane. Where a mapping is not one-to-one the row says which way
it differs and cites the ruling of record -- ADR-0001's "Kernel capabilities
the Pine adapter does not declare" and the design record's section 3.6 -- so a
reader can tell a boundary decision from an omission.
New sections the audits asked for: a coverage table with the three counts and
how to recount them; "One strategy, three ways", the same trivial strategy in
Pine, in C++ and in C, pointing at hello_kernel.cpp and hello_kernel_c.c with
the three rules that make the C door behave (size-prefixed structs, a callback
that must return 0, on_recalculate replacing on_bar); a full margin and
liquidation map; and a six-feature worked migration -- cash sizing with a fee
reserve, a bracket on a price grid, a trail in ticks, a maintenance-only
margin model, a risk limit and a higher-timeframe series -- migrated end to
end reading only this page.
One fact the page states that no page stated before, found by writing
examples/native/native_open_lots_strategy.cpp: the equity extremes and the
position-size peaks are folded at the kernel's own report point, so they stand
at zero under the default HostRecorded policy and are the host's own. The
example runs the same tape under both policies and prints the difference.
scripts/check_pine_to_native_coverage.py derives the offered set from the
inventory and the covered set from the page's own first table column, checks
that the page's printed totals are the counted ones, and runs as a
non-advisory ci_preflight stage: a name added to the inventory without a row
fails the gate. The anchor checker reports 550 anchors, 0 bad, on this page.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
(cherry picked from commit 6ce318ce83d234bfd5ff44425941719b8f3e3dca)1 parent 40f2396 commit 7328f4d
3 files changed
Lines changed: 911 additions & 242 deletions
0 commit comments