Skip to content

Commit c4b0bd0

Browse files
luisleo526claude
andcommitted
tests: correct the ownership probe notes after the independent read (CR-139)
Notes and one citation only; no expectation value changes. The row-7 notes cite the main-line commit 868aa65 beside f2a455b, point the refusal at the slipped-signal lines 7391-7421 for the configuration the probe uses, and say that min_trades 0 is a floor so the drop is witnessed natively, not by the probe. The six unconstructible notes no longer say the boundary row is red on main (the host admits the declaration before copying it). The margin_maintenance_overflow notes state the real extent of the 1x-long gap (the replacement margin call returns early on any of: no lot grid, point value other than 1, commission, slippage, an FX schedule, risk rules) and the measured scratch results. The settlement_pnl_overflow notes give the code argument for the staged path; the earlier commit message states that path as a fact, but it is the design: the driver cannot tell the staged path from the fused one. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 2f7c1a3 commit c4b0bd0

10 files changed

Lines changed: 14 additions & 14 deletions

File tree

  • tests/ownership/probes

‎tests/ownership/probes/decl/s_default_qty_value_neg_inf_unconstructible/NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The paired native row is `decl_default_qty_value_neg_inf` in
1414
`tests/test_value_admission_decl.cpp`. It supplies -Infinity directly to
1515
`PineStrategyHost::configure_pine_strategy` and pins
1616
`strategy_value_invalid {field: "strategy.default_qty_value", reason: "nonfinite"}`
17-
from D3. That boundary row is red on main because configure copies unchecked.
17+
from D3. The host admits the declaration before copying it (`src/source/pine_strategy_host.cpp:854-856`).
1818
`math.pow(10, 400)` is not an alternative infinity construction here: the
1919
strategy-argument literal extractor returns None and emission omits it.
2020
See `.lane-out/MAP.md` section 1 for every numeric declaration member.

‎tests/ownership/probes/decl/s_default_qty_value_pos_inf_unconstructible/NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The paired native row is `decl_default_qty_value_pos_inf` in
1414
`tests/test_value_admission_decl.cpp`. It supplies +Infinity directly to
1515
`PineStrategyHost::configure_pine_strategy` and pins
1616
`strategy_value_invalid {field: "strategy.default_qty_value", reason: "nonfinite"}`
17-
from D3. That boundary row is red on main because configure copies unchecked.
17+
from D3. The host admits the declaration before copying it (`src/source/pine_strategy_host.cpp:854-856`).
1818
`math.pow(10, 400)` is not an alternative infinity construction here: the
1919
strategy-argument literal extractor returns None and emission omits it.
2020
See `.lane-out/MAP.md` section 1 for every numeric declaration member.

‎tests/ownership/probes/decl/s_margin_long_neg_inf_unconstructible/NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The paired native row is `decl_margin_long_neg_inf` in
1414
`tests/test_value_admission_decl.cpp`. It supplies -Infinity directly to
1515
`PineStrategyHost::configure_pine_strategy` and pins
1616
`strategy_value_invalid {field: "strategy.margin_long", reason: "nonfinite"}`
17-
from D3. That boundary row is red on main because configure copies unchecked.
17+
from D3. The host admits the declaration before copying it (`src/source/pine_strategy_host.cpp:854-856`).
1818
`math.pow(10, 400)` is not an alternative infinity construction here: the
1919
strategy-argument literal extractor returns None and emission omits it.
2020
See `.lane-out/MAP.md` section 1 for every numeric declaration member.

‎tests/ownership/probes/decl/s_margin_long_pos_inf_unconstructible/NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The paired native row is `decl_margin_long_pos_inf` in
1414
`tests/test_value_admission_decl.cpp`. It supplies +Infinity directly to
1515
`PineStrategyHost::configure_pine_strategy` and pins
1616
`strategy_value_invalid {field: "strategy.margin_long", reason: "nonfinite"}`
17-
from D3. That boundary row is red on main because configure copies unchecked.
17+
from D3. The host admits the declaration before copying it (`src/source/pine_strategy_host.cpp:854-856`).
1818
`math.pow(10, 400)` is not an alternative infinity construction here: the
1919
strategy-argument literal extractor returns None and emission omits it.
2020
See `.lane-out/MAP.md` section 1 for every numeric declaration member.

