Skip to content

tests: fix the EN-115 ownership probes so proof B reads 118/118 (CR-139) - #446

Merged
luisleo526 merged 6 commits into
mainfrom
ownership-probe-expectations
Oct 19, 2026
Merged

luisleo526 merged 6 commits into
mainfrom
ownership-probe-expectations

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

CR-139 / EN-115 proof B. On engine main the 118-probe ownership corpus read 99/118 (box b4). Probe files only: no engine source, driver, manifest or README changed (git diff on src/include/docker/scripts/driver.py empty).

  1. aab56d0: 16 expect.json files carried "code": "" since they were written (the driver rejects it: driver.py:109-113). Values set FROM THE CONTRACT, never from engine output: the 10 completed controls -> null (README:77); the 6 *_unconstructible -> "PF-E0036" with args {} (codegen path read: 1e400 literal -> parser.py:1633-1648 -> limit_error -> catalog PF-E0036; README:92-93). Table: TABLE.md in the lane.
  2. 6a599fe: margin_required_explicit_overflow re-pinned to completed/null/{}/min_trades 0 per L6's 10-14 ruling (f2a455b: row 7 re-scoped, finite explicit overflow is KEEP); S NOTES corrected.
  3. 2f7c1a3: margin_maintenance_overflow (row 10): qty 1e-10 never became a held position, so it never reached the row; now qty 1 -> fails with engine_command_value_invalid {margin.maintenance, nonfinite} as expected. settlement_pnl_overflow (row 21): the fee quote overflowed first (a listed sink), so row 21 was never witnessed; rebuilt with two lots (pyramiding=2) and a cash_per_contract fee of 0 -> fails with engine_invariant at row 21. Both expect.json UNCHANGED (the contract rows).

Proof: box b10 on exactly 2f7c1a3: 118/118 pass (runtime_covered 112, compile_coverage 6).
Open 1x-long question settled by experiment: a fully paid 1x long whose total notional overflows (pv 1e300, qty 2) FAILS CLOSED with engine_invariant ('non-finite open-position report row'); one whose total stays finite (1.25e308) completes, which is TradingView behaviour. No engine defect found.
Gate: lab remote rj-20261019t141739-79a5be (8 steps) running; independent Claude read against the contract running. After merge: kit-r15 reseal (it pins tests/ownership/driver.py + probes by hash), then proof B rerun on merged main.

🤖 Generated with Claude Code

luisleo526 and others added 6 commits October 19, 2026 20:37
…CR-139)

Sixteen expect.json files carried "code": "", which the driver rejects before
running anything (completed needs null; failed and compile_refused need a
nonempty code), so those probes never ran and proof B could not pass. The
values come from the contract, not from an observation: the ten completed
controls take null (tests/ownership/README.md:77), and the six
*_unconstructible compile refusals take PF-E0036, the stable code codegen
exposes for a numeric literal outside the generated C++ range (README:92-93),
traced from the lexer to diagnostics_catalog.json. Nothing else in any
expectation, the driver or a probe changes.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… 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]>
…he rows they pin (CR-139)

engine/margin_maintenance_overflow entered 1e-10 units, which never became a
position, so the maintenance producer (which returns while the book is flat)
was never reached and the run completed with no trade. The entry is now one
unit; on a box the run fails with engine_command_value_invalid
(margin.maintenance, nonfinite), the pinned result.

engine/settlement_pnl_overflow failed one stage early: the percent fee quote
overflows to NaN before the settlement money predicate runs. A percent
commission of 0 cannot avoid that for a single trade, so the probe now uses a
price-free cash_per_contract commission of 0 and two lots that are closed
together, which takes the staged settlement and fails with engine_invariant at
the money predicate, the pinned result.

Both expectations are unchanged (they come from the ruled rows, not from an
observation); only probe.pine and NOTES.md change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…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]>
…375795a) into the notes fix

Brings engine main (the #445 test sharding) and the merge commit made on the
pull request, and keeps the notes-only commit c4b0bd0 on top, so the branch
head is a fast-forward of the pull request head.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@luisleo526
luisleo526 marked this pull request as ready for review October 19, 2026 16:58
@luisleo526
luisleo526 merged commit 18d8f3c into main Oct 19, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant