Lower generated Pine execution onto the native kernel and retire the legacy loop (R4 slice C) - #254
luisleo526 wants to merge 28 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. |
…anguage state (R4-D L3b-fix) Restore the generated source-series aliases, get_input_source spelling, and margin_liquidation_price projection while retaining scheduler ownership and hashing. Preserve source-facing broker-hash determinism across native anti-stale generations and source stream callback/hash cadence. Rules: R4-D A22, A25, A26. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
|
Status after the root audit and the Fable final review of d1a0862 — RED (13 P0 / 14 P1 / 10 P2), repairs in flight.
Evidence: |
Preserve the restore-first L4a implementation, native-route twins, chart-timezone risk/day ledger, cap and margin policy work, and the P1 generic repairs before A28 continuation. Rules: R4-D §0, A20, A26, A27; P0-1 through P0-5; P1-1 and P1-2. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
… through the adapter and restore their tests on the native route (R4-D L4a) Add the fenced generic native tick callback and current-execution witness; lower the stream and post-calculation margin checkpoints through adapter requests; retain deterministic continuation hashing and the v17/v16 ABI rejection controls. Restore public-command L4a risk, day-key, entry-path and rounded-money margin witnesses, record owner-only dispositions, and mark only the deferred L4c lifecycle rows as l4-pending for interim profile execution. Rules: R4-D §0 and §3.1; A20, A26, A27, A28; P0-1 through P0-5; P1-1 and P1-2. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
| current_fx_curve = compile_object("v16_native_fx_curve_surface_compile", | ||
| current_fx_curve = compile_object("v17_native_fx_curve_surface_compile", | ||
| NATIVE_FX_CURVE_CALLER, include) | ||
| current_tick = compile_object("v17_native_tick_surface_compile", |
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