‎tests/ownership/probes/decl/s_margin_short_neg_inf_unconstructible/NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The paired native row is `decl_margin_short_neg_inf` in
1414
`tests/test_value_admission_decl.cpp`. It supplies -Infinity directly to
1515
`PineStrategyHost::configure_pine_strategy` and pins
1616
`strategy_value_invalid {field: "strategy.margin_short", reason: "nonfinite"}`
17-
from D3. That boundary row is red on main because configure copies unchecked.
17+
from D3. The host admits the declaration before copying it (`src/source/pine_strategy_host.cpp:854-856`).
1818
`math.pow(10, 400)` is not an alternative infinity construction here: the
1919
strategy-argument literal extractor returns None and emission omits it.
2020
See `.lane-out/MAP.md` section 1 for every numeric declaration member.

‎tests/ownership/probes/decl/s_margin_short_pos_inf_unconstructible/NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The paired native row is `decl_margin_short_pos_inf` in
1414
`tests/test_value_admission_decl.cpp`. It supplies +Infinity directly to
1515
`PineStrategyHost::configure_pine_strategy` and pins
1616
`strategy_value_invalid {field: "strategy.margin_short", reason: "nonfinite"}`
17-
from D3. That boundary row is red on main because configure copies unchecked.
17+
from D3. The host admits the declaration before copying it (`src/source/pine_strategy_host.cpp:854-856`).
1818
`math.pow(10, 400)` is not an alternative infinity construction here: the
1919
strategy-argument literal extractor returns None and emission omits it.
2020
See `.lane-out/MAP.md` section 1 for every numeric declaration member.

‎tests/ownership/probes/engine/margin_maintenance_overflow/NOTES.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ The entry quantity was 1e-10; the run completed with no trade and no position, s
66

77
Feed: 40 synthetic one-minute bars, starting at 1736121600000 ms, volume 1. Each OHLC is the same deterministic price in its row. No market data, private fixture, generated C++, or output-derived expectation is used. Run through the P0 ordinary-source driver with input/script timeframe 1; no quantity, tick, FX, commission or margin overrides.
88

9-
The expectation is the contract row (revision 3: a value derived by the engine from its own margin state that is nonfinite is `engine_command_value_invalid`), not an observation. The box run with qty 1 produced that result with 0 trades and exit 1.
9+
The expectation is the contract row (revision 3: a value derived by the engine from its own margin state that is nonfinite is `engine_command_value_invalid`), not an observation. On a spot box (run b10, this probe's committed form) the driver reported this exact result, 0 trades and exit 1.
1010

1111
The native boundary control names the requested source-free test TU. Its relevant native producer/control is an arithmetic counterpart; source-specific cash/equity/placement checks are in the proposed source companion. No source probe claims coverage of the internal pending-deduction corruption used for D6 row 6.
1212

13-
Known edge, not covered here: a 1x long (`margin_long=100`) with a point value other than 1 and no lot grid is never maintenance-checked by the adapter (`src/source/pine_adapter.cpp:18548-18559`, `:22630`), so this row is witnessed on the checked route (margin other than 100, or a short).
13+
Not covered here, and an open question for the contract owner: a 1x long (`margin_long=100`, the default) takes no kernel maintenance check at bar open (`src/source/pine_adapter.cpp:22524-22525`, `:22632`). The only replacement call (`:18548-18559`) returns early when ANY of these holds: no lot grid, point value other than 1, commission other than 0, slippage other than 0, an FX schedule, or risk rules; and a nonfinite value there becomes "no call" with no typed fault (`:17594`, `:17602-17607`). So this row is witnessed only on the checked route (margin other than 100, or a short). Measured on a box with scratch probes (not part of this tree): a 1x long with point value 1e300 and a finite total (0.5 units, price 2.5e8) completes normally; a 1x long whose total overflows (2 units, price 2.5e8, capital 1e301) fails at the end of the run with `engine_invariant` ("non-finite open-position report row"), not with a typed `margin.maintenance` fault.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# margin_required_explicit_overflow
22

3-
Pinned from D6 row 7 explicit placement requirement: finite explicit overflow KEEP per L6 10-14 ruling (`f2a455b14`).
3+
Pinned from D6 row 7 explicit placement requirement: finite explicit overflow KEEP per L6 10-14 ruling (`f2a455b14` on the EN-132 branch; on main it is carried by the squash commit `868aa65f1`, #388, whose message records "the pinned signal-time rejection wins; G1's throw is narrowed; row-7 is re-scoped"). The ruling is recorded in that commit message and in the native test comment; `tests/ownership/manifest.v1.json` `kept_branches` does not list row 7.
44

5-
The explicit quantity and mark are finite; the left-associated units * mark multiplication overflows in the source placement requirement. The ruling preserves signal-time refusal with cancellation and callback continuation for finite explicit overflow. G (`engine_command_value_invalid`) remains for nonfinite placement inputs/equity and for declaration-derived requirements. The probe pins that the run COMPLETES with 0 trades and the pending order is dropped.
5+
The explicit quantity and mark are finite; the left-associated units * mark multiplication overflows in the source placement requirement. The ruling preserves signal-time refusal with cancellation and callback continuation for finite explicit overflow. G (`engine_command_value_invalid`) remains for nonfinite placement inputs/equity and for declaration-derived requirements. The probe pins that the run COMPLETES (`outcome` completed, no code): `min_trades` 0 is only a floor, so the probe alone does not prove the order was dropped. The drop and the callback continuation are witnessed natively, at `tests/test_value_invalid_sizing_margin_source.cpp:247,254-255`; the box runs (b4, b5, b10) observed 0 trades and a constant equity, which agrees.
66

77
Feed: 40 synthetic one-minute bars, starting at 1736121600000 ms, volume 1. Each OHLC is the same deterministic price in its row. No market data, private fixture, generated C++, or output-derived expectation is used. Run through the P0 ordinary-source driver with input/script timeframe 1; no quantity, tick, FX, commission or margin overrides.
88

99
The box run b4/b5 observation (completed, 0 trades, equity constant) is consistent with the ruling. The L6 10-14 ruling (`f2a455b14`) determines this expectation; the observation only corroborates it.
1010

11-
The native boundary control is the existing `tests/test_value_invalid_sizing_margin_source.cpp`: the L6 split is pinned at lines 196-197, and `keep_finite_explicit_placement_overflow()` at lines 232-262 checks completion and callback continuation after refusing the overflowing entry. The placement boundary is `src/source/pine_adapter.cpp:7365-7378`; the signal-time refusal and applicable cancellation are at lines 7430-7445. No source probe claims coverage of the internal pending-deduction corruption used for D6 row 6.
11+
The native boundary control is the existing `tests/test_value_invalid_sizing_margin_source.cpp`: the L6 split is pinned at lines 196-197, and `keep_finite_explicit_placement_overflow()` at lines 232-262 checks completion and callback continuation after refusing the overflowing entry. The placement boundary is `src/source/pine_adapter.cpp:7365-7378`; with margin 100, an explicit fixed market entry from flat, point value 1 and fx 1, the order is in the slipped-signal scope and is refused at lines 7391-7421 (the checks at lines 7430-7445 cover the other scopes). No source probe claims coverage of the internal pending-deduction corruption used for D6 row 6.

‎tests/ownership/probes/engine/margin_required_explicit_overflow/expect.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"args": {},
55
"min_trades": 0,
66
"label": "control",
7-
"pinned_by": "D6 row 7 explicit placement requirement; finite explicit overflow KEEP per L6 10-14 ruling (f2a455b14); tests/test_value_invalid_sizing_margin_source.cpp:196-197,232-262 (keep_finite_explicit_placement_overflow)",
7+
"pinned_by": "D6 row 7 explicit placement requirement; finite explicit overflow KEEP per L6 10-14 ruling (f2a455b14, main: 868aa65f1); tests/test_value_invalid_sizing_margin_source.cpp:196-197,232-262 (keep_finite_explicit_placement_overflow)",
88
"native_boundary_control": "tests/test_value_invalid_sizing_margin_source.cpp"
99
}

‎tests/ownership/probes/engine/settlement_pnl_overflow/NOTES.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ D6 row 21, AFTER-g134 follow-up expectation. The expectation is unchanged; the p
44

55
First form: four units entered at 1 and closed at bar 4's finite 1e308 print with the default percent commission. The fee quote `abs(price) * quantity * pointvalue * fx * (commission / 100)` overflows to infinity and times zero is NaN, so the run failed earlier with `engine_command_value_invalid` (`fee.commission`, `numeric_overflow`, stage `fee`) and the settlement money predicate was never witnessed. With a percent commission of 0 and positive prices a single trade cannot get a nonfinite PnL without that fee quote going NaN first (the fee chain is bounded by the same product), so the fee had to become price-free.
66

7-
Now: `cash_per_contract` with value 0 makes every fee quote `0 * quantity`, which cannot overflow. Two long lots of 2 at 1 (`pyramiding=2`, entries on bars 0 and 1) are closed together at bar 4's finite 1e308 print. Two lots take the staged settlement, where `prepare_native_settlement_commit` (`src/engine_execution.cpp:1247-1281`) rejects the row whose PnL is `fl(fl(1e308 - 1) * 2)` = +inf with `InvalidAccounting` (`:1271-1272`), reported as `engine_invariant` (KEEP, D6 row 21). The expectation is the ruled row, not an observation; the box run produced `failed / engine_invariant / {}` with 0 trades. The driver cannot tell the staged path from the fused one-lot path, so the staged path is the design (two lots), not a measured fact.
7+
Now: `cash_per_contract` with value 0 makes every fee quote `0 * quantity`, which cannot overflow. Two long lots of 2 at 1 (`pyramiding=2`, entries on bars 0 and 1) are closed together at bar 4's finite 1e308 print. Two lots take the staged settlement, where `prepare_native_settlement_commit` (`src/engine_execution.cpp:1247-1281`) rejects the row whose PnL is `fl(fl(1e308 - 1) * 2)` = +inf with `InvalidAccounting` (`:1271-1272`), reported as `engine_invariant` (KEEP, D6 row 21). More than one lot cannot take the fused one-lot path (`src/engine_execution.cpp:388`), and the preview stages too (`:1316-1319`). The expectation is the ruled row, not an observation; the box run b10 on this committed form produced `failed / engine_invariant / {}` with 0 trades. The driver cannot tell the staged path from the fused one-lot path, so the staged path is the design (two lots), not a measured fact.
88

99
Forty flat five-minute bars, first four at 1 and the rest at 1e308, volume 1; mintick=1 keeps all price normalization finite. No risk limit is configured. Note: a nonfinite PnL always makes `pnl_pct` nonfinite too (row 22), so a single closed row cannot isolate row 21 from row 22.
1010

11-
Authoring note: the earlier "Paired row: d6_21_settlement_pnl" does not exist in `tests/test_native_settlement_row_finite.cpp`; the native control file named in `expect.json` is that file.
11+
Authoring note: the earlier "Paired row: d6_21_settlement_pnl" does not exist in `tests/test_native_settlement_row_finite.cpp`, and that file has no row with a nonfinite settlement PnL (its rows reach the `:1271` check through `pnl_pct` and the excursion fields); the native control file named in `expect.json` is that file.

0 commit comments

Comments
 (0)