Skip to content

Lower generated Pine execution onto the native kernel and retire the legacy loop (R4 slice C) - #254

Draft
luisleo526 wants to merge 28 commits into
mainfrom
refactor/adapter-lowering-20260914
Draft

luisleo526 wants to merge 28 commits into
mainfrom
refactor/adapter-lowering-20260914

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Roadmap slice C: the switch. After this PR every generated strategy executes through NativeExecutionConsumer via source::PineExecutionAdapter (PineStrategyHost : NativeStrategyHost); the executable PendingOrder, 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.md rev 2, tasks/R4-DEFERRED-ANY-BINDING-PIN.md rev 2, tasks/R4-D-IMPLEMENTATION-PIN.json).

Landings on this branch

  • L0 (5928e32): real v16 providers frozen (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).
  • L1 (next): generic kernel additions — host-maintained request cohorts (BindCohort/CohortClose, NoTarget deferral), intrabar (magnifier) path in NativeRunSpec/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.
  • L2: adapter + scheduler as dead code on a fixture host. L3a: the switch (paired codegen). L3b: deletions.

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

…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
@luisleo526

Copy link
Copy Markdown
Collaborator Author

L1 landed: head e5f5e20 (45 files, +2,194/−519) — the generic kernel additions the switch needs, all source-free:

  • native_order_v5: host-maintained request cohorts (CohortHandle, BindCohort owner / CohortClose authority, exhaustive hash visitors) resolved at every match candidate to the live openings of the members' predecessor chains; NoTarget as a durable live deferral (no event).
  • native_run_spec_v2::IntrabarPath (owned lower-TF bar copy, tf, samples, distribution, volume-weighting; FNV content digest in the spec/continuation domain); native_driver_v5 sub-bar decision context; the consumer evaluates resting requests over each lower-bar OHLC path with parent-OHLC fallback — the former magnifier refusal is now path validation.
  • NativeStrategyHost::on_native_bar_open (before matching at the script-bar open) and prepare_native_begin(const NativeBeginArgs&) ahead of public begin admission on every batch/rich/TF/stream path; generic pre-begin ingress (C FX arrays staged and installed as a native curve once Ready).
  • Epochs: native_order v5, run_spec v2, driver v5, consumer v7, engine_script_run v17, source-adapter v2, fingerprint 17; authenticated v16→v17 relocation manifest; bidirectional rejection pairs; PF_ABI_VERSION 4; no new C export.
  • test_native_adapter_lowering_l1 (110 checks): cohort no-target / growth / 50%-of-cohort / unrelated-opening preservation / membership-order determinism / CashPerExecution ticket / pre-open current execution / lower-TF sub-bar fill sequence / C stream begin provider / staged FX activation / precommit-overflow ordering.

Verification: preflight 13/13; ci_verify release 372/372; ci_verify native 381/381; settlement matrix 65 compiles / 238 links / 0 pending; src/source/ byte-identical to L0; mirror header sha unchanged.

luisleo526 and others added 18 commits September 15, 2026 00:53
… 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
@luisleo526

Copy link
Copy Markdown
Collaborator Author

R4-D L2 landed at 4ad7b4bPineExecutionAdapter + PineScheduler on a fixture host source::PineNativeHost : NativeStrategyHost; the live PineStrategyHost and the generated route are untouched (legacy-route protected-path diff 0).

  • 19 of 23 L0 oracle TUs have exact green native-route twins (deferred-ANY witnesses, deferred birth, FX 129 checks, day-key 101, frozen-size 60, POOC freeze/immediate, relative exit 58, reversal families incl. replaced-percent 95 and same-bar tx 45, ShortSeed 144/86, stop-snapshot 146, >64 fills, magnifier barstate).
  • 4 TUs map to the deletion ledger per A14/A20 (they drive the legacy pending book or read legacy-owner internals; behaviour covered by the registered twins).
  • 2 twins still fail on one generic kernel gap (sampled-point stop activation is equality-only; sample-born ordering) → amendment A21, fixed in the next micro-landing L1g before the switch.
  • Local profiles: release 395/395, native 404/404; mirror SHA unchanged; PF_ABI_VERSION 4; no new C export.

Evidence root: tasks/r4-d/LANDING-L2-REPORT.md (+ RESUME1–5) in the campaign evidence directory.

…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
@luisleo526

Copy link
Copy Markdown
Collaborator Author

L1g landed at 2281ee9 (amendment A21): every sampled decision point (DistributionSamples, synthesized, lower-TF ENDPOINTS) is now one generic one-price decision bar (O=H=L=C=sample, Open coordinate). The defect was coordinate classification: non-first samples equal to a sub-bar low/high were labelled Confirmed+Low/High, which the generic trigger validator rejects as an excursion class, so a below-level sample never activated a stop while an exact non-extreme sample did. No source-conditioned branch, no new spec/hash field.

  • Both formerly failing L2 twins (test_native_oracle_magnifier_distribution_l2, test_native_oracle_coof_l2) registered unchanged and green; two new generic witnesses (below-level activation + legacy one-price fill rule; sample-born ordinal eligibility).
  • release 399/399, native 408/408; pending_order_mirror.hpp SHA unchanged; PF_ABI_VERSION 4.

Next on this branch: L3a (the switch of PineStrategyHost onto the native kernel). Codegen pair: pineforge-codegen-oss#130.

luisleo526 and others added 3 commits September 15, 2026 11:19
…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
@luisleo526

Copy link
Copy Markdown
Collaborator Author

L3a landed — the switch (7024f0a + fix d23f50d). source::PineStrategyHost now derives from NativeStrategyHost; every generated strategy, every run*/stream begin and every C export runs on the native execution kernel through PineExecutionAdapter + PineScheduler (prepare_native_beginadmit_public_beginNativeExecutionConsumer). The legacy Pine loop is compiled-but-unreachable and is deleted in the next landing (L3b).

  • Generated surface unchanged (codegen pair pineforge-codegen-oss#130 adds the price-less-exit lowering and the PINEFORGE_HAS_NATIVE_LOWERING_V1 fence); C pending exports read the new PendingIntentView; pending_order_mirror.hpp byte-identical; PF_ABI_VERSION 4.
  • Oracle discipline: 17 L0 oracle TUs green unchanged on the native route, 2 rewritten to public projections with the same literals, 4 owner-internal TUs mapped to the deletion ledger; all 27 L2 twins green.
  • Repairs from the root audit: A23 heap-use-after-free in the adapter's retire (9 container-lifetime sites fixed; Linux ASan clean), A24 18 security/timeframe/syminfo/abort tests re-registered and green unchanged, A25 the scheduler now feeds the same generic engine_security.cpp sequence from the native hooks; two generic kernel additions only: on_native_input(Bar, NativeInputContext) and NativeRunSpec::abort_reporting.
  • Local profiles: release PASS, native PASS, Linux ASan/UBSan 240/241 (the one failure is the pre-existing test_native_calendar tzdata precondition in a minimal container; the GitHub Ubuntu lane is authoritative).

Evidence: tasks/r4-d/LANDING-L3A-REPORT.md in the campaign evidence directory.

…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
@luisleo526

Copy link
Copy Markdown
Collaborator Author

L3b landed at d1a0862 — the legacy Pine execution loop is gone. 182 files, +1,657 / −33,644 lines: LegacyCompatibilityConsumer and its factory, seams S01–S09/S22–S24, the executable PendingOrder book and its second matching loop, the legacy scheduler/magnifier/stream/settlement bodies, the ShortSeed enum storage, the base POOC/COOF fields and the language mixin are deleted. One execution owner remains (NativeExecutionConsumer); the C pending-row prefix is projected from PendingIntentView with byte-identical layout.

  • Purity census (Python re): 0 product references to any retired symbol; hash-coverage waivers 41 → 38.
  • Local profiles: release 225/225, debug 225/225, native 234/234, sanitizers (GCC 16 ASan+UBSan) 225/225.

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
@luisleo526

Copy link
Copy Markdown
Collaborator Author

Status after the root audit and the Fable final review of d1a0862 — RED (13 P0 / 14 P1 / 10 P2), repairs in flight.

  • The switch itself and the kernel additions reviewed clean of source vocabulary. The P0s are in the adapter and the verification apparatus: the adapter never lowered strategy.risk.max_intraday_filled_orders, max_drawdown/max_intraday_loss, the margin-call liquidation, the chart-timezone day key, the legacy ShortSeed qualification, the affordability close-only family, and several sizing/timing rules; the tests that pinned those behaviours had been removed through the deletion-ledger inventories, so the green profiles did not cover them.
  • Landed since: L3b-fix c71699f re-exposes the generated source-series surface (the codegen compile-backed suite is now 2,510 passed / 0 failed against this tree).
  • Repair programme (amendment A27): every removed behavioural test is restored as a native-route twin with identical literals before the policy it pins is declared lowered. L4a (risk/cap/margin/day-key + two kernel refusal-ordering repairs) and L4d (executing ABI rejection pairs, oracle discipline, mirror/hash/admission test families) are running now; L4b (ShortSeed, affordability, direction, sizing, deferred close, determinism) and L4c (order priority, exit-leg lifecycle, reservation expansion, mirror projection) follow. A diagnostic experiment sweep over the 4190-probe corpus is running on this exact pair to quantify the regression; the PR sweep runs once on the final tree.

Evidence: tasks/r4-d/exact/REVIEW-FABLE-FINAL.md, tasks/r4-d/briefs/AMENDMENTS.md A21–A27 in the campaign evidence directory.

luisleo526 and others added 2 commits September 15, 2026 20:18
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",
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