Repository navigation
tests: replace recorded market data with invented data (two parts) - #382
Merged
Merged
Conversation
… affordability, percent equity affordability, range-end close) Six test files (three pairs, each with its native-route twin) now pin the same engine rules on invented prices and timestamps; every assertion is kept (test and check counts unchanged) with its expected value recomputed from the new numbers, the derivation sitting beside it. Provenance wording that pointed at recorded tapes is neutral. No registration, test name or row changes. * tests/test_market_entry_affordability.cpp, tests/test_market_entry_affordability_l4b.cpp * tests/test_percent_equity_affordability.cpp, tests/test_percent_equity_affordability_l4b.cpp * tests/test_range_end_close.cpp, tests/test_range_end_close_l4d.cpp Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…mes ring, DMI parity, zero-lot entry decline, retained trail path, stop tick rounding) Seven test files (four tests, three of them with a native-route twin) now pin the same engine rules on invented prices, highs and timestamps; every assertion is kept with its expected value recomputed from the new numbers, the derivation sitting beside it. Provenance wording that pointed at recorded tapes is neutral. No registration, test name or row changes. * tests/test_ta_extremes_ring.cpp * tests/test_dmi_parity.cpp * tests/test_zero_lot_entry_decline.cpp * tests/test_pooc_retained_trail_path.cpp, tests/test_pooc_retained_trail_path_l4c.cpp * tests/test_stop_tick_rounding.cpp, tests/test_stop_tick_rounding_l4d.cpp Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… on the rounded close, level grid snap, trail armed at the open) Six test files (three pairs, each with its native-route twin) now pin the same engine rules on invented prices and timestamps; every assertion is kept with its expected value recomputed from the new numbers, the derivation sitting beside it. Provenance wording that pointed at recorded tapes is neutral, and two internal test function names that carried a ticker are renamed (the file names and registrations are unchanged). No row changes. * tests/test_sizing_basis_mintick.cpp, tests/test_sizing_basis_mintick_l4b.cpp * tests/test_level_grid_snap.cpp, tests/test_level_grid_snap_l4d.cpp * tests/test_trail_open_arm_subtick_offset.cpp, tests/test_trail_open_arm_subtick_offset_l4c.cpp Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ity feed, frozen flat gap reject, pre-armed bracket fill bar, sparse ATR previous close) Eight test files (four tests, each with its native-route twin) no longer carry recorded prices, dates, tickers or capture references. The native security feed test now builds its bars from invented values with every expected value recomputed beside the derivation; the other three keep their constructed bars and assertions and lose only the dated provenance wording (the pre-armed bracket test also takes an invented long gap open). Test names, registrations, assertion counts and rows are unchanged. * tests/test_native_security_feed.cpp, tests/test_native_security_feed_l4d.cpp * tests/test_frozen_flat_gap_reject.cpp, tests/test_frozen_flat_gap_reject_l4d.cpp * tests/test_prearmed_bracket_fill_bar.cpp, tests/test_prearmed_bracket_fill_bar_l4c.cpp * tests/test_sparse_atr_prev_close.cpp, tests/test_sparse_atr_prev_close_l4d.cpp Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…tests, with a tool that does it check_twin_parity.py compares each switched-route twin with the literals recorded for its base test in tests/twin_parity_base.json. Twelve base tests were rewritten on synthetic data together with their twins, so the old recorded literals no longer match either file (the release gate stage source-guard-twin-parity failed on the first of them, test_level_grid_snap). scripts/refresh_twin_parity_base.py re-records the named tests from the files now in tests/ (assertions, line numbers, source digest), leaves every other row alone and re-pins BASE_MANIFEST_SHA256 to the new bytes. The matching rules, the inventory, the ledger and the other two pins are untouched, so the twins are still held to every assertion of their base test, now of the rewritten one. * scripts/refresh_twin_parity_base.py (new) * tests/twin_parity_base.json: the rows of test_level_grid_snap, test_market_entry_affordability, test_percent_equity_affordability, test_pooc_retained_trail_path, test_range_end_close, test_sizing_basis_mintick, test_stop_tick_rounding, test_trail_open_arm_subtick_offset, test_native_security_feed, test_frozen_flat_gap_reject, test_prearmed_bracket_fill_bar, test_sparse_atr_prev_close * scripts/check_twin_parity.py: BASE_MANIFEST_SHA256 only Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…at was not rewritten scripts/refresh_twin_parity_base.py now needs `--since <commit>` and refuses a name that is not a row of the manifest, whose tests/<name>.cpp is gone, or whose file is byte-identical to the same file at that commit, so it can only re-record the rows of tests that were really rewritten and can never replace the recorded literals of an untouched base test. The 12 rows and the pin recorded by the previous commit come out byte-identical when it is run again with the same 12 names. * scripts/refresh_twin_parity_base.py Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…he in-bar stop on both routes The release proof of the combined replacement failed one test, test_pooc_retained_trail_path_l4c, at the restart case (exit bar 3 at 300.78 instead of bar 7 at 301.18), while its base test passed. The invented bar 3 had its low exactly one trail offset under its high (300.80 = 301.80 - 1.00), so on the native route the in-bar stop 300.80 was touched and the trade exited at once, where the source route kept the pre-bar stop 300.70. Bar 3 now has low 300.85 in that one case, so both routes see a bar that clears both stops; the expected trade (bar 7 at 301.18) and every assertion are unchanged. The same change is made in the base test and its twin so the twins stay identical, and the one source digest in the twin base manifest is re-recorded with the tool, with its pin. * tests/test_pooc_retained_trail_path.cpp, tests/test_pooc_retained_trail_path_l4c.cpp * tests/twin_parity_base.json (the sourceSha256 of test_pooc_retained_trail_path only) * scripts/check_twin_parity.py (BASE_MANIFEST_SHA256 only) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…anged A read of the tool found three holes. It skipped its "file is unchanged" check whenever git could not show the file (a typo in --since re-recorded every named test); it did not check that the manifest on disk matched the pin before writing, so a hand edit of another row would have been folded into the new pin; and it printed nothing about what changed. Now a bad reference or a missing file refuses, the manifest must hash to the BASE_MANIFEST_SHA256 pin before anything is written, and for every name it prints the number of assertions kept, dropped and added and whether the old row differed from the --since file. The matching rules, inventory, ledger and the pins other than the one it re-pins are untouched. * scripts/refresh_twin_parity_base.py Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ames; two literals are invented A read of the final diff found names that still pointed at the recorded data: test function names (test_f_*, the Ford and masayanfx case names, test_helper_census_values), the famT-* tags on level-grid checks, the 3commas wording in the zero-lot test, kTapeTicks, the "sensor tapes" test name, and the header sentence of the trail-open test that said legacy function names stay fixed although two ticker names had been renamed. They are renamed or reworded in the base tests and their native-route twins alike (twin bodies stay identical); no registration, file name or assertion changes. Two isolated literals in the level grid test (a half-tick level 14.035 and the product 1404 * 0.01 = 14.040000000000001, kept apart from 14.04) are replaced by invented ones with the same property: 20.085 stays untouched by the grid, and 2008 * 0.01 = 20.080000000000002 differs from the literal 20.08, which the check still demands the grid to return. * tests/test_dmi_parity.cpp * tests/test_level_grid_snap.cpp, tests/test_level_grid_snap_l4d.cpp * tests/test_market_entry_affordability.cpp, tests/test_market_entry_affordability_l4b.cpp * tests/test_percent_equity_affordability.cpp, tests/test_percent_equity_affordability_l4b.cpp * tests/test_prearmed_bracket_fill_bar.cpp, tests/test_prearmed_bracket_fill_bar_l4c.cpp * tests/test_sizing_basis_mintick.cpp, tests/test_sizing_basis_mintick_l4b.cpp * tests/test_trail_open_arm_subtick_offset.cpp, tests/test_trail_open_arm_subtick_offset_l4c.cpp * tests/test_zero_lot_entry_decline.cpp * tests/twin_parity_base.json (the rows of the six tests with a manifest row, re-recorded with the tool: two level-grid literals changed, nothing else) * scripts/check_twin_parity.py (BASE_MANIFEST_SHA256 only) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…sion tests carry invented futures and forex bars (US-SCOPE-1300, group A) Seven files (test_stop_entry_admission and its native twin, test_level_grid_snap and its twin, test_short_seed_close_collision, its twin and the legacy-route oracle copy) embedded recorded bars, fills and a captured price of futures and forex symbols, with their dates and capture pointers. Each is rewritten with invented, hand-designed bars that keep the rule it pins: placement admission at the rounded close and touch-versus-gap fill costing (20/30/200-unit paths), quarter-tick and five-decimal exact-touch levels with the binary residues that decide the band test (8192.75 + 1e-6 leaves 1.0000003385e-6, outside the 1e-6 price band; 0.80005 + 1e-12 leaves 9.9998e-13, inside 1e-12), and the 900/400 admission derivation of the collision tests. Every recomputed expected value has its derivation in a comment. Assertion call-site counts, test names and tolerances are unchanged (admission 221/222, grid 53/54, collision files 106 each); the twins carry the same numbers and comments as their base. The crypto data in test_stop_entry_admission stays. No symbol, dated capture reference or old price remains in the seven files. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… and extremes-ring tests carry invented futures and forex bars (US-SCOPE-1300, group B) Six files (test_limit_exact_touch_level_residue and its native twin, test_market_entry_affordability and its twin, test_margin_call, test_ta_extremes_ring) embedded a recorded micro-gold bar, recorded index-futures and gold paths, forex margin seeds and recorded lows. Each is rewritten with invented bars that keep the rule: a resting level within 0.01 / pricescale^2 of a grid value is stored on the grid (100.4 + (100.4 - 98.6) = 102.20000000000002 and 81.3 - (81.4 - 81.3) = 81.19999999999999 would skip the exact-touch bar 2 and fill only at bar 5 without the snap); affordability at placement and at fill with exact ties, margin scaling, MTM reversal and floored lots; the restore-quantity and fallback cases of the margin call with invented fee deficits; the sparse-extrema slots, stale aliases and NaN poison of the ring with formula-generated and designed series. Derivations of every non-trivial expected value are in comments. Assertion call-site counts (3/3/67/67/414/115 as before), test names and tolerances are unchanged; twins carry identical synthetic numbers. BTC and ETH fixtures stay. No symbol, dated capture reference, feed id or old price remains in the six files. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…carry invented bars; two tape tests that only include private data stay as they are (US-SCOPE-1300, group C) Five files (test_m_admission_36 and its native twin, test_exit_reissue_na_tapes, test_point_order_open_call, test_split_feed_partial_bucket) embedded recorded gold bars, fills, closes and RSI values, or depended on bars and trade rows in files that are already private. They are rewritten with invented bars that keep the rule (fill-price trim of a zero-commission short, unaffordable reversal dropped without closing the short; withdrawal of an omitted stop or limit at an exit reissue, four expected rows; queued-call precedence at a gapped open and partial-stop priority; finalisation of sparse tails exactly once with the Wilder RSI recurrence derived in comments). The admission twins gain four checks each; the other assertion counts, test names and tolerances are unchanged. test_ltf_lookahead_calling_open_tapes and test_pooc_pair_gross_tapes are byte-identical: they hold no recorded value, only include files that live in the private repository (they skip when those are absent). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…and forex tests (US-SCOPE-1300) tests/twin_parity_base.json re-records, with scripts/refresh_twin_parity_base.py --since HEAD, the CHECK literals of test_level_grid_snap (38 assertions: 29 literals kept, 9 rewritten), test_limit_exact_touch_level_residue (3, all kept), test_m_admission_36 (82 -> 86 assertions: four added, 67 kept, 15 rewritten), test_margin_call (414, 374 kept, 40 dropped, 38 added), test_market_entry_affordability (67; 62 kept, 5 rewritten), test_short_seed_close_collision (105, all kept) and test_stop_entry_admission (219; 85 kept, 134 rewritten); BASE_MANIFEST_SHA256 in check_twin_parity.py is re-pinned (165b67c7...). check_twin_parity.py passes: 136 tests checked, 19 families skipped because their private fixtures are absent. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…2 boundary keeps its binary overshoot; case ids and banners lose symbol tokens Fixes from the Claude read of group A. (1) test_level_grid_snap and its native twin: the invented five-decimal path moves from 0.8000x to 1.2000x. A level in [1,2) shows (b + 1e-12) - b = 1.0000889006e-12, above the nominal 1e-12 band, exactly as the original data did, so the "(FP boundary)" case again needs the engine's slack to be IN; on the old invented base the residue was 9.99978e-13 and a strictly plain "<= 1e-12" compare would also have passed. The 2e-12 case stays OUT (residue 1.99996e-12), grid(120005 / 1e5) equals the literal 1.20005, ceil_tick(1.20005 + 2e-12) = 1.20006. (2) The case ids lvl-es-lim-* / lvl-eu-lim-* become lvl-q-lim-* / lvl-d-lim-*, and "synthetic xau" leaves four banners of each test_stop_entry_admission file. The base row test_level_grid_snap is re-recorded in tests/twin_parity_base.json (38 assertions, 33 literals kept, 5 rewritten) and the pin re-set; check_twin_parity.py and check_doc_reverts.py pass. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…abel leaves a banner (read of group C) test_point_order_open_call: the gap equity is 600.1 - 0.29997 - 3*1.02 = 596.74003, q_restore (603 - 596.74003)/201 = 0.03114 and floor-to-0.01 then 4x = 0.12; the comment said 597.04003, 0.02965 and 0.08. The conclusion (0.12 does not exceed the queued unit, no re-sizing) and the expected rows are unchanged. test_exit_reissue_na_tapes: the banner "fran-x1-exit-reissue-na-limit" (a recorded probe's name) becomes "exit-reissue-na-limit". Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r; the leading-na site A answers its own source at call 7; NQ leaves the labels (read of group B) Fixes from the Claude read of group B. (1) test_margin_call, fee-created nonzero floor: the bar-2 price 125.002 gave q_min = 1.19998 quantity steps, where floor-then-4x and 4x-then-floor both give 0.0004; at 125.003 q_min = 0.000183995392 = 1.84 steps, so floor-then-4x gives 0.0004 and the swapped order 0.0007. The expected 0.0004 and 7.9916 are unchanged. (The reader also asked about the header line "margin_long = 50 => 2x" of the leveraged-long case: its body has always used 50, so that comment edit is right.) (2) test_ta_extremes_ring, leading-na site A: the invented rising source made call 7 (540) exceed call 6's cached 520, so the ring would rescan and return the stale 420, not its own source as the pin and its comment say (the original data had a falling source there). Call 7 of site A is now 510 (not above 520), the cache shortcut answers 510 and the pin row reads 510; later calls are unaffected (420 stays the minimum). (3) The symbol label NQ leaves seven banners and one comment of test_market_entry_affordability and its native twin (function names and constants are unchanged). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rmula snaps at the 1e-12 boundary; the oracle pin follows the comment-only edit of test_oracle_short_seed.cpp Fixes for the four failures of the first release run on the part-1 head (lab job p382b-absent, 906 of 910 rows passed). (1) test_level_grid_snap and its native twin failed at the five-decimal "(FP boundary)" case (eu.grid(1.20005 + 1e-12) == 1.20005, and the sell limit exiting at bar 4 @1.20006 instead of bar 3 @1.20005). I had reasoned about the binary residue of the offset alone; the engine measures a level in points, p = level / (1 / pricescale), and snaps when |p - round(p)| <= 0.01 / pricescale, so whether 1e-12 snaps depends on the rounding of that product at the particular base. Computed with the engine's own formula (level_on_price_grid, include/pineforge/engine.hpp), base 1.2005 snaps for 1e-13 and 1e-12 (|p - k| = 9.9986e-8 <= 1e-7) and not for 2e-12 (2.0e-7), 1e-11 or 1e-9, and base 1.20005 and 0.80005 do not snap at 1e-12. Every five-decimal price of the two files moves by +0.00045 (bars, the level 1.2005, the expected entry 1.20045 and the expected outside-band exit 1.20051; 120051 / 1e5 equals the literal 1.20051); the comment states the boundary as the engine measures it. The base row of tests/twin_parity_base.json is re-recorded (38 assertions, 33 literals kept, 5 rewritten) and its pin re-set. (2) tests/oracle.sha256 pinned the bytes of tests/oracle/test_oracle_short_seed.cpp; the comment-only edit of that file in this PR changed them (test_oracle_sha256_pin, test_oracle_fixture_checks and test_private_fixture_reads_controls failed on the same drift). The entry of that file, treeSha256 (all 20 files, the three private oracles keep their pinned hashes) and treeSha256WithoutPrivate (the 17 present) are re-pinned with the pin's own digest functions; the unchanged pin reproduces under the same computation. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r the reversal's signal equity, where the engine trims instead of dropping (US-SCOPE-1300, group C) The overlay run of the part-1 head (lab job p382d-overlay, 909 of 910 rows passed) failed test_m_admission_36_l4d, section A: the two "long control" cases, which my rewrite built as a held short reversed to long in one command pair, were not trimmed; the engine dropped the long reversal and the short rode to the end of the range (6 engine rows against 10 expected). That row is gated on the private BTC data header, so the synthetic section had only ever been built in the overlay world; the absent runs showed the placeholder SKIP. My comments had measured the shortfall against the fill-time equity only. Two overlay runs found the engine's rule for the long reversal. A flat long entry (tried first) is rejected whole when its cost exceeds the equity, the same family as the C4 control, so it shows no trim at all. A reversal whose cost 3.20 x 100.16 = 320.512 exceeds the signal equity 320.5 it was sized from is dropped (control 2 of the second run), while a reversal whose cost stays below the signal equity and exceeds the fill equity by less than one lot of its price is trimmed by one unit at the fill price, PnL 0 (control 1 of the second run: 2.88 x 90.21 = 259.8048 below 260, above the fill equity 259.79). The expectations remain the formulas in the test comments; the inputs were chosen from this rule, not read off an engine output. Control 1 (unchanged from the second run): capital 250, short 1 from 100, signal close 90 (2.88 units), fill 90.21, exit 92, survivor 1.88, PnL 3.3652. Control 2 moves to the trim side of the same rule: capital 300.5, short 1 from 120, signal close 100 (3.20 units; the 0.5 keeps the lot division off an exact multiple), fill 100.14, cost 320.448 below the signal equity 320.5 and 0.088 above the fill equity 320.36, exit 101.5, survivor 2.20, PnL 2.992. The close-then-short pair keeps its numbers and loses the unused first_long parameter. The assertions on the rows entered at the two fill bars (two rows, a 1.0 long margin-call row at the entry price with PnL 0) are unchanged. No pin moves: the test has no twin row, and check_twin_parity.py, check_oracle_sha256.py and check_doc_reverts.py pass on this tree. The inputs of control 2 (fill 100.14) were first run on the lab in the overlay world on a head that differs from this one only in the two comment sentences named below: all 910 release rows passed, so the trim the comments predict is observed, not assumed. A read-only Claude review of this commit (no permission denial, every comment's arithmetic redone, the failure of the test shown for a dropped reversal and for an unreduced quantity) accepted it with two wording fixes, applied here: the shortfall is written as q_restore = deficit / fill price with the reason "below the signal equity" stated, and "the tape's script" now reads "the strategy script". Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
luisleo526
force-pushed
the
lv/repl-all
branch
from
October 13, 2026 12:23
4396d04 to
77af71a
Compare
luisleo526
marked this pull request as ready for review
October 13, 2026 13:23
This was referenced Oct 13, 2026
luisleo526
added a commit
that referenced
this pull request
Oct 14, 2026
* docs: the 1.6.0-rc.1 changelog entry The changelog section for the first candidate of 1.6.0, tag v1.6.0-rc.1 on commit 04607c1: the selected-window contract revision 1.3 and the typed failures behind it (#388), finite trade and summary doubles in every report writer (#384, #388), the favicon of the API documentation (#355), the removed CI time limits and command-line options (#378), and the tests, CI and benchmarks changes since 1.5.0 (#375, #376, #377, #382, #383, #385, #386, #387). The entry is inserted above the 1.5.0 section; no existing line changes. The date is the UTC date of the tag. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * README: link the apex pineforge.dev, not the www host The README header link pointed at https://www.pineforge.dev. The product site lives at the apex, https://pineforge.dev; the www host is being redirected to it, and search indexes both forms today. One link changed, nothing else. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * CHANGELOG: add the selected-window mode and typed failures to the 1.5.0 notes Two things that are in the v1.5.0 tag were missing from its notes: the opt-in selected-window mode with retained pre-roll bars (#363, already in v1.5.0-rc.1) and the typed failures that docker/run_json.py raises for exceptions from the selected-window helper modules (_typed_failure). The new subsection "Additions to the 1.5.0 notes" only states what the code and the #363 text say, with the same "development-only parity candidate" limits (contract revision 1.3-parity, no claim of complete value-ownership coverage, cannot be promoted to stable). It adds lines and changes none. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace recorded market data with invented data in two parts: 15 tests (and the native-route twins of 12 of them) in the first part, and 18 more test files in the second, which carried bars, fills and captured prices of US futures, forex and spot metals (recorded data of those classes is not kept in this repository).
Each test keeps its intent, its name, its registration and every assertion it pinned. Prices, timestamps and sizes are invented to hit the same edge cases (a rounding midpoint, a tie on a limit, a stop touched on the open, a sub-lot equity boundary, and so on); each expected value is recomputed from the new numbers by a formula, never read off an engine run, and the derivation sits beside it. Provenance wording that pointed at recorded data is neutral. A few test-function names and comment tags that carried a data origin are renamed.
First part (earlier commits):
test_dmi_parity,test_frozen_flat_gap_reject,test_level_grid_snap,test_market_entry_affordability,test_native_security_feed,test_percent_equity_affordability,test_pooc_retained_trail_path,test_prearmed_bracket_fill_bar,test_range_end_close,test_sizing_basis_mintick,test_sparse_atr_prev_close,test_stop_tick_rounding,test_ta_extremes_ring,test_trail_open_arm_subtick_offset,test_zero_lot_entry_decline.Second part (US-SCOPE-1300, in three groups):
test_stop_entry_admission,test_level_grid_snap,test_short_seed_close_collisionandoracle/test_oracle_short_seed, with their native-route twins;test_limit_exact_touch_level_residue,test_market_entry_affordability,test_margin_call,test_ta_extremes_ring, with their twins;test_m_admission_36(its synthetic section),test_exit_reissue_na_tapes,test_point_order_open_call,test_split_feed_partial_bucket, with their twins.Two tape tests that only include private data stay byte-identical. Files that cannot be rewritten without inventing a new independent oracle (ulp residues of tick products, ten-digit money boundaries) are not in this PR: they move to the private fixtures in the next one.
Twin-parity guard and pins
scripts/check_twin_parity.pycompares every_l4*twin with the CHECK literals recorded for its base test intests/twin_parity_base.json(file pinned byBASE_MANIFEST_SHA256). Because the base tests were rewritten together with their twins, their rows are re-recorded from the files now intests/with the maintainer toolscripts/refresh_twin_parity_base.py(12 rows in the first part, 7 more in the second) and the pin is updated. The matching rules, the inventory, the ledger and the other pins are untouched. A twin that drifts from its base still fails the guard.tests/oracle.sha256pins the bytes oftests/oracle/test_oracle_short_seed.cpp; the second part edits that file, so its entry and the two tree hashes are re-recorded with the file's own tool (scripts/check_oracle_sha256.pyverifies it; no other entry moves).What the second part found while being proved
p = level / (1 / pricescale), snap when|p - round(p)| <= 0.01 / pricescale), so whether an offset of 1e-12 snaps depends on the base price; the invented base is chosen with that formula (base 1.2005 snaps at 1e-13 and 1e-12, not at 2e-12).Verification
exp-en382-20261013on the final tree (engine 77af71a paired with codegen main 94aed942): 134 of 134 cases measured, 0 unmeasured, 7,989 observations, parity posted (coverage lost 0, band +0/-0, hard regressions 0, leavers 0).test_m_admission_36_l4d, see above); both failures were in the invented data of that test, not in the engine.check_twin_parity.py,check_oracle_sha256.py,check_doc_reverts.py(base 1b08c61),check_doc_lint.py: all pass.Row counts and floors do not move in this PR.
🤖 Generated with Claude Code