Skip to content

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

Merged
luisleo526 merged 226 commits into
mainfrom
refactor/adapter-lowering-20260914
Sep 19, 2026
Merged

luisleo526 merged 226 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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>\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 <[email protected]>\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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
@luisleo526

Copy link
Copy Markdown
Collaborator Author

R4-D L2 landed at 4ad7b4b — PineExecutionAdapter + 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 <[email protected]>
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 <[email protected]>

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 <[email protected]>
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 <[email protected]>

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_begin → admit_public_begin → NativeExecutionConsumer). 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 <[email protected]>
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.

luisleo526 and others added 22 commits September 18, 2026 23:08
…exit adapter

Two exit-fill-price parity fixes in the lowered exit path (src/source only):

- exit(): submit a negative buy stop at the 0.0 trigger floor. A short that
  inherits the long's stop (~-1990) has a below-zero buy-stop level that every
  print crosses; the candidate dropped it, so the exit never booked. The owner
  stores the negative level verbatim and fills at the next reachable point.
  Negative sell stops stay skipped (unreachable). (ab9714b
  pine_strategy_commands.cpp:1933; A43 trigger floor)

- flush_pending_bracket_legs(): apply the competing chart-tick half-tick shift
  only to OFF-grid levels. On an on-grid level the shift pushed the native
  threshold half a tick past the level, so resolve_terms booked below it and
  the kernel rejected the fill as InvalidTerms; the leg never filled. The owner
  chart-tick touch only applies to a level strictly inside (raw, tick(raw)].
  (ab9714b pine_fills.cpp:592-641)

Verified: apkw82/data-NYSE-F diffrows 180->0; guards joat/traderhayz/
thulashimohanr 0; jenmb full-history 24/24 byte-identical; ctest 492/492;
hash guard OK. Kernel untouched.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 706a3fdf786afa192c63febeedaff9a81d76d206)
PineExecutionAdapter::exit's submit_leg lambda ($_11) resolved the short-exit
limit/stop trigger with two unbounded while loops that stepped one ULP at a
time via nextafter until nearest_tick crossed the level. On an on-grid level
k*mintick lands one ULP above the decimal grid point, so the walk crossed a
whole tick (~1e9 steps) on every exit call -- alby1611-bollinger (POOC, 3761
trades) never terminated. Replace both loops with the existing
source_trigger_threshold(level, tick, is_buy=true, is_limit), which resolves
the same half-tick boundary on the grid index with a bounded 16-step walk and
already sets the other exit thresholds. (ab9714b include/pineforge/engine.hpp
:1268-1312 tick_grid_price k/(1/mintick))

Verified: alby1611 owner 1881 / candidate 1881 diffrows=0 (was infinite hang);
guards joat/traderhayz 0; ctest 492/492; hash guard OK. src/source only.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit a65f4132558872a39381c5ba7176836f5b117731)
…F aux-security checkpoint

Three below-strong parity fixes (src/source only):
- entry(): every entry limit, explicit-qty included, tests against the
  tick-quantized bar; removed the explicit-fixed bypass so an off-grid limit
  triggers on the half-up rounded print (drop-trades-orb 66->0).
  (ab9714b pine_policy_members.cpp:11-17, engine.hpp:1374-1381)
- on_applied(): a released entry on the closed position's own side books its
  own slippage off the shared open print, not the close's slipped price
  (3commas-triple 2->0). (ab9714b pine_fills.cpp:3848-3856, engine.hpp:1207-1210)
- scheduler_feed_aux_security(): under calc_on_order_fills, restore the script
  checkpoint, feed the auxiliary request.security slice, then re-snapshot, so
  the fed values survive the per-bar restore (fran-pineda-470 2->0).
  (ab9714b pine_scheduler.cpp:1705-1708, 467)

Verified by executor: 3 targets + guard diffrows=0, ctest 492/492, hash guard OK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 98dfe87eb641d910ddbc3bf55ba9dbca3107694d)
…r_close trim, zero-offset trail threshold

Five exit fill-price parity fixes (src/source/pine_adapter.cpp only; PARTIAL:
5 of 8 targets, the other 3 need generic kernel features not in scope):
- Legs from the same strategy.exit no longer count as surviving siblings, so a
  filled percent-qty exit is marked used and does not re-fill
  (joat-concordance 586->0, jlall7892 18->0). (ab9714b pine_fills.cpp:7012-7024)
- A used-up id's re-issue is blocked only when itself partial against the live
  position (keeps the pinned exit-bracket tests green).
  (ab9714b pine_strategy_commands.cpp:1661-1692)
- A commissioned explicit-qty market short at 100% margin trims at the fill
  price first, then the bar's adverse extreme (mdfe3757 1530->0).
  (ab9714b pine_fills.cpp:1266-1340, 5998-6005, 6168-6179)
- A stop beside an armed zero-offset trail takes the zero-offset trail price;
  an unarmed zero-offset trail uses the half-tick boundary on the rounded
  price path (boztilkiserhan 270->0).
  (ab9714b engine_path_resolve.cpp:620-705, 292-308, 746-766)

Verified by executor: 5 targets + 2 guards diffrows=0, ctest 492/492, hash OK.
Remaining (kernel-gated, tracked): francescodimichele (trail slippage vs limit
rejection), 3commas xlm/btcusdt-p grids (near-zero close UnrepresentableQuantity).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 2e2fbf06e8e0b67aa7fe955ee4da77a571315283)
…gaps at open

Two below-strong parity fixes (src/source/pine_adapter.cpp only):
- close(): under process_orders_on_close (and not calc_on_order_fills), an
  ordinary close_all fills at the call, ahead of any same-bar market entry the
  script placed before it, so an under-cap add issued earlier survives the flat;
  the script keeps its pre-close position view (freeze_script_position_view,
  KI-64). Fixes 3commas-rsi-dip-ema on both 1D datasets (38->0, 46->0).
  (ab9714b pine_strategy_commands.cpp:789-801, 2437-2446)
- resolve_terms(): a stop armed with its pending market parent and already
  breached at the parent's fill open is an opening gap, not a path cross, so it
  books bar.open (matches TV PnL 0). Guarded to ExitStop + Confirmed +
  raw==script-bar open + no intrabar + not POOC/COOF. Fixes bhajneek12 (2->0).
  (ab9714b pine_fills.cpp:4136-4240, 7795-7800)

Verified by executor: 3 targets (bhajneek12, 3commas-rsi-dip x2) diffrows=0 via
1D dual-feed; stevenygabbyperez already 0; guards + 33 extra pairs no new
regression; ctest 492/492; hash guard OK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 2216507a92950585714aae5e9161dc14cf7d658f)
…lipped-touch trail (ruling A-STOPFILL)

Fixes francescodimichele-gold-ai-strategy-v2-0 (258->0). A one-shot trail with a
sub-tick offset is a favourable-direction touch: the level gates WHEN it fills
but the owner applies slippage so the fill lands WORSE than the level. A native
Stop fires on an adverse move (wrong direction), and a bounded Limit rejects a
worse-than-level fill; neither models this.

Generic kernel capability (ruling A-STOPFILL, user-approved D180):
- native_order::Limit gains `bool fill_through = false` (market-if-touched): the
  level still gates executability, but the fill is not bounded by the level.
  Default false => every existing request is unchanged; folded into hash_trigger
  ONLY when set, so bounded limits keep their digest. native_execution_consumer
  skips the InvalidTerms level guard and protect_limit when the flag is set.
  No Pine/TV/probe references, no new constants -- a plain order-execution option.

Adapter (src/source) decides when to use it, owner-cited:
- exit(): a zero-distance one-shot trail leg with slippage>0 is sent as
  Limit{activation, fill_through=true} (touch at the unslipped activation, so it
  does not fire early). (ab9714b engine_path_resolve.cpp:984-987, pine_fills.cpp:4396-4411)
- resolve_terms(): the fill moves slippage ticks against the exit, snapped to the
  tick grid. (ab9714b pine_policy_members.cpp:45-53)
- precommit excursion: the trail peak uses the pre-slippage fill; an open-gap
  fill adds no peak. (ab9714b pine_fills.cpp:5760-5769, engine_path_resolve.cpp:620-631)

Verified: francescodimichele 0, guards apkw82/mdfe3757/joat-aureate 0, ctest
492/492, hash guard OK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 5dedf5a7e9f57a7a619278b8467b49a68e003677)
Fixes stevenygabbyperez-fast-scalper-with-stops (excellent->weak, visible only
under the Cloud Run readback config: trimmed start-of-window feed + chart-warmup).
At a margin call, revive_brackets_after_margin revived a stale OLDER placement of
Exit Short (an earlier bar's stop) even though a later same-id strategy.exit had
re-priced it in place with a new stop. The candidate then closed the remainder at
the stale stop instead of the current one.

The owner keeps ONE pending exit per (id, from_entry); a later-bar re-issue
replaces it in place and its revival scans only live pending orders
(ab9714b pine_fills.cpp:2069-2094). A re-issue over a dormant predecessor
carries no projection link, so match by identity: an older placement is
superseded when a later placement with the same leg family, id, from_entry and
position cycle was issued on a later script bar with a different stop. A same-bar
re-issue still revives the originally armed stop (pine_fills.cpp:2088-2094); a
same-level re-materialization keeps the predecessor.

Verified: steven Cloud-Run-config 5360->0 (2680/2680); full-history and --window
both 0; guards apkw82/mdfe3757 0; ctest 492/492; hash guard OK. src/source only.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit ed67c8a8aea9686aa29e8496bda78c82b6a72496)
…vation (near-zero close)

Fixes the two 3commas grid probes from rejected/diffrows=1170 to diffrows=2 (only
the dust-row fee remains, see below), in src/source. Three owner-cited changes:
- flush_pending_closes: when a partial close uses up only whole lots it becomes a
  Flatten of exactly those lots, but ONLY when a plain FIFO reduce would leave or
  take a dust fragment (clean drains stay a reduce); later closes in the same
  flush see the lots left after earlier ones. Lots are picked at the fill, not at
  submission, so a same-bar strategy_order trim no longer stales them
  (fixes test_integration_l4d). (ab9714b pine_orders.cpp:29-70, 340-347)
- off-grid close target: the owner closes its raw (unrounded) target, so an
  off-grid target goes through a host-sized close resolved at the fill; on-grid
  targets keep the fixed-quantity reduce. (ab9714b pine_strategy_commands.cpp:1397-1408)
- reservation: reserve qty_before - position_qty_ (the owner's pre-fill held
  units) via a transient precommit_held_units_ cache, cleared at the applied
  boundary; the id close ledger keeps the settled-units floor.
  (ab9714b pine_strategy_commands.cpp:1575, 1557-1575)
precommit_held_units_ waived in broker_state_hash_waivers.txt (transient cache,
same class as excursion_*).

Verified: grids diffrows 1170->2 (dust-row fee only), guards apkw82/joat/mdfe3757
0, ctest 492/492, hash guard OK. src/source only. Remaining dust-row fee is a
kernel fee-allocation matter (tracked).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit fe7aab8de51be79942c7cdc2f87c39554c774d8b)
…review blocker)

sort_same_bar_exit_trades reordered the Trade objects but not the parallel
trade_exit_phase_ (keyed by trade index), so is_open_phase_exit read stale
phases on the next per-bar sort and the same-bar exit group could flip order
(nondeterministic export order; latent, introduced by aea775d). Add
PineExecutionAdapter::permute_exit_phases(start, indices) and apply the sort's
permutation to trade_exit_phase_ right after the trade write-back, so each
trade's phase moves with it. The sort's adapter parameter becomes non-const
(both callers pass the non-const adapter_); trade_exit_phase_ stays hashed
source-state (not made mutable). Also removes a dead duplicate return in exit().

Verified: ctest 492/492 (test_l10m_corpus_parity, test_l10ab, test_l10ak pass);
hash guard OK; two runs byte-identical (determinism); guards apkw82/joat 0.
src/source only. Fixes the Opus final-review blocker.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 09a24feecb82dcb54430b1538b0925d57f45cc0d)
The engine is two layers: a Pine-agnostic generic kernel (matching, fills,
sizing, margin, magnifier, indicators, request.security, time) and a
source-adapter parity runtime (src/source/: PineStrategyHost,
PineExecutionAdapter) that maps Pine/TradingView execution semantics onto the
kernel; codegen owns Pine->C++ translation, not execution. Adds an
"Architecture: kernel vs. parity" section (kernel changes only for ruled
generic capabilities), splits the libpineforge.a description, and corrects the
stale Repository layout (26->48 .cpp, adds src/source and src/compat/pine) and
the ABI-count number (32->65).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
Two hard-band probes regressed vs the legacy baseline (gate hard.regression):
- market-logic-india-low-lag: on a bar that does entry Long; close Long; entry
  Short; close Short, the candidate made close("Long") wait on the same-bar
  capped re-entry, which the open-boundary admission then retired, cancelling
  the close with it; the short then only flattened. Fix: a close no longer waits
  on a capped re-entry unless an earlier opposite same-bar entry exists.
  (ab9714b pine_fills.cpp:2991-3009). data-OANDA-XAUUSD 10352->0, BTCUSDT
  19364->0, EURUSD 11460->0, NYSE-F 3938->0, AAPL 2206->0.
