Lower generated Pine execution onto the native kernel and retire the legacy loop (R4 slice C) - #254
luisleo526 wants to merge 184 commits into
Conversation
…r the native lowering switch (R4-D L0) Freeze the authentic ab9714b engine_script_run_v16/native_order_v4/native_run_spec_v1/native_driver_v4 provider and register frozen/live same-epoch ABI pairings. Capture literal legacy-route oracle translation units, the Appendix-C PendingIntentView schema, and its coverage validator. Contract rules: §0, P3, P6, P9, P10, P11, P12, P13, P15, §§3.3-3.6, and deferred-ANY P-DA1-P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
…gin configuration provider to the native kernel (R4-D L1) Implement the fenced generic lowering prerequisites: - native v5 cohort ownership/authority, live NoTarget deferral, deterministic roster resolution, receipts, and continuation hashing; - native v2 owned lower-timeframe intrabar paths and v5 driver decision context/delivery; - native host v17 pre-open and pre-begin provider hooks plus staged ingress; - v7 native-consumer matching, validation, lifecycle, hash/ABI fences, relocation matrix, and native witnesses. Contract rules: §3.1; P7a; P8a/P8b; P11; P15; P-DA1/P-DA3; amendments A1/A3/A5/A7/A8. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
|
L1 landed: head e5f5e20 (45 files, +2,194/−519) — the generic kernel additions the switch needs, all source-free:
Verification: preflight 13/13; |
… sub-two-bar begins (R4-D L1b) Add the v2 NativeRunSpec state and validator fence, and enforce the NativeBeginArgs sub-two-bar boundary at public begin. Run the generic consumer on timestamp-derived per-bar O/H/L/C partitions without inferred aggregation, while retaining the existing empty-timeframe stream refusal. Add native spec/fixture witnesses, version-guard coverage, and the reviewed run-spec header pin. Contract rules: §0.2–§0.3; §3.1; A4; A11. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
…NativeBeginArgs (R4-D L1c) Pass the rich overload borrowed SymInfo through the native pre-begin provider, preserve null semantics on the other begin entries, and pin the additive value member in the ABI manifest/checkers. Extend the native fixture witness to verify by-value metadata projection and hash distinction. Contract rules: section 3.1; P8a/P8b; P11; A8; A12. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) WIP: add the dead-code PineExecutionAdapter, PineScheduler, PineNativeHost fixture, source-state hashing, A11/A12 provider copies, and exact native deferred-ANY oracle twin. The twin remains intentionally failing at the pre-command native timestamp admissibility boundary; no literal oracle assertion was weakened. Contract rules: §0, §2 P1/P3/P5/P7/P8/P13/P15, §3.2–§3.5; amendments A2–A8, A11, A12; deferred-ANY pin P-DA1–P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… and audit every native-only refusal (R4-D L1d) Add the hashed Canonical/LegacyTolerant slot-label policy and the explicit strict-by-default legacy batch structural tolerance. Preserve raw timestamp decision labels under the compatibility policy, retain the legacy timestamp-overflow refusal, and pin the spec/driver ABI checker and relocation-manifest rows. Add pure-native witnesses for the L0 1000/2000/3000/4000 ms shape, canonical refusal, raw decision coordinates, market fill progression, structural tolerance, and policy hash coverage. Contract rules: §0, A11, A12, A13, A4, A5. Verification: ci_verify release and native each have only test_native_oracle_deferred_any_witnesses_l2 failing: known WIP failure owned by L2, fixed when the source provider opts into the A13 policies. All L1d-owned witnesses and guards are green. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Extend the L2 fixture-only adapter, scheduler, PineNativeHost, source-state hash coverage, and exact native-route oracle twins. The deferred-ANY, magnifier, >64-fill, frozen-size, and reversal witnesses pass; the POOC immediate twin remains blocked by a native-vs-legacy execution allowance/close-size divergence recorded in the L2 report. Contract rules: §0, P1–P9, P13, P15, §3.2–§3.5; amendments A2, A4–A13; P-DA1–P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Repair fixture-host configuration retention, percentage close snapshots, immediate-close lowering, per-origin bracket lifecycle, source pyramiding accounting, terminal receipt handling, source-state hashing, and the exact deferred-birth oracle twin. POOC/immediate and deferred-birth literals are now green; remaining exact-twin repair ledger is recorded in LANDING-L2-REPORT.md. Contract rules: §0, P1–P9, P13, P15, §3.2–§3.5; amendments A2, A4–A13; P-DA1–P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Extend the fixture-only lowering with POOC ordering, deferred relative exits, source mintick retention, frozen priced reversals, and paired later-same-tick reversal semantics. Add exact native fixture twins for POOC freeze, relative exits, close-only reversals, and later-tick reversals. Contract rules: §0, P1–P9, P13, P15, §3.2–§3.5; amendments A2, A4–A13; P-DA1–P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Extend fixture-only COOF callback cadence with first-open and later Applied recalculations, retained source context, tail command deferral, and fully hashed source scheduler/adapter state. Keep the existing native fixture oracle set green while the remaining exact COOF rows are recorded as WIP evidence. Contract rules: §0, P1–P9, P13, P15, §3.2–§3.5; amendments A2, A4–A13; P-DA1–P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
…intrabar matching to the native kernel (R4-D L1e) Allow copied account-currency FX configuration to be staged before a run and after completion or cooperative abort, with staged FX and driver facts folded into continuation identity. Add IntrabarPath::SampleEligibility and generic decision-context driver statistics so hosts can select discrete distribution samples or the default continuous segments. Update the native ABI manifest and ownership guards, with native fixture coverage for FX replacement/clear/abort and distribution fill splits. Contract: §0.2, §3.1 staged configuration ingress and intrabar path; P8b; P15; amendments A5, A15, A16. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Opt source fixture magnifier paths into L1e DistributionSamples eligibility and project generic driver statistics into the legacy-compatible fixture diagnostics. The exact source magnifier oracle then exposed the remaining LegacyTolerant raw-partition intrabar grouping gap, recorded in the L2 report without altering literals. Contract rules: §0, P8b, P15, §3.2–§3.5; amendments A13, A15–A17. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Freeze default stop-entry sizing at the directionally snapped stop level and add fixture-native stop-snapshot and ShortSeed role witnesses for fixed and percent books. ShortSeed plan handles are run/incarnation-qualified, invalidated on terminal receipt, and source-hashed. Contract rules: §0, P5, P9, P13, P15, §3.2–§3.5; amendments A2, A4–A17; P-DA1–P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Reproduce staged-FX frozen admission, broker-open FX rollover liquidation, and the source scheduler refusals on the fixture-only adapter route.\n\nContract rules: §0, §3.2–§3.5, P2, P5, P6, P13, P15; amendments A13, A15, A16, A17.\n\nCo-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Restore fixture-source timeframe/day-partition/report lifecycle; add exact day-key and replacement-reversal twins; and carry COOF tail/open behavior through source lowering.\n\nContract rules: §0, §3.2–§3.5, P2, P4–P9, P13, P15; amendments A13, A15, A16, A17.\n\nCo-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Implement the source-owned frozen same-bar MARKET transaction batch, targeted-close artifact, and gross placement admission census; register the unchanged exact fixture twin. Hash all added placement and batch state. Contract rules: §0, P4, P6, P9, §3.2, §3.3, §3.5, P13, P15; amendments A13, A17. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Add exact fixture-native frozen-size coverage and source lowering for frozen lot sizing, default strategy.order, OCA sibling semantics, source stop placement/admission, and tick-projected market fills. Preserve unregistered exact STOP twins and derived fixture views for the remaining direct-owner cases; no legacy owner is reintroduced. Contract rules: §0, P2, P4, P5, P6, P9, §3.2, §3.3, §3.4, §3.5, P13, P15; deferred-ANY P-DA1–P-DA5; amendments A13, A17, A18, A19. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Refine the derived fixture pending projection so a targeted close exposes its truthful request label while preserving the source-owned batch facts. This advances the exact fixed ShortSeed oracle evidence without restoring a legacy pending book. Contract rules: §0, §3.4, §3.5, P9, P13; amendment A17. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
…r feed exists (R4-D L1f) Add the generic synthesized IntrabarPath variant, validation, FNV path digest, driver delivery, and statistics coverage. Advance intrabar decision floors at emitted sub-bar points so applied-callback requests remain eligible within the active script bar. Preserve lower-feed and no-path behavior, and update native ABI manifests/checkers and native witnesses. Contract: §0.2, §3.1, P15; amendments A13, A16, A18, A19. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… host without switching the generated route (R4-D L2) Complete the L1f source projection, fill-bar margin slice, and variable ShortSeed lowering on the fixture-only native route. Add exact full fixture coverage for stop snapshots and fixed/percent ShortSeed books; retain all added adapter state in the source hash. Contract: §0, §2 P2/P4-P9/P13/P15, §3.2-§3.5, P-DA1-P-DA5; amendments A15-A20. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
|
R4-D L2 landed at 4ad7b4b —
Evidence root: |
…d order sample-born requests by ordinal (R4-D L1g) Represent DistributionSamples, synthesized samples, and lower-TF endpoint samples as degenerate one-price decision bars so the generic matcher preserves inclusive activation and point-gap pricing. Register the two unchanged L2 oracle twins and add native witnesses for crossing activation/fill price and later-sample birth eligibility. Rules: R4-D contract §0.2, §3.1/P15; amendments A16, A18, A19, and A21. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
|
L1g landed at 2281ee9 (amendment A21): every sampled decision point (
Next on this branch: L3a (the switch of |
…h the adapter and scheduler (R4-D L3a) Rebase the live source host onto NativeStrategyHost, merge the L2 fixture behavior through a PineNativeHost compatibility alias, and route source commands, begins, C projections, and stream handling through PineExecutionAdapter and PineScheduler. Preserve the frozen C ABI/mirror while adding native-route C stream and pending-intent projection witnesses; retain unreachable legacy bodies for L3b and register the approved fixture/oracle dispositions. Contract: §0, §2 P2/P5-P8/P11-P15, §3.2-§3.5, §6; amendments A4-A8 and A11-A22; deferred-ANY pin P-DA1-P-DA7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
…egister the A24 targets (R4-D L3a-fix) Copy map-backed request handles and placement snapshots before adapter erasure or submission can invalidate them. Re-register the A24 behavioral targets and rewrite the syminfo index fixture to observe the switched public route with unchanged literals. Contract: R4-D §0; A20; A23; A24. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
…ve scheduler hooks and copy request handles before retiring adapter placements (R4-D L3a-fix) Restore the legacy source security/timeframe feed cadence through the switched scheduler and provider, including raw input visibility, source-series/index projection, split-feed ordering, and quiet source abort reporting. Add the permitted generic accepted-input hook and abort-reporting run-spec policy with continuation hash, ABI relocation, and native witness coverage; retain strict native defaults. Replace the market-admission owner-book harness with the A25 fixture/public projection twin and preserve A23 lifetime-copy coverage from the WIP parent. Contract: §0, P7b/P7c, P8a, P11, P13-P15; amendments A13, A20, A23-A25. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
|
L3a landed — the switch (7024f0a + fix d23f50d).
Evidence: |
…eachable behind the native switch (R4-D L3b) Delete the retired execution consumer, source pending-book types, legacy matching/settlement/scheduler/stream bodies, lifecycle seams, ShortSeed storage, and base POOC/COOF fields after the L3a native switch. Project the frozen pending-row ABI from PendingIntentView placement/native facts, retain the switched scheduler/security adapters, update ABI/version/hash guards and relocation evidence, and migrate affected tests, examples, and documentation. Contract rules: §0.1-§0.4, §1, §3.5-§3.6, P6, P10, P12, P13, P14, P15, A14, A20, A23, A24, A25. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
|
L3b landed at d1a0862 — the legacy Pine execution loop is gone. 182 files, +1,657 / −33,644 lines:
Next: integration profiles + compile-backed codegen suite, Fable final review on the exact pair (engine d1a0862 / codegen pineforge-codegen-oss#130 @ 66612ed), then the single composite Cloud Run sweep over the 4190-probe corpus and the gate. |
…le (R4-D L10n) After close_all (or any flatten) the cohort keeps its prior-cycle origins; they are neither pending nor opened, so a strategy.exit re-issued with the same (exit id, from_entry) for the new cycle walked stale handles and never attached to the new parent. ab9714b keys exits per position cycle (cycle_filled_entry_ids_ cleared on flat). Only origin-zero, pending or opened origins are kept now, restoring the empty-origins first-cycle path while the new parent is still staged in pending_same_bar_commands_. Reproduction: probe9 "A v0" (legacy: 2 trades, flat; native: position stuck +1); population probe bprakaash-new-era-strategy-1-0 (371 -> 5 trades). Pinned in tests/test_l10n_exit_reissue_after_close_all.cpp with embedded bars. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…adapter-lowering-20260914-int
… L10o) run_begin only configured the request.security evaluator surface when the run was not "static eligible" (a stream, a magnified run, or an explicit input/script timeframe). ab9714b run_tf_impl (pine_scheduler.cpp:1249-1323) configures it unconditionally for every overload the generated wrapper calls (run_backtest and run_backtest_full both route through the 7-argument run); empty timeframes only select auto-detection. With auto-detected timeframes every request.security series therefore stayed na on the switched route: the 16 mtf-* and analyzer-self-test corpus scenarios produced 0 trades locally. With the evaluators configured, 20 of the 21 request.security scenarios replay identically to the legacy owner (mtf-roll-state-60-240-d-minimal-01 still diverges at trade #78). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…te request.security evaluators on it (R4-D L10o-2) test_script_run_prepare_l4d pins the legacy contract that the bare run(bars, n) lifecycle never configures the request.security evaluator surface while the timeframe-aware overloads always do. Both public overloads produced identical NativeBeginArgs, so the host could only guess from empty timeframes (which merely request auto-detection). The kernel now reports the overload identity as NativeBeginArgs::simple_run (a generic lifecycle fact, ruled A47) and the scheduler gates the surface on that. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…0o-3) check_broker_state_hash_coverage flagged the new retained begin field. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…shots with their position cycle (R4-D L10q) pyramid-terrace-staged-entry-01 trades #647/#648: the owner exits both staged lots at 2025-10-26 01:45 @3926.03; the switched route only exited on the next bar @3931.40 because a prior-cycle Close placement still blocked the exit reservation. Outstanding Close and CloseAll instructions are now cancelled and retired alongside bracket orders when a position flattens, and submitted close placement snapshots record their position cycle so a prior cycle's close never blocks a later reservation. Pinned with embedded bars in tests/test_l10q_pyramid_terrace_exit.cpp (W18b, Gemini). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…cap (R4-D L10s) mtf-roll-state-60-240-d-minimal-01 trades #77/#78: two strategy.entry calls with different ids ("R60" and "D") fired on the same bar while flat and the switched route admitted both lots under pyramiding=1; the owner admits one. Same-bar market entries in the same direction, whether opening from flat or adding to a position, now count the pending same-direction commands (staged, pending and live placements of the current script bar) against the configured pyramiding cap and are rejected once the cap is met. Pinned with embedded bars in tests/test_l10s_pyramiding_same_bar_ids.cpp (W19a, Gemini; the executor's test-keyed host hunk was dropped: L10o-2 carries the overload identity instead). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
… re-armed stop's forced price to the tick (R4-D L10r) order-dual-stop-both-touch-priority-01 trades #143/#144: two stop entries touched on one bar filled in the reverse order and the second lot one tick off. A same-id Entry/Order replacement now retains its predecessor's source_sequence so the book keeps the owner's creation order across re-issues; flat-armed entry-stop arbitration compares source_sequence instead of command_sequence; and a throttled-reopen re-arm's forced execution price is rounded directionally to the tick like every other stop fill. Pinned with embedded bars in tests/test_l10r_dual_stop_same_bar_order.cpp (W18c, Gemini). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
… the trigger (R4-D L10p) bracket-exit-three-way-set-once-entry-01 trade #539: the owner fills the set-once three-way exit on the entry bar (2025-12-25 08:15); on the switched route binary representation error floated the one-shot trailing limit a few ulps above the bar high so it only filled 23 bars later. The level is now snapped onto the price grid before submission and the resolved exit-trail limit fill price is clamped to the trigger level so it never violates the limit threshold. Pinned with embedded bars in tests/test_l10p_three_way_entry_bar_exit.cpp (W18a, Gemini). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…e live position (R4-D L10t) Population collapse mechanism C: after a partial (qty_percent) or percent-rounded exit the switched route kept a zero or dust lot open, which blocked every later entry under pyramiding=0 and was printed as a trade months later (francescodimichele 651 -> 23 trades, p181342x 431 -> 93, joat 193 -> 106 on the ETH feed). The host now drops pyramid entries below the lot epsilon after every applied fill and resets to flat when nothing remains; POOC-flushed closes cap their target to the live physical units and use Flatten/Reduce intents instead of overshooting Transacts; the exit dedupe key uses the real 0x1f separator. With this, francescodimichele, p181342x, sunitkumar, tomukasss and r2keymoneymind replay identically to the owner on the ETH feed; joat keeps one differing row (follow-up). Pinned with embedded bars in tests/test_l10t_partial_exit_residual.cpp (W20a, Gemini; the executor's extra POOC limit-at-close market fill was dropped as out of scope). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…zation (R4-D L10w) waranyutrkm-inside-day-breakout-strategy trade #26: after a short-to-long flip the switched route booked a zero-quantity long lot (a 4x-epsilon margin-call Reduce produced by floating-point residue at a 1x full-margin opening) and printed it as a trade. ab9714b pine_fills.cpp:1572-1575 discards a dust-sized restore requirement before lot quantization; the adapter now does the same. A plain resting stop with the implicit strategy.exit quantity (NaN) also receives the fill-based drawdown normalization on the ordinary route, as the owner does. Pinned with embedded bars in tests/test_l10w_zero_qty_entry.cpp (W21a, glm-5.3). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…ble against the owner's trigger close (R4-D L10v) Under process_orders_on_close the legacy owner's post-calculation fill pass (ab9714b pine_fills.cpp: pooc_short_exit_trigger_close 7318-7365, the eligibility gate 7621-7648 and exit_same_bar_reissue 7810-7843) fills a priced exit leg placed by this bar's calc at the close when it is already marketable against the trigger close the owner selects (stop leg first, one leg per exit order); the switched route left it resting for the next bar, so the first qty_percent leg of a multi-leg exit filled one bar late (projectsyndicate 2735 differing rows, joat #44). The booked stop close slips on the closing side's path (short close = buy: close + slippage, long close = sell: close - slippage; limit legs never slip). With this both population reproductions replay identically to the owner and the A29 twin test_pooc_short_close_tick_l4d passes 183/183. Pinned with embedded bars in tests/test_l10v_first_partial_leg_timing.cpp (W20b glm-5.3-flash, repaired by W20b-2 qwen3.8-max). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
From the independent review of aaa2c3a..9d23cfa (tasks/r4-d/exact/REVIEW-QWENMAX-L10-REPORT.md): 1. throttled re-arm queue deduped by source identity (one re-arm per bar); 2. live rows with a recorded cancellation no longer count against the pyramiding cap; 4. the interval cache is a per-consumer member instead of a thread_local shared by every engine on the thread (generic, no behaviour change); 5. the single-lot position() fast path guards qty > 0 like the weighted path; 6. command_sequence_for_exit selects rows by (exit id, from_entry); 7. broker_bar_cursor is documented as a pure per-bar cache and waived fail-closed in check_broker_state_hash_coverage.py. Item 3 (close on a resting same-bar entry) was found unreachable through the public host surface and is not included. Full corpus replay: no identical scenario changed and no first divergence moved; pinned checks in tests/test_l10z_review_fixes.cpp (W22a, qwen3.8-max). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int
…l-percent bracket reissue as unchanged (R4-D L10x) fran-pineda-strategy-461-ts-m15 trade #351: the re-issued take-profit limit (2409.49) was projected one binary64 ULP onto the wrong side of the grid, so the generic kernel correctly refused it on the touch bar and the short exited a bar later at a lower price. A source level that is on the chart grid now stays at that level; a re-issued default bracket whose normalized percent is within 1e-12 of 100 is the same full-position reservation as the owner treats it; and a resting stop with the implicit (NaN) full-position quantity receives the owner's fill-based drawdown normalization. Pinned with embedded bars in tests/test_l10x_reissued_limit_touch_bar.cpp (W21b, glm-5.3). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int Conflict in the resting-stop drawdown normalization gate resolved as the union of the L10w and L10x findings: explicit or implicit (NaN) stop quantity, every route except POOC combined with calc_on_order_fills.
…sidual lot (R4-D L10y) yukozb-gold-ny-orb-v19-close-20-00 #2/#3 and ahtisham-ee-decoded- volatility-expansion-ahtisham #126/#127: with default_qty_value=100 the legacy owner admits the entry and books it as a main lot plus a residual margin-call lot closed again on the entry bar; the switched route refused the whole entry. The adapter now sizes and admits the full-equity entry the way the owner's fill-time affordability and margin-call slice do, and samples the residual lot's open extremes like the owner. Both population reproductions replay identically to the owner. Pinned with embedded bars in tests/test_l10y_full_equity_entry_split.cpp (W21c, qwen3.8-max). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
…adapter-lowering-20260914-int Conflict in submit_margin_call_slice resolved by keeping the L10w form of the dust-restore discard; L10y found the same owner rule with the same epsilon.
The union merge dropped L10y's local kSliceQtyEpsilon (same 1e-10 value). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKCCnMS51GLmRbA3AHtBDb
Roadmap slice C: the switch. After this PR every generated strategy executes through
NativeExecutionConsumerviasource::PineExecutionAdapter(PineStrategyHost : NativeStrategyHost); the executablePendingOrder,process_pending_orders,LegacyCompatibilityConsumer, the base legacy seams and the executable ShortSeed role are deleted. Contract, binding pin, amendments and anchors live in the campaign evidence root (tasks/R4-D-ADAPTER-LOWERING-CONTRACT.mdrev 2,tasks/R4-DEFERRED-ANY-BINDING-PIN.mdrev 2,tasks/R4-D-IMPLEMENTATION-PIN.json).Landings on this branch
host-ab9714b, seven-archive matrix); 23 legacy-route oracle test TUs (1,184 literal checks) capturing deferred-ANY/cohort/birth/FIFO, all reversal families, ShortSeed books, FX rollover cases, COOF first-open vs cascade, >64 fills, POOC freeze, magnifier cadence, day keys, frozen sizing/stop snapshots — these must keep passing on the native route; deletion ledger; PendingIntentView schema (65 members, 98 prefix fields, 5 probes, zero open).BindCohort/CohortClose,NoTargetdeferral), intrabar (magnifier) path inNativeRunSpec/driver, pre-open hook, pre-begin configuration provider, staged configuration ingress; epochs native_order v5 / run_spec v2 / driver v5 / consumer v7 / engine_script_run v17.Acceptance
Fixed-4190 composite readback byte-identical on the switched route (one sweep on the final pair), the oracle tests, native witnesses, purity guards, deletion evidence. This slice claims the R4 phase credit; the N01–N13 audit note follows for R5.
🤖 Generated with Claude Code
https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm