Skip to content

Commit 6a599fe

Browse files
luisleo526claude
andcommitted
tests: re-pin the explicit margin overflow probe to L6's row-7 ruling and fix the S notes (CR-139)
engine/margin_required_explicit_overflow pinned a failure (engine_command_value_invalid, margin.required) for a finite explicit quantity whose placement requirement overflows. L6's 10-14 ruling (f2a455b, "row-7 is re-scoped") keeps that case: the order is refused at signal time with cancellation and callback continuation, and the typed fault stays for nonfinite placement inputs, nonfinite equity and declaration-derived requirements. The engine already matches it (pine_adapter.cpp:7365-7378, and tests/test_value_invalid_sizing_margin_source.cpp:196-197 and :232-262), so the expectation becomes completed / null / {} / min_trades 0 with label control and cites the ruling and the native test, not an observation. The six *_unconstructible notes said the schema records an empty code; they now state the PF-E0036 refusal the expectation carries (README:92-93). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent aab56d0 commit 6a599fe

8 files changed

Lines changed: 42 additions & 26 deletions

File tree

  • tests/ownership/probes
    • decl
      • s_default_qty_value_neg_inf_unconstructible
      • s_default_qty_value_pos_inf_unconstructible
      • s_margin_long_neg_inf_unconstructible
      • s_margin_long_pos_inf_unconstructible
      • s_margin_short_neg_inf_unconstructible
      • s_margin_short_pos_inf_unconstructible
    • engine/margin_required_explicit_overflow

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
Runtime declaration case: **UNCONSTRUCTIBLE with the inspected codegen**.
44
This source requests -1e400 for strategy.default_qty_value. The parser rejects the
55
out-of-range numeric operand before emission (codegen parser.py:1633-1649).
6-
The schema therefore records compile_refused, an empty runtime code/args,
7-
and the existing native boundary control file. This is COMPILE COVERAGE only;
6+
The expectation is `compile_refused` with `code` `PF-E0036` (the first error
7+
diagnostic's stable code exposed by codegen, `tests/ownership/README.md:92-93`;
8+
"Numeric literal exceeds the generated C++ range.", args `{}`). Runtime coverage
9+
of the S nonfinite claim rests on the native control rows named in
10+
`native_boundary_control`. This is COMPILE COVERAGE only;
811
it is not a runtime strategy_value_invalid result or a red runtime producer row.
912

1013
The paired native row is `decl_default_qty_value_neg_inf` in

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
Runtime declaration case: **UNCONSTRUCTIBLE with the inspected codegen**.
44
This source requests 1e400 for strategy.default_qty_value. The parser rejects the
55
out-of-range numeric operand before emission (codegen parser.py:1633-1649).
6-
The schema therefore records compile_refused, an empty runtime code/args,
7-
and the existing native boundary control file. This is COMPILE COVERAGE only;
6+
The expectation is `compile_refused` with `code` `PF-E0036` (the first error
7+
diagnostic's stable code exposed by codegen, `tests/ownership/README.md:92-93`;
8+
"Numeric literal exceeds the generated C++ range.", args `{}`). Runtime coverage
9+
of the S nonfinite claim rests on the native control rows named in
10+
`native_boundary_control`. This is COMPILE COVERAGE only;
811
it is not a runtime strategy_value_invalid result or a red runtime producer row.
912

1013
The paired native row is `decl_default_qty_value_pos_inf` in

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
Runtime declaration case: **UNCONSTRUCTIBLE with the inspected codegen**.
44
This source requests -1e400 for strategy.margin_long. The parser rejects the
55
out-of-range numeric operand before emission (codegen parser.py:1633-1649).
6-
The schema therefore records compile_refused, an empty runtime code/args,
7-
and the existing native boundary control file. This is COMPILE COVERAGE only;
6+
The expectation is `compile_refused` with `code` `PF-E0036` (the first error
7+
diagnostic's stable code exposed by codegen, `tests/ownership/README.md:92-93`;
8+
"Numeric literal exceeds the generated C++ range.", args `{}`). Runtime coverage
9+
of the S nonfinite claim rests on the native control rows named in
10+
`native_boundary_control`. This is COMPILE COVERAGE only;
811
it is not a runtime strategy_value_invalid result or a red runtime producer row.
912

1013
The paired native row is `decl_margin_long_neg_inf` in

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
Runtime declaration case: **UNCONSTRUCTIBLE with the inspected codegen**.
44
This source requests 1e400 for strategy.margin_long. The parser rejects the
55
out-of-range numeric operand before emission (codegen parser.py:1633-1649).
6-
The schema therefore records compile_refused, an empty runtime code/args,
7-
and the existing native boundary control file. This is COMPILE COVERAGE only;
6+
The expectation is `compile_refused` with `code` `PF-E0036` (the first error
7+
diagnostic's stable code exposed by codegen, `tests/ownership/README.md:92-93`;
8+
"Numeric literal exceeds the generated C++ range.", args `{}`). Runtime coverage
9+
of the S nonfinite claim rests on the native control rows named in
10+
`native_boundary_control`. This is COMPILE COVERAGE only;
811
it is not a runtime strategy_value_invalid result or a red runtime producer row.
912

1013
The paired native row is `decl_margin_long_pos_inf` in

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
Runtime declaration case: **UNCONSTRUCTIBLE with the inspected codegen**.
44
This source requests -1e400 for strategy.margin_short. The parser rejects the
55
out-of-range numeric operand before emission (codegen parser.py:1633-1649).
6-
The schema therefore records compile_refused, an empty runtime code/args,
7-
and the existing native boundary control file. This is COMPILE COVERAGE only;
6+
The expectation is `compile_refused` with `code` `PF-E0036` (the first error
7+
diagnostic's stable code exposed by codegen, `tests/ownership/README.md:92-93`;
8+
"Numeric literal exceeds the generated C++ range.", args `{}`). Runtime coverage
9+
of the S nonfinite claim rests on the native control rows named in
10+
`native_boundary_control`. This is COMPILE COVERAGE only;
811
it is not a runtime strategy_value_invalid result or a red runtime producer row.
912

1013
The paired native row is `decl_margin_short_neg_inf` in

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
Runtime declaration case: **UNCONSTRUCTIBLE with the inspected codegen**.
44
This source requests 1e400 for strategy.margin_short. The parser rejects the
55
out-of-range numeric operand before emission (codegen parser.py:1633-1649).
6-
The schema therefore records compile_refused, an empty runtime code/args,
7-
and the existing native boundary control file. This is COMPILE COVERAGE only;
6+
The expectation is `compile_refused` with `code` `PF-E0036` (the first error
7+
diagnostic's stable code exposed by codegen, `tests/ownership/README.md:92-93`;
8+
"Numeric literal exceeds the generated C++ range.", args `{}`). Runtime coverage
9+
of the S nonfinite claim rests on the native control rows named in
10+
`native_boundary_control`. This is COMPILE COVERAGE only;
811
it is not a runtime strategy_value_invalid result or a red runtime producer row.
912

1013
The paired native row is `decl_margin_short_pos_inf` in
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# margin_required_explicit_overflow
22

3-
Pinned before execution: D6 row 7 explicit placement requirement.
3+
Pinned from D6 row 7 explicit placement requirement: finite explicit overflow KEEP per L6 10-14 ruling (`f2a455b14`).
44

5-
The explicit quantity and mark are finite; the left-associated units * mark multiplication overflows in the source placement requirement. This must be G rather than a silent no-order.
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.
66

7-
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. Authored only: transpilation, compilation and runtime reachability have not been checked here.
7+
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 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.
9+
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.
10+
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.
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
{
2-
"outcome": "failed",
3-
"code": "engine_command_value_invalid",
4-
"args": {
5-
"field": "margin.required",
6-
"stage": "margin",
7-
"reason": "nonfinite"
8-
},
2+
"outcome": "completed",
3+
"code": null,
4+
"args": {},
95
"min_trades": 0,
10-
"label": "G",
11-
"pinned_by": "D6 row 7 explicit placement requirement",
12-
"native_boundary_control": "tests/test_value_invalid_sizing_margin.cpp"
6+
"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)",
8+
"native_boundary_control": "tests/test_value_invalid_sizing_margin_source.cpp"
139
}

0 commit comments

Comments
 (0)