Skip to content

engine: calendar/session auxiliary routing, HTF completion, and lot flooring fixes (factorial H·A·B) - #167

Merged
luisleo526 merged 6 commits into
mainfrom
codex/fusion-r2-h-a-b-gate
Aug 31, 2026
Merged

luisleo526 merged 6 commits into
mainfrom
codex/fusion-r2-h-a-b-gate

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Engine fixes from the parity campaign's factorial analysis (factors H·A·B fusion): calendar/session auxiliary routing, singleton HTF bucket completion at session close, and integer/epsilon lot flooring.

Deterministic pr-gate: PASS

Measured on Cloudflare Containers over the pinned parity population, judged against the campaign bootstrap baseline (pineforge-parity-baseline-20260828).

surface result
hard — ETHUSDT.P@15 (engine corpus + scraped ETH, 708 probes) 0 regressions
target — every other symbol/timeframe pooled (3495 probes) net +32 (62 entered excellent+strong, 30 left)
coverage 4221 / 4221 comparable, 0 unmeasured
verdict PASS
  • baseline: engine 8103ef752d84b51ad90954b0f517c912909c51ec, codegen 5575a185a0f27d760c317781de3a84e275e38e17, snapshot 48577493a02d36af0cea69c1376762159b0d107ae9a698643114ca6d45d1b08e
  • candidate: engine 9d40d287af800761095296a0bb59cea073e6e577 (codegen unchanged), snapshot efdcf479673677b49343f7695235b5f41e8f038564169e938be297a7d9584bd2
  • gate verdict recorded on the campaign control plane: experiment pr-gate-pineforge-parity, event verdict-9d40d287af80-5575a185a0f2-308878d017a0

Follow-up: the candidate build hit 68 engine-errors (probes where the new code fails to transpile/compile) vs the baseline's ~4 — none on the ETH hard surface, so the gate still passes, but worth a look before the next iteration.

Commits

  • 9d40d28 fix: tolerate binary residue in lot flooring
  • 02580b9 fix: reserve minimum integer lot for percent exits
  • 24e8535 fix: complete singleton HTF buckets at session close
  • 47573c2 fix: route calendar auxiliary feeds by native intervals
  • 190ac14 fix: route auxiliary calendar bars by trading period
  • 1328721 factorial: e [engine]

from __future__ import annotations

import tempfile
import unittest
from pathlib import Path
from unittest import mock

import run_strategy as rs
luisleo526 added a commit that referenced this pull request Aug 31, 2026
main's ruleset requires a status check named `build`, but the matrix job
reports as `build (ubuntu-latest, Release)` and friends -- no bare `build`
context ever appears, so every PR sits BLOCKED with all checks green (e.g.
#167). Add a tiny gate job named `build` that needs the matrix build and
passes only when all of it did, so the required context exists without
loosening the rule.


Claude-Session: https://claude.ai/code/session_01TAQsvZ3d6FsBUU6Y253SYg

Co-authored-by: Claude Opus 4.8 <[email protected]>
@luisleo526
luisleo526 force-pushed the codex/fusion-r2-h-a-b-gate branch from 9d40d28 to da77664 Compare August 31, 2026 17:49
@luisleo526
luisleo526 merged commit b935125 into main Aug 31, 2026
8 checks passed
@luisleo526
luisleo526 deleted the codex/fusion-r2-h-a-b-gate branch October 5, 2026 02:42
luisleo526 added a commit that referenced this pull request Oct 12, 2026
Move CODEGEN_COMMIT in scripts/regen_corpus_cpp.sh and the matching literal
and message in scripts/test_regen_corpus_cpp_pin.py from codegen a4259656 to
the codegen v1.5.0 commit 52101f9b7b540fece4493ddc7495451b6d85fc07. The
runtime image pin is unchanged.

Measured on one AWS spot box (c5.4xlarge, engine b802cee, corpus b40aa8ec,
docker transpile path, the exact edit of this commit applied by the round):
- the old-pin control regeneration is clean (314 sources, 0 drifted);
- all 314 regenerated generated.cpp change (312 validation probes and the 2
  draft probes), 0 transpile failures;
- fresh sweep of the old pin versus fresh sweep of the new pin on the same
  box: the engine trade lists of 312 of 312 validation probes are
  byte-identical; both headlines read excellent=311 anomaly=1;
- the pin test and the VERIFY=1 idempotence check after regeneration pass.

The regenerated files are in the paired pineforge-corpus change. Every file
gains the same 321 lines, which were introduced by the codegen between the two pins:
the coded run stops (codegen #184), the checked strategy settings and C ABI
exception containment (#159), and the compiled-execution, confirmed-bar and
order-shapes receipts (#167, #173, #178). 6 to 116 further lines per file
are probe-specific.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
luisleo526 added a commit that referenced this pull request Oct 12, 2026
Move the corpus gitlink from 9245f28a to e99bbd9db257740d9c77db37a8567616627130bf
and record it on the `# corpus` line of scripts/corpus_parity_baseline.txt. The
312 baseline digests do not change: the engine trade lists are byte-identical
(measured, below). Follows the pin commit of the same pull request.

The corpus change (the two commits on top of the removal/headers change) re-emits
all 312 validation generated.cpp with codegen 52101f9b7b540fece4493ddc7495451b6d85fc07
and re-derives the 60 generated_cpp_sha256 values of owned_strategies.json;
validation_run there still records the 2026-09-26 sweep.

Measured on AWS spot boxes:
- trades, in the pin round of the previous commit (engine b802cee, corpus
  b40aa8ec; b802cee..2dbd72f changes only tests and CI scripts, and the 312
  generated.cpp compiled there at the new pin are byte-identical to those in
  e99bbd9d): a fresh full sweep at the old pin and one at the new pin (same box,
  runtime, harness and feed) give byte-identical engine trade lists for 312 of 312
  validation probes; both verifier headlines read excellent=311 anomaly=1;
- with this engine (2dbd72f): the bytes in the corpus equal the new-pin
  regeneration of the final tree on a second box for 312 of 312 files, and
  VERIFY=1 scripts/regen_corpus_cpp.sh over the final tree reports 312 strategies,
  0 drifted, 0 failed to transpile.

Every generated.cpp gains the same 321 lines, which were introduced by the codegen
between the two pins: the coded run stops (codegen #184), the checked strategy settings and
C ABI exception containment (#159), and the compiled-execution, confirmed-bar and
order-shapes receipts (#167, #173, #178); 6 to 116 further lines per file are
probe-specific.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
luisleo526 added a commit that referenced this pull request Oct 13, 2026
…ve the corpus gitlink to e99bbd9 (#377)

build: pin the corpus regeneration to codegen 1.5.0 (52101f9b)

Move CODEGEN_COMMIT in scripts/regen_corpus_cpp.sh and the matching literal
and message in scripts/test_regen_corpus_cpp_pin.py from codegen a4259656 to
the codegen v1.5.0 commit 52101f9b7b540fece4493ddc7495451b6d85fc07. The
runtime image pin is unchanged.

Measured on one AWS spot box (c5.4xlarge, engine b802cee, corpus b40aa8ec,
docker transpile path, the exact edit of this commit applied by the round):
- the old-pin control regeneration is clean (314 sources, 0 drifted);
- all 314 regenerated generated.cpp change (312 validation probes and the 2
  draft probes), 0 transpile failures;
- fresh sweep of the old pin versus fresh sweep of the new pin on the same
  box: the engine trade lists of 312 of 312 validation probes are
  byte-identical; both headlines read excellent=311 anomaly=1;
- the pin test and the VERIFY=1 idempotence check after regeneration pass.

The regenerated files are in the paired pineforge-corpus change. Every file
gains the same 321 lines, which were introduced by the codegen between the two pins:
the coded run stops (codegen #184), the checked strategy settings and C ABI
exception containment (#159), and the compiled-execution, confirmed-bar and
order-shapes receipts (#167, #173, #178). 6 to 116 further lines per file
are probe-specific.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

corpus: move the gitlink to e99bbd9d (generated.cpp from codegen 1.5.0)

Move the corpus gitlink from 9245f28a to e99bbd9db257740d9c77db37a8567616627130bf
and record it on the `# corpus` line of scripts/corpus_parity_baseline.txt. The
312 baseline digests do not change: the engine trade lists are byte-identical
(measured, below). Follows the pin commit of the same pull request.

The corpus change (the two commits on top of the removal/headers change) re-emits
all 312 validation generated.cpp with codegen 52101f9b7b540fece4493ddc7495451b6d85fc07
and re-derives the 60 generated_cpp_sha256 values of owned_strategies.json;
validation_run there still records the 2026-09-26 sweep.

Measured on AWS spot boxes:
- trades, in the pin round of the previous commit (engine b802cee, corpus
  b40aa8ec; b802cee..2dbd72f changes only tests and CI scripts, and the 312
  generated.cpp compiled there at the new pin are byte-identical to those in
  e99bbd9d): a fresh full sweep at the old pin and one at the new pin (same box,
  runtime, harness and feed) give byte-identical engine trade lists for 312 of 312
  validation probes; both verifier headlines read excellent=311 anomaly=1;
- with this engine (2dbd72f): the bytes in the corpus equal the new-pin
  regeneration of the final tree on a second box for 312 of 312 files, and
  VERIFY=1 scripts/regen_corpus_cpp.sh over the final tree reports 312 strategies,
  0 drifted, 0 failed to transpile.

Every generated.cpp gains the same 321 lines, which were introduced by the codegen
between the two pins: the coded run stops (codegen #184), the checked strategy settings and
C ABI exception containment (#159), and the compiled-execution, confirmed-bar and
order-shapes receipts (#167, #173, #178); 6 to 116 further lines per file are
probe-specific.

Co-Authored-By: Claude Sonnet 5.5 <[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