- stockhunter2025-btcusd-4h: (A) a margin slice sized on the pre-fill position
  liquidated dust left by same-bar priced exits; re-size any still-live margin
  slice from the reduced book after a priced exit fills (guarded !POOC/!COOF/
  !FX/!1x-long). (ab9714b pine_scheduler.cpp:267-282,177-183, pine_fills.cpp:2224).
  (B) the deferred margin slice missed the exit-side slippage the current-point
  route already applies; add it (zero-slippage unchanged). (ab9714b
  pine_fills.cpp:1711-1726). BTCUSDT 208->0, data 1366->0.

Verified: both probes diffrows=0; margin-path guards apkw82/joat/mdfe3757/
traderhayz 0; ctest 492/492; hash guard OK. src/source only.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
(cherry picked from commit 0ac768491aec67b2d89d7d895e1d984288267b01)
…ry POOC

The 6 process_orders_on_close probes timed out on the Cloud Run gate's
full-history broker-active rung: the source adapter kept full history and
several hot paths rescanned it every bar/order, so a long feed ran O(N^2)
(21-798s vs the legacy 0.6-2.2s). Add derived indexes/counts (per-id
command-sequence minima, per-id entry position index, per-family bracket
member counts, per-from_entry reversal cache) so those paths are O(1)/O(k).
Behavior-preserving: all 42 before/after trade CSVs byte-identical, guards
diffrows=0, ctest 492/492, hash guard OK (indexes are derived caches, not
hashed state). src/source only, kernel untouched.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…emes

Class A of the target.not-positive gate blocker. A calc_on_order_fills
cascade order that targets a bar extreme must trigger at the RAW high/low
and book at that price rounded to the tick (owner ab9714b
pine_scheduler.cpp:543-606, booking pine_fills.cpp:7962-7966). R4-D armed
these orders at the rounded price, so an order that should touch the raw
extreme missed and slipped to the close (pine_adapter.cpp market closes
6110-6115, market-entry Limit 4397/4402), coof_next_waypoint (3798) mis-read
a mid-bar fill as at-the-low, and an exit limit held for the next extreme
(6919) armed at the raw low but booked the rounded low so the kernel limit
check (native_execution_consumer.cpp:2880) rejected it. Fix (src/source
only): extreme-aimed orders trigger at the raw extreme with the booked price
unchanged; limits whose booked price is past the level use the kernel's
existing fill-through; an off-grid extreme counts as reached only when the
fill landed exactly on a bar point, tracked by a new coof_fill_cursor_t_
(live and hashed only during a recalculation); close-aimed orders keep the
rounded level. Restores joat NYSE-F 303->304 and joat NASDAQ-AAPL 348->350,
all trades identical to legacy; guards diffrows=0, ctest 492/492, hash OK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
flush_pending_bracket_legs dropped a from_entry take-profit that the owner
(ab9714b) still books when a position re-enters on the same bar it exits,
under process_orders_on_close. Restores vasudevshenoy-manoj-betrayed-me
(BINANCE-BTCUSDT) 818->821, diffrows 1564->0, matching legacy. src/source
only, no new state; guards diffrows=0, ctest 492/492, hash OK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…t add

At the bar open the owner (ab9714b pine_fills.cpp:3799-3845
samebar_add_exit_first) ranks buy-market(1) > sell-market(2) > gapped
limit(3), so a same-id market add is judged against the still-open book
(pyramiding cap + margin) before the gapped stop closes the leg. R4-D's
kernel breaks the same-point tie by smaller incarnation, so the older gapped
leg filled first and the add opened from flat. New
reaccept_gapped_bracket_behind_same_id_add (pine_adapter.cpp, from on_bar_open)
cancels and resubmits the gapped from_entry leg so the fresh incarnation puts
the add first; resubmitted limit legs are forced to the open print. Restores
colasbreugnon-good-luck (373->372, the Class-B extra 836-lot long removed)
and fixes masayanfx's two KI-62 sites. src/source only, no new state; Class A
(joat) and apkw82 guards diffrows=0, ctest 492/492, hash OK. masayanfx has a
separate remaining on-grid-limit tick-rounding cause handled elsewhere.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…ed exits

Class C of the target.not-positive gate blocker, two owner-cited causes in
src/source (kernel untouched):
1. Margin-call size / skipped trim (pridarasx): on_applied's priced-exit
   preemption check (short_preempted_by_priced_exit) and
   opening_slice_precedes_priced_exit_fill counted a stale Exit-Long bracket
   whose from_entry the reversal had already closed, so R4-D skipped the
   fill-price trim step and mis-sized the margin call (0.00016 vs 0.00004).
   Owner removes exits whose from_entry has not filled in the current cycle
   (ab9714b pine_fills.cpp:7671-7674, cycle_filled_entry_ids_). Added
   from_entry_filled_this_cycle(id) and applied it at both sites.
2. Reversal admission (shiroi): validate_precommit checked explicit-qty MARKET
   reversals against post-close marked_equity (includes the closing fee and
   the carried side's gap) and refused them; the owner costs a MARKET reversal
   against the placement-time equity snapshot, fees excluded (ab9714b
   pine_fills.cpp:5564-5663), admits it, then closes on the fill-price
   shortfall. Affordability branch now uses the owner's placement-equity rule.
Restores pridarasx BTC 869->824, pridarasx XAUUSD, shiroi ES1 952->966,
shiroi NQ1 568->577, all diffrows=0 vs legacy; guards + Class A (joat) 0,
ctest 492/492, hash OK, no new durable state.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…arity

Three src/source causes on winthetrade-ema-9-vwap (EURUSD), none Class B/C/vasudev
(present since the native adapter port 271032d):
- Skipped pre-exit margin slice: defer_rounded_pooc_short_margin_until_close
  counted a leftover strategy.exit whose from_entry never filled this cycle as a
  second live order and never scheduled the slice; owner removes that exit
  (ab9714b pine_fills.cpp:7672-7675) and books the slice before the trail fill
  (pine_fills.cpp:378-384,2150-2305). Count now skips unfilled-this-cycle exits.
- Extra 1-unit long money-margin call under POOC: schedule_tv_money_long_margin_before_trail
  fired whenever a trail was resting; owner fires only when the owned trail fills
  the same bar, at a path point before the fill (pine_fills.cpp:1780-1822,1935-1937).
  Now walks the trail over the bar waypoints from the open and schedules only if
  the trail fills after the fire point.
- MFE drift: margin_call_sample_bar falls back to tick-rounded waypoint match;
  zero-offset trails take the peak from the tick-snapped fill with no open-gap peak
  (owner engine_internal.hpp:187-198, engine_path_resolve.cpp:620-631).
Restores winthetrade EURUSD 1746->1762 diffrows=0; interakktive/itzkarmakyo were
never regressed (phantom diff from an unbuilt dylib). Guards + Class A (joat) 0,
ctest 492/492, hash OK, no new state.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
An exit limit whose level is exactly on the tick grid was never reached when
the bar's raw high/low stopped half a tick short, because R4-D sent on-grid
levels to the kernel raw while the owner tests triggers on the tick-quantized
bar (ab9714b pine_policy_members.cpp:11-17, engine.hpp:1374-1381: NYSE:F high
10.175 -> 10.18 fills a 10.18 sell limit). On-grid exit limits now also get the
half-tick source_trigger_threshold, except under calc_on_order_fills where the
owner compares the raw bar. Booked price unchanged (source_limit_fill still
books the level). Restores latibonit15 (408) and ygd (111) diffrows=0, and a
109-replay sweep changed only latibonit15/ygd/joat-concordance, all to 0.
No new state, no kernel edits; guards + Class A (joat) 0, ctest 492/492, hash OK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…h_pending_bracket_legs

Sibling of the on-grid exit-limit fix (5fe4753), at a different site. When a
re-issued exit leg waits until after the bar's calculation,
flush_pending_bracket_legs tested the touch with policy_script_bar_.high >= level
against the RAW high. The owner tests priced exits on the entry bar against the
tick-quantized bar (ab9714b pine_fills.cpp:7711-7713 -> broker_trigger_bar,
pine_policy_members.cpp:11-17 -> broker_tick_bar, engine.hpp:1374-1381), so a
raw high half a tick short still fills (NYSE:F 13.455 -> 13.46 fills a 13.46
take-profit). The touch test now uses the tick-quantized high/low via
source_decimal_tick, staying raw under calc_on_order_fills or without a valid
tick (same exemption as 5fe4753). Restores vasudevshenoy-manoj-betrayed-me
NYSE-F 180->0 (426/426); BTC lane and guards diffrows=0, ctest 492/492, hash OK,
no new state, kernel untouched.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
… script

The 17th target excellent->strong. caldera's 35/35/30 qty_percent exit legs
split against the wrong base after a 2026-01-21 margin call. R4-D's
schedule_margin_call_path placed the carried-short margin order at the day's
high so it filled BEFORE the close-time script, so the script sized its exits
against 0.90596 (0.31708/0.31708/0.27178). The owner processes that margin call
AFTER the script (ab9714b pine_scheduler.cpp:258 script then :278
process_margin_call; the early pine_fills.cpp:1172-1196 check is ruled out by
commission/slippage :1189, and the before-priced-exit hook :2150 needs a resting
order, none on 01-21), so the script sizes against the full 1.0 (0.35/0.35/0.30),
matching TV. Fix: in the process-orders-on-close block a carried short skips the
early margin order when there is no calc-on-order-fills/stream, commission or
slippage is nonzero, and the book is empty apart from margin orders; the existing
post-script carried-short checkpoint then books the same slice at the same price
after the script. caldera now byte-identical to legacy (bar the internal
entryIncarnation id), sizes 0.35/0.35/0.20596; guards diffrows=0, ctest 492/492,
hash OK, no new state, kernel untouched.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…ervation, limit open-gap)

The last 3 target excellent->strong, all diffrows=0 under plain --window but
strong under the gate readback config (trim + chart_ema_na_warmup), each a
distinct src/source cause (kernel untouched):
- interakktive: a carried 100%-margin long's at-open money margin slice was
  flagged fill-only unconditionally, losing the bar's favorable excursion
  (MFE 0.000760 vs owner 0.002750). Owner exempts it and books at the open
  before sampling only when a priced exit is resting (ab9714b
  pine_fills.cpp:2544-2548,164-218,1350). Flag now applies only then.
- itzkarmakyo: a negative 'SL Long' sell stop (-0.00002 on the trimmed feed)
  was skipped by exit(), so the later partial take-profits filled; owner stores
  the negative stop and it reserves 100% of the position so the partials get no
  qty (ab9714b pine_strategy_commands.cpp:1929-1953). Negative sell stop now
  rests at 0.0 and keeps its reservation.
- forexver: an exit limit already marketable at the market parent's open gap
  booked at its level; owner closes both stop and limit legs at the open
  (ab9714b pine_fills.cpp:4136-4240,7795-7800); the earlier 6c1f431 fix covered
  only the stop leg. source_limit_fill now gets the same guarded open-gap rule.
All three now byte-identical to legacy under the gate config; winthetrade guard
identical; plain --window guards diffrows=0; ctest 492/492; hash OK; no new state.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…kyo pad parity

Recovers the two problems ship3's gate revealed, both from the gate3 change:
A) jenmb timed out on the Cloud Run afull ladder rung (full history, trading
   before window). Root cause: gate3 rests jenmb's negative sell stops at 0.0
   (correct per ab9714b pine_strategy_commands.cpp:1929-1953), so under
   calc_on_order_fills three exit legs are re-issued every bar and placement_ /
   the bracket-family lists grow ~1/reissue (~300k); three walks inside exit()
   made it quadratic (afull 97s). Made those O(1)/O(k): the consumed-leg family
   walk runs only when deciding to skip; the wrong-side-limit placement_ walk
   runs only for a wrong-side limit; the origin list is built from the origin
   roster index. afull 97s->9.5s, trades byte-identical. Also narrowed gate3's
   at-open guard to the owner-exact carried_long_money_precedes_priced_exit
   (pine_fills.cpp:164-218, exemption 2544-2548).
B) interakktive/itzkarmakyo strong under the gate's PAD window. interakktive
   #325: the owner narrows its 1x-long rounded-money-call tolerance to
   8*eps*money_scale + net_profit_roundoff_bound_ (pine_fills.cpp:1929-1965) and
   books the slice at the fire price, not the bar close (1985-2020); ported both.
   itzkarmakyo #303: a 6-decimal PnL tie decided by the buy-limit last bit;
   keep the owner's floor(r+eps)*tick (pine_policy_members.cpp:53-58).
interakktive/itzkarmakyo/winthetrade/forexver IDENTICAL to owner under pad AND
gate; jenmb/apkw82/joat/pridarasx --window diffrows=0; ctest 492/492; hash OK;
no new state; kernel untouched.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
@luisleo526
luisleo526 marked this pull request as ready for review September 19, 2026 15:21
@luisleo526
luisleo526 merged commit 73817c1 into main Sep 19, 2026
10 checks passed
luisleo526 added a commit that referenced this pull request Sep 29, 2026
…r aborts (FIX-E1E2) (#299)

* FIX-E1E2 (E1): the report's script_tf_ratio and needs_aggregation again

pf_report_t::script_tf_ratio and needs_aggregation read 0 on every run
since #254 (73817c1) retired the legacy scheduler, whose run_tf_impl set
both (pine_scheduler.cpp:1334-1335) and whose simple run set 1 / false.
The native scheduler computes the same ratio at run begin
(PineScheduler::run_begin) and now hands it to the report fields there,
for every run the Pine host begins: the bare run, the timeframe-aware run,
an auto-detected input, the magnifier, a stream. Report-only: no trade
moves.

test_report_timeframe_ratio runs each route and a reused host; at
35db01c it fails 19 of its 79 checks (every ratio and aggregation flag
reads 0). ADR-0001 gains the row the kernel-seam-rows gate asks for
(the timeframe report facts, report-only, outside the hashed region);
doc anchors into pine_scheduler_native.cpp carried through the line map
from 35db01c.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* FIX-E1E2 (E2): an aggregated chart's admission receipts name their command's bar

A run with Pine v6's default sizing (100 % of equity), a commission and
process_orders_on_close stopped on an aggregated chart with "admission
receipt requires its exact earlier command" (market_admission.cpp:26).
The adapter binds each entry command's admission observation to the row's
projection bar, the input slot (projection_bar_index). Since #289
(0d76a09) the kernel's public interval_index is the script bar, and the
receipts that follow a command kept reading it: the sizing revision a
margin call makes of a pending default-quantity entry
(refresh_pending_sizing_after_margin) and the three market reviews
(DefaultGross, ExplicitPair, TerminalGross). On an aggregated chart the
script bar is smaller than the input slot, so the receipt preceded its own
command and Draft::sizing_revised / reviewed threw. The terminal review of
a process_orders_on_close pair of fixed-quantity calls at pyramiding 0 hit
the same check with no commission or percent sizing at all. Every receipt
now carries projection_bar_index(context); on a chart run the two indices
are equal.

With the pair's terminal review running on an aggregated chart, its
same-bar round trips were dated at the next bar's open: the reversing call
closes the first leg's lot before the first leg's own notification re-dates
it to the chart bar's open (PineStrategyHost::on_native_applied). The
opening notification now also re-dates the rows a later execution of the
same pass booked from its lot.

TradingView's tapes of two synthetic probes written for this lane
(tests/fixtures/aggregated_admission_receipt, BINANCE:ETHUSDT.P 60,
lab tv --no-note): test_aggregated_admission_receipt_tapes replays both on
the chart's bars and aggregated from 15 and from 5 minutes. At 35db01c the
four aggregated rows stop with the receipt error (8 of 66 checks fail);
with the receipts alone the pair's aggregated rows misdate eight round
trips (16 of 150 fail); all 150 pass.

ADR-0001's row of the kernel-row fields the Pine host amends names
Trade::entry_time. Floors: RELEASE_MIN_TESTS 792 and EXCLUDED_REGISTERED_MIN 773/773/782 for
the lane's two rows; doc anchors into pine_adapter.cpp and
pine_strategy_host.cpp carried through the line map from 35db01c, and the
RELEASE_MIN_TESTS citations to its new line.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
luisleo526 added a commit that referenced this pull request Sep 29, 2026
…GINE) (#300)

Audit of every README and doc page of pineforge-engine against engine main
35db01c and the live measurement; each change names its source.

What was wrong, and the source of the truth:

- Parity numbers were the retired 4,190-probe round-39 era (badges, hero,
  scoreboard, lane table, contributing-llm.md, design/progress pages). Now the
  active baseline pineforge-parity-baseline-20260929-engine-35db01c8 (snapshot
  sha256 47cec517..., population cf857209...): 8,006 probes, 7,989 graded =
  7,905 excellent + 84 strong, 17 TradingView-side anomalies excluded,
  18 lanes, 2,759,431 TradingView trades (population tvTradeRows / 2). The
  "2.8M matched" count has no source in the snapshot and is gone. Public
  corpus: 311 excellent + 1 declared anomaly (scripts/check_corpus_parity.sh
  pinned headline; parity step of the XAU-CAL lane job on this tree), and
  anomaly-equity-mirror-strategy-equity-01 is that anomaly (it does not
  match trade-for-trade on the pinned corpus).
- Versions: no 1.0.0, 0.14.0 or rc tag exists (git tag; gh release list).
  CHANGELOG's "## 1.0.0" becomes "## Unreleased" and lists #292-#298, which
  it lacked (squash messages 7f807b9..35db01c); "34 more" PF_API is 39.
  README Releases: v0.13.1 entry added, v0.13.0 line corrected, the merged
  live/abi-v4 "Unreleased" line and the 1.0.0 line replaced. Pages that
  framed 1.0 as shipped now say planned.
- Front door 1 could not run: pineforge-codegen has no CLI (0.10.4 or main),
  PyPI 0.10.4 output does not compile against main (cc log), a plain
  -lpineforge link drops the runtime C ABI (run_strategy.py refuses it), and
  run_strategy.py needs --ohlcv/--no-trim-output without the corpus. The new
  block ran end to end from a clean clone (14 trades on the tutorial feed).
- Prerequisites: floating-point std::to_chars (src/str_utils.cpp:55) needs
  GCC 11 / libc++ 14; ctest --test-dir needs CMake 3.20; examples need
  -DPINEFORGE_BUILD_EXAMPLES=ON; the install also ships libpineforge_kernel.a.
- MCP section: the image, hosted server and npm package run engine 0.13.1 +
  codegen 0.10.4 (pineforge-release v0.1.25 notes); hosted server and npm
  package descriptions corrected from their live/ published sources.
- Benchmarks: every number reproduces (check_provenance 163/163); framing
  fixed (commit and method named, PineTS has had strategy.* since 0.9.17),
  recipes state their prerequisites, two wrong failing-gate cells fixed,
  personal host name scrubbed from 14 Google Benchmark JSONs with the
  manifest sha256 values updated (origin_sha256 keeps the measured file).
- Reference pages: native-engine.md, pine-to-native.md, coverage.md,
  pine_v6_coverage_detail.md, the contract pages, ci.md and the design notes
  described removed members and pre-#253/#254 behaviour, stale counts
  (src 48 -> 53 .cpp, 66 -> 70 indicator classes, 43/33/10 -> 46/35/11
  NativeRunSpec fields, floors 786/298 -> 790/300), wrong anchors, drawings
  as absent, and transpiler status of an old codegen (now "on codegen main,
  not in a release yet" where it differs from v0.10.4).
- Hygiene: internal host names, personal paths, private-repo references and
  campaign tool names marked or removed; the banner image's stale
  "V0.8.0 / 245/246 / 0 engine bugs" strip removed; a dead
  pineforge-workflow-live link replaced by the public pineforge-live repo.
- Two orphan pages, docs/cheatsheet-runtime-and-execution.md and
  docs/tv-parity-probe-spec.md, were wrong in their load-bearing claims
  (17 removed engine members, pointvalue/FX/slippage claims) and nothing
  linked them: deleted.
- Sample outputs were stale: every page and the tutorial README printed the
  tutorial MACD as 49 trades / -190.85; since 650b0cb (in v0.13.1) the report
  counts the range-end close, and every harness prints 50 / +569.97 (runs on
  a clean clone of this branch). examples-python-sweep.md's 10000 capital
  could not pay for its 1-BTC order (every combo 0 trades): 100000, output
  re-measured. examples-multi.md output format matches multi.py; the
  magnifier A/B page shows today's run. The report fields script_tf_ratio
  and needs_aggregation print their contract values again on this base
  (FIX-E1E2, #299; tutorial/run_mtf.py Table A: ratio 1/1/4/16, agg
  0/0/1/1), so the pages state them as plain facts.
- Doxygen: `file:line` in four pages autolinked to a dead "file:line" URL;
  spelled `path:line` now. Build: 0 warnings.

Review fixes (REVIEW-DOCS-ENGINE-final.md, verdict MERGE-WITH-FIXES, of the
first version of this change, 79bd84c1 + 6cb01aa0): its five P2 findings with
the reviewer's fix text, and every P3 row but the last.

P2
1. docs/pages/metrics.md: a timestamped FX curve no longer fails closed for a
   leveraged position across a rate change; that position takes the
   broker-open margin checkpoint at the step bar's open
   (tests/test_affordability_fx.cpp:152-154, :781).
2. docs/pages/report-schema.md: the #254 caveat sat inside the table, so the
   bar_magnifier_enabled row rendered as text; it now follows the table.
3. CONTRIBUTING.md, docs/pages/getting-started.md: compiler minimums are the
   ones README.md states (floating-point std::to_chars, src/str_utils.cpp:55:
   libstdc++ from GCC 11, libc++ 14, macOS 13.3; g++-9 and g++-10 fail).
4. docker/README.md: the sample is the published image's run (50 trades,
   17/33, +569.97, trade 1 entering 1777488300000).
5. docs/pages/mtf.md: expected Table A says main prints 0 in ratio and agg?
   until the #254 regression is fixed.

P3
- configuration.md, CHANGELOG.md, coverage.md: v5 scripts do not "keep" host
  defaults (both codegens refuse //@Version=5); code from an earlier codegen
  and a hand-built PineStrategyConfig do.
- streaming.md: "Every strategy_stream_* call above" (create/free return no
  status).
- examples-multi.md: a module also exports std::piecewise_construct.
- integration-cmake.md: EXACT 0.13.1 also matches a git-checkout build of
  main; the ABI promise starts "From 1.0.0".
- ffi-python.md, tutorial-macd.md: the mirror covers the report structs, not
  every struct (ffi-python.md:15-17).
- configuration.md: tracing costs one branch per traced call when disabled
  (report-schema.md:180), not zero.
- benchmarks/results/raw/README.md: "Two edits were made" (host_name was
  rewritten in every Google Benchmark file); benchmarks/README.md: the
  maintainer fetch runs with the campaign environment sourced. Wording only.
- AGENTS.md: the configure line exports compile commands, which the receipt
  check needs; AGENTS.md and docs/ci.md: promote-baseline.yml is installed
  from the campaign copy, not unchanged (31 lines differ).
- docs/ci.md: the debug profile also skips the twin-parity guard
  (TWIN_PARITY_PROFILES).
- mtf.md, timeframes.md: "reported for an engine fix" dropped (no public
  issue).
- native-feature-parity.md: the C API "landed on main", not "shipped".
- tutorial/README.md: Table B's script_tf_ratio prints 0 on main until the
  #254 regression is fixed.

Not changed here: benchmarks/results/summary.md and trade_comparison.md keep
the first version's text (hand edits of generated output; fixing the generator,
benchmarks/compare.py:361 and scripts/verify_corpus.py:1403, is an
engine-lane follow-up). No benchmark number or results file changes beyond
the raw/README.md and benchmarks/README.md wording above: BENCH-REFRESH is
re-measuring the benchmark.

Rebased onto 4dc496d (FIX-E1E2, #299), squashed to one commit. docs/ci.md
states the new floors: PR registration 773 (debug, sanitizers) and 782
(native), full-run release 792 and kernel 300 (scripts/ci_verify.py:320,
:594, :638). The one rebase conflict, a native-refactor-progress.md row,
keeps main's re-anchored lines and this change's host-name removal.

Sentences this commit deletes or rewrites past recognition, named by the
commit that introduced them (scripts/check_doc_reverts.py):
- a4ab775 (docs: source-verified runtime-overrides + order-execution cheatsheet): cheatsheet-runtime-and-execution.md (142)
- 480fd19 (Production-readiness probes + engine state-reset / finite-fill fixes (): tv-parity-probe-spec.md (61)
- 28ad088 (docs: add Part 3 (cross-cutting behaviors) to engine cheatsheet): cheatsheet-runtime-and-execution.md (60)
- a8f84b9 (docs(api): OpenCV-style C ABI reference site + CF Pages deploy): abi-stability.md (21), tutorial-macd.md (3), examples-magnifier.md (2), examples-multi.md (2), getting-started.md (2), index.md (2), report-schema.md (2), examples-rust.md (1), ffi-python.md (1), install.md (1), lifecycle.md (1)
- cc4a56e (docs: add Pine v6 runtime coverage report (docs/coverage.md)): coverage.md (37)
- 24dcc53 (docs: reconcile Pine v6 audit + coverage docs with the 2026-06-10 audi): pine_v6_coverage_detail.md (29)
- d093560 (INT26: wave H, the late picks and the corpus re-pin to b40aa8e (1.0.0-): native-refactor-progress.md (13), install.md (3), pine-to-native.md (2), CONTRIBUTING.md (1)
- 73817c1 (Lower generated Pine execution onto the native kernel and retire the l): cheatsheet-runtime-and-execution.md (8), README.md (3), tv-parity-probe-spec.md (2), reservation-expansion-candidate.md (1)
- b1fbf0b (docs: detailed Pine v6 coverage report (per-identifier audit)): pine_v6_coverage_detail.md (14)
- 622d653 (docs(README): rewrite for the round-11 engine — brand-first, OSS-first): README.md (12)
- 46b2ced (docs: ABI v4 live surface; cheatsheet corrections (trail_price is read): cheatsheet-runtime-and-execution.md (7), README.md (3), live-surface.md (2)
- c45cf5a (refactor: move retained-parent priority into Pine compatibility): README.md (7), pine-order-priority-boundary.md (4)
- c1084ff (docs: record round 39 fractional price admission parity): README.md (10)
- f268342 (feat: add historical account FX lifecycle (#125)): cheatsheet-runtime-and-execution.md (10)
- af4c688 (Document realtime streaming lifecycle): cheatsheet-runtime-and-execution.md (5), coverage.md (3), examples-python-sweep.md (1), tutorial-macd.md (1)
- 9507d8f (refactor(corpus): pull equity-mirror into corpus/parity-anomalies/): coverage.md (10)
- 76482e6 (fix(runtime): align TA coverage and corpus replay): coverage.md (9)
- cc0b22d (Refactor reservation growth and Pine market instruction ownership): fill-model.md (7), frozen-market-instruction.md (2)
- d5a5eaf (Align lifecycle and admission documentation with final v11 model): market-admission.md (9)
- a6b0b70 (docs(audit): exhaustive Pine v6 coverage audit — 38 critical, ~62 mino): pine_v6_audit_master.md (7)
- 1e360bd (INT27: wave I -- magnifier on TradingView's intrabars, recalculation f): cheatsheet-runtime-and-execution.md (5), magnifier.md (1)
- 1dd5430 (Add the native feature-parity design: gaps, kernel-vs-adapter rulings,): design/native-feature-parity.md (6)
- 74491fa (INT28: wave-J engine integration (TVDEF-DROPS, W3/W3B/W4/W5/W6/W6B/W8,): cheatsheet-runtime-and-execution.md (4), README.md (1)
- 7ad5d38 (docs: refresh parity scoreboard through round 23): README.md (5)
- 7f807b9 (Another symbol's bars reach a run as a feed: kernel instrument feeds +): coverage.md (4), mtf.md (1)
- 3b13183 (Refactor order admission and trigger lifecycle into generic submodels): exit-leg-lifecycle-reflection.md (5)
- e244d65 (docs(coverage): update pine_v6_coverage_detail.md for post-sprint stat): pine_v6_coverage_detail.md (5)
- f864be5 (refactor: isolate Pine cap policy from native order state): cheatsheet-runtime-and-execution.md (2), pine-intraday-cap-boundary.md (2)
- e7cdf05 (Add native execution terms: host-resolved sizing, exact reversal, prec): abi-stability.md (2), native-engine.md (2)
- b4dd9a3 (docs(mtf): add multi-timeframe tutorial + Doxygen page): mtf.md (4)
- 5c2be9d (docs: record round 38 whole-lot budget parity results): README.md (3)
- 6bfe983 (docs: align round 39 lane table and diagnostic evidence): README.md (3)
- 471a113 (Docs: the README carries the 200-strategy refresh -- tiers per engine ): README.md (3)
- 8df08f2 (fix(engine): make dead strategy.close semantically inert (#143)): cheatsheet-runtime-and-execution.md (3)
- d3cca9e (Docs: correct migration semantics and harden publication guards): cheatsheet-runtime-and-execution.md (2), pine-to-native.md (1)
- 52f4dde (Preserve complete mirror context and earlier standalone ABI controls): fill-model.md (3)
- 4fb9db3 (Docs: CONTRIBUTING.md rewritten for someone who has never seen this re): CONTRIBUTING.md (2)
- 2ab2bfb (docs(README): round-11 closed-test results and a full factual refresh): README.md (2)
- 0501468 (docs: task-13 fix round 1 — v4 report mirrors (schema, Rust), probe-su): README.md (1), cheatsheet-runtime-and-execution.md (1)
- cfbe677 (Docs: the session flags end a session where TradingView ends it (R5 la): cheatsheet-runtime-and-execution.md (2)
- 6aa1d13 (runtime: wire syminfo.pointvalue through all money paths; hold ScopedT): coverage.md (2)
- 8b7965a (Docs: onboarding written for the contributor who is a language model (): contributing-llm.md (2)
- 16f3652 (Docs: the two site front doors re-derived against HEAD (R5 lane L14-B,): index.md (2)
- 04b0588 (Add native resolved execution settlement and preserve paid entry costs): metrics.md (2)
- 149f77c (Replace seven pending-order flags with quantity and event facts): quantity-intent.md (2)
- 962960b (Session flags match TradingView on multi-window and extended-hours cha): pine_v6_coverage_detail.md (2)
- 5215291 (Merge branch 'round5/bar-indexed-extremes-ring' into round5/candidate): pine_v6_coverage_detail.md (2)
- b1b27f0 (Initial commit: PineForge runtime v0.1.0): CONTRIBUTING.md (1)
- bfdbe96 (docs: refresh parity scoreboard through round 24): README.md (1)
- cda51d5 (Record the round 35 parity scoreboard and raw trade gains): README.md (1)
- 0d76a09 (Wave G: no ordinary quantity request stops a run, cancelled exits stay): adr/0001-kernel-adapter-boundary.md (1)
- 0983770 (Unify remaining fill paths under native settlement (#247)): ci.md (1)
- 50339d0 (Docs: the §1 inventory carries its closure markers, and a gate keeps t): design/native-feature-parity.md (1)
- 8b3b481 (docs+fix: org rename to pineforge-4pass; AI capability-gap note in REA): examples-multi.md (1)
- c28c2db (Derive placement state from original admission observations): fill-model.md (1)
- 208f00b (docs: refresh ctest count + run_strategy usage example): install.md (1)
- 0c174d9 (Docs: the arm options, the adoption table and the grid re-lowering wai): native-engine.md (1)
- 4b05b62 (Adapter re-lowering: the TradingView margin call runs through the kern): native-engine.md (1)
- 8e558eb (Say what the per-bar broker hash is for, where its API is documented (): native-engine.md (1)
- 5f3299d (Build the standalone native execution path (#243)): native-engine.md (1)
- b18f75e (Native sizing bases and fractional reduces (R5 lane L3)): native-engine.md (1)
- 0ef00da (The pages say a working row tells an absent arm from an arm at 0.0 (R5): native-engine.md (1)
- 7328f4d (Docs: the migration page is a complete map, and a gate holds it comple): pine-to-native.md (1)
- ce64f06 (docs(audit): update Pine v6 master audit — mark 20 resolved critical i): pine_v6_audit_master.md (1)
- a19f5a8 (docs: repoint codegen references to pineforge-codegen-oss; purge old f): pine_v6_audit_master.md (1)
- 2db58d9 (runtime: reconcile per-trade MFE/MAE with TV excursion semantics; gate): pine_v6_audit_master.md (1)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
@luisleo526
luisleo526 deleted the refactor/adapter-lowering-20260914 branch October 5, 2026 02:43
luisleo526 added a commit that referenced this pull request Oct 12, 2026
… private fixtures (#375)

Squash of #375 (one commit on b802cee = v1.5.0; tree 18d3b6f). Its commit message follows verbatim.

tests: the ten test files that embed US-equity price data are private…

… rows (Form B)

Ten files leave the public tree for pineforge-private-fixtures (byte-exact
copies, commit 5abcf8a6): tests/test_ta_series_length_data.hpp,
test_ta_series_length_extremes.cpp, test_ta_series_length_supertrend.cpp,
test_ta_simple_length.cpp, test_ta_window_underapplied_data.hpp,
test_ta_window_underapplied.cpp, test_ta_window_round10_data.hpp,
test_ta_window_round10.cpp, test_tv_fill_rounding.cpp,
test_tv_fill_rounding_l4d.cpp. Their data headers and tables hold NYSE:F 15m
bars, NASDAQ:AAPL closes and TradingView indicator values on NYSE:F@15.

Six rows become private rows registered the #371 way (the real test when the
overlay supplies the source, a SKIP placeholder with the pinned literal
otherwise): test_ta_series_length_extremes, test_ta_series_length_supertrend,
test_ta_simple_length, test_ta_window_underapplied, test_ta_window_round10,
test_tv_fill_rounding_l4d. test_tv_fill_rounding (not the _l4d twin) was
already retired through L3A_LEGACY_OWNER_TEST_SOURCES and registers no row; its
source leaves and its name stays in that retirement list (REMOVE_ITEM of an
absent name is harmless).

The four source-bound rows are recorded in _pf_source_bound_private_rows so the
kernel profile, which has no source layer, stays correct without the files.
Pins: tests/private_fixture_rows.txt 368 -> 374 rows (and
PRIVATE_FIXTURE_ROW_COUNT), tests/private_fixture_paths.txt +10 F lines (10,206
files, 12,910 paths, 2,704 directories). Floors: release private count 300 ->
306 (absent floor 610 -> 604), kernel private count 28 -> 30 (only the
underapplied and round10 rows are source-free; absent floor 309 -> 307); full
totals 910 and 337 are unchanged.

Doc sentence reworded, named here for the doc-revert gate: "The full-run
release and kernel floors are the table's own numbers above (610 and 309 rows
absent, 910 and 337 with the overlay present); full runs do not exclude a
label." now says 604 and 307 for the absent floors; the two cells of the floor
table in docs/ci.md change the same way (610 -> 604, 309 -> 307).

None of our release-built assets contains these files: the prebuilt tarballs
are cmake --install with PINEFORGE_BUILD_TESTS=OFF plus LICENSE/NOTICE/VERSION
(release.yml, the build at line 399 and the pack step at 433); only GitHub's
automatic source archive carries tests/. Git history is not rewritten (owner
ruling 10-11). First added: test_tv_fill_rounding.cpp 7fc7347 (2026-08-25,
#163), test_tv_fill_rounding_l4d.cpp 73817c1 (2026-09-19, #254),
test_ta_window_underapplied* ade627e and test_ta_window_round10* c8993aa
(2026-09-06), test_ta_series_length_*, test_ta_simple_length.cpp 1e360bd
(2026-09-27).

Two existing gates carried the old numbers and move with the floors (found by
the Claude read of the first cut): scripts/test_ci_verify.py (the literal pins
(910,306)/(337,30) and absent floors 604/307, the kernel absent scenarios now
with 30 pinned rows, the explicit --min-tests 307 case, the one-row-ran case
337 - 29 = 308, the websocket allowance case 337 - 30 - 1 = 306; the shrunken
release registry 901/298 -> 603 still fails the 604 floor; dated measurements
stay as history) and tests/private_fixture_reads.evidence (the CMake line it
cites moved by -2: 3253 -> 3251, prose cites :3273 -> :3271, :3237 -> :3235,
:3249 -> :3247, :3279-3280 -> :3277-3278). A comment in tests/CMakeLists.txt
that cites the two gate suites follows (:2217/:2219 -> :2215/:2217).

Not run locally (no suites on the Mac); the two-world proof runs on lab remote.


Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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