Skip to content

tests: recorded US-listed, futures, forex and metal tapes move to the private fixtures (LVB-60) - #202

Merged
luisleo526 merged 12 commits into
mainfrom
lv/codegen-us-tapes-private
Oct 13, 2026
Merged

luisleo526 merged 12 commits into
mainfrom
lv/codegen-us-tapes-private

Conversation

@luisleo526

@luisleo526 luisleo526 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Recorded market data of US-listed stocks, US futures, forex and spot metals no longer lives in this repository. 85 files leave the tree:

  • 24 files in seven directories (US-listed stock tapes under tests/fixtures/{session_ismarket,host_member_names,lazy_held_source}/),
  • 60 files in fifteen directories (futures, forex and spot-metal tapes under tests/fixtures/session_ismarket/ and tests/fixtures/c7_tv_evidence/tv-eurusd),
  • one trade list under tests/fixtures/tail_f_tv/.

They move byte for byte to the private fixtures repository, and the lab overlays them onto the paired engine tree under tests/codegen-fixtures/.
The tests that read them go through one helper, tests/_private_fixtures.py::private_fixture(rel):

  • the file is there: the test runs exactly the assertions it ran before;
  • the file is not there and no overlay was asked for: the test skips with private fixtures not present: <path>;
  • the file is not there although PINEFORGE_PRIVATE_FIXTURES is set: AssertionError, never a skip, so a broken overlay cannot turn a private test into a silent pass.

Prose that quoted dates, counts, hashes or tickers of the moved tapes (READMEs, AGENTS.md / CLAUDE.md, comments and docstrings in 17 files) now says "a US-listed stock" or describes the outcome in words. Comment and docstring edits are AST-equal to before (checked per file).

How the tests changed (no assertion lost)

  • Seven test modules read tapes through the helper (test_e2e_session_ismarket, test_e2e_session_windows, test_e2e_session_history, test_e2e_tail_f_tapes, test_host_member_names, test_e2e_lazy_held_source and test_e2e_cgint4_compositions), plus three recursive source scanners (test_diagnostic_codes, test_input_metadata_receipt, test_e2e_security_epoch_int64) whose private sources become one visibly gated case each.
  • An explicit tuple of private slugs replaces substring routing, so a new private slug can never be read from the public folder by accident.
  • Assertions that can only hold with every tape present moved, with their original text, into private-gated tests: the set totals ({"hm-g236": 1138, "cgim-flags": 1138}), the daily chart's whole-session flags, the nine-tape first/last map with its break/reopen loop. The public export tests assert each remaining public tape on its own. Public test ids do not change.
  • The helper is specified first (a red run is on record: the helper test fails at import on the commit before the helper exists) and its tests fail, not skip, on an unexpected skip.
  • The per-source host-member test asserts exactly one source transpiled, so a private source that stops compiling cannot pass silently.

Verification

Two worlds on the lab, paired with engine main (companion tree 7da487ab):

world result
absent (private files not overlaid) pytest 9781 passed, 221 skipped, 0 failed (10,002 tests collected); corpus compile 312/312; gate passed
overlay (private fixtures overlaid) pytest 9936 passed, 66 skipped, 0 failed (10,002 tests collected, the same count as the absent run); no skip names a missing private fixture

Both rows are for the head of this PR. The overlay job first ran on a build host that a foreign process had loaded to 64 cores and timed out; it was resubmitted and ran on another host. That host has no clang++, so the 24 host-member cases (22 private sources and 2 public) skip with "needs clang's AST dump" in this run. They ran, and passed, in the overlay run of the previous head of this branch (23cd0017: pytest 9962 passed, 36 skipped, 0 failed, 9,998 tests collected, no private-fixture skip, on a host with clang++); tests/test_host_member_names.py and the private sources did not change between the two heads. The other 42 skips of the overlay run are environment skips of the kinds the absent run also has (the pre-lane codegen is not in the checkout's history, empty parameter sets, string-settings population sources). The difference between the two worlds is the tests that need the moved tapes: they skip in the absent world and run in the overlay world.
Two independent Claude reads of the diff (read-only, raw permission records empty) found no faked pass, no lost or loosened assertion and no private read at import or collection; their fixes are in.

Not in this PR

Git history is not rewritten. ta.py:764 and NO_HISTORY_READ_REASON keep a dated string (emitted text; later, with a regeneration note). Wording of the exporter tool name in a few pre-existing lines is a separate change.

🤖 Generated with Claude Code

luisleo526 and others added 12 commits October 13, 2026 13:55
…d: the helper does not exist yet)

Fixtures that cannot stay public are overlaid by the lab onto the paired engine tree under tests/codegen-fixtures/, never onto this
repository. test_private_fixture_helper.py states how a test finds one through tests._private_fixtures.private_fixture(path):
the file is there, the file is absent and no overlay was asked for (the test skips with "private fixtures not present: <path>"),
the file is absent although the job says the overlay is present (PINEFORGE_PRIVATE_FIXTURES set: a failure, never a skip), no
engine dir is known (the absent world), and a path that leaves the folder is refused. The module does not exist in this commit, so
the file fails at collection; the next commit adds it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ree, or skips, or fails when the overlay is there

tests/_private_fixtures.py adds private_fixture(rel): the path of tests/codegen-fixtures/<rel> under the paired engine tree
(PINEFORGE_ENGINE_INCLUDE is <engine>/include, as for the rest of the suite). Present: the path. Absent and no overlay:
pytest.skip("private fixtures not present: <rel>"). Absent while PINEFORGE_PRIVATE_FIXTURES is set: AssertionError, so a
broken overlay can never turn a private test into a silent pass. A path that is absolute or leaves the folder is refused.
This is the module the previous commit's test file specifies.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…re; READMEs and root docs become stubs

Five test modules read seven US-stock tape directories from this repository. They now resolve every file with
tests/_private_fixtures.private_fixture, which finds the tapes in the paired engine tree's tests/codegen-fixtures/ (the lab overlays the
private repository there), skips when a tape is absent and fails when the overlay is declared but a file is missing. No assertion, expected
value, tolerance or existing test ID changes; the replays of session_history and session_ismarket load lazily per tape so a public-only
case no longer needs a private file, and the host-member battery lists the seven private sources as eight new, separately skipping cases
instead of scanning them inside the public battery. The three fixture READMEs become short stubs, and AGENTS.md and CLAUDE.md say
"a US-stock tape kept in a private repository" in the three sentences that named a tape.

* tests/test_e2e_lazy_held_source.py, tests/test_e2e_session_history.py, tests/test_e2e_session_ismarket.py
* tests/test_host_member_names.py, tests/test_e2e_cgint4_compositions.py
* tests/fixtures/session_ismarket/README.md, tests/fixtures/host_member_names/README.md, tests/fixtures/lazy_held_source/README.md
* AGENTS.md, CLAUDE.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…or hashes of a US-listed stock

Fourteen public files named a US ticker with the dates, trade and bar counts or hashes of a real capture, only in prose. They now
say "a US-listed stock" or "a daily US-stock probe (tapes kept outside this repository)" and describe outcomes in words ("matched
every TradingView trade") instead of counts. No code, string argument, assertion, test name or expected value changes: the Python
files compare equal as syntax trees once docstring-only statements are set aside, except that the text of _EVERY_BAR_RULE_NOTE
(a documentation string that only a docstring points at, no assertion reads it) is reworded; every README table is byte-identical.
Ticker strings that are inputs of the API under test stay where they are (tests/test_recorded_requests.py).

* tests/fixtures/strategy_defaults/README.md, tests/fixtures/tail_e_tv/README.md, tests/fixtures/w2_trio_tv/README.md, tests/fixtures/xsym_tv/README.md
* tests/test_codegen_validation_fixes.py, tests/test_e2e_session_windows.py, tests/test_e2e_syminfo_mincontract.py, tests/test_external_requests.py
* tests/test_foreign_requests.py, tests/test_lazy_source_clock.py, tests/test_lazy_source_clock_runtime.py, tests/test_recorded_requests.py
* tests/test_vwap_property_source.py, tests/test_lazy_edge_ta_every_bar.py

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e (they live in the private repository)

Twenty-four files in seven directories under tests/fixtures/{session_ismarket,host_member_names,lazy_held_source}/ are deleted. The same
files, byte for byte (sha256 checked against this tree's previous commit), are in the private fixtures repository under
tests/codegen-fixtures/ and reach the tests through tests/_private_fixtures.private_fixture. Without the overlay the tests that read them
skip; with it they run as before. Nothing else is touched in this commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e say "a US-listed stock"

A docstring in tests/test_e2e_session_ismarket.py and one sentence each in AGENTS.md and CLAUDE.md still spelled the ticker and chart of the
extended-hours tape that now lives in the private repository. Prose only: no code, assertion or test ID changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… named a ticker with result counts

Five spots in each of the two root documents (the requests-of-other-symbols row, the recorded-requests row, the library-imports row, the
requests-with-no-data row and the lazy-edge ta rule 15) named NASDAQ:AAPL or NYSE:F with the chart, result counts ("4/4", "5/5") or the
pinning date of captures that are not in this repository. They now say "a US-listed stock" and describe the outcome in words. Prose only: no
code, test, name or assertion changes; the two files stay identical in these rows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…gh private_fixture; helper tests fail on an unexpected skip

Owner ruling 2026-10-13 (US-SCOPE-1300): recorded market data of US futures, forex and spot metals is never public, like US equities. Sixteen
more tapes (15 directories of ES1!, EURUSD, XAUUSD and ZC1! trade lists, and the TVC:DXY trade list of tail_f_tv) are read through
tests/_private_fixtures.private_fixture. Readers: session_ismarket, session_windows, vwap_anchor (docstring only: the test never read the EURUSD
tape), host_member_names, tail_f_tapes, and the three recursive source scanners (diagnostic codes, input-metadata receipt, security-epoch
narrowing), whose private sources become one visibly gated case each.
The explicit tuple of private slugs replaces the "-aapl-" substring routing. No assertion, expected value, tolerance or public test ID changes.
Assertions that can only hold with every tape present moved into private-gated tests, with their original text: the set-wide
{"hm-g236": 1138, "cgim-flags": 1138} bar totals, the daily chart's 17:00 and whole-session-day flags, the nine-tape first/last-open map of
session_windows with its break/reopen loop (the public export test asserts each public tape on its own against the same map entries).
Helper tests (fixes from the Claude read of the first six commits): a test that must not skip now fails on a skip; the overlay-set
missing-file test cannot stay green for a helper that skips; the traversal test is hermetic and has a target; new tests for a present file
with the overlay set, an absolute path, and an empty overlay variable (counts as absent). The per-source host-member test asserts that
exactly one source transpiled. Fixture READMEs lose the Strategy Tester wording, a session count and a date span; the three stubs and the
moved tapes' tables are replaced by short private-repository notes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lic tree (they live in the private repository)

Fifteen directories (session_ismarket: ES1! x6, EURUSD x2, XAUUSD x3, ZC1! x3; c7_tv_evidence/tv-eurusd; 4 files each) and
tail_f_tv/barmerge_values_tv_trades.csv are deleted. The same 61 files, byte for byte (sha256 read back against this tree's previous commit),
are in the private fixtures repository under tests/codegen-fixtures/ and reach the tests through tests/_private_fixtures.private_fixture.
Without the overlay the tests that read them skip; with it they run as before. Nothing else is touched in this commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… they named a ticker with dates and counts

pineforge_codegen/analyzer/call_handlers.py (one comment), codegen/session_market.py (module docstring, one phrase) and codegen/ta.py (three
comments) named NYSE:F or NASDAQ:AAPL with the range, the pinning date or the trade counts of captures that are not in this repository.
Comments and a docstring only: the three files compare equal as syntax trees once docstring-only statements are set aside. The ticker examples
in helpers_syminfo.py are instrument-spec names and stay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ass ratios, dates or tape names of the moved captures

The long comment block above the lazy-edge hoist in pineforge_codegen/codegen/ta.py, its method docstring and the rule-15 style table quoted pass
ratios ("25/25", "ring 39/39", "38/39", "8/9, 28, 27 and 2/39"), a regression count and two pin dates of captures that are not in this
repository; types.py named a futures tape slug with a date, visit_expr.py a daily US-stock tape slug with a date. They now say what the rule is and
that the recorded probes agree or disagree, without counts, dates or slugs. Comments and docstrings only: the three files compare equal as
syntax trees once docstring-only statements are set aside. The two strings that still carry a date (the NO_HISTORY_READ_REASON class constant and
the warning text near ta.py line 760) are emitted or compared text and stay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…erlay without an engine tree, a path that climbs out after a descent, and a directory at the path

Three more tests close the gaps the second Claude read named (P2): with PINEFORGE_PRIVATE_FIXTURES set and no PINEFORGE_ENGINE_INCLUDE the helper must raise
AssertionError naming the path, not skip; "a/../../x.csv" is refused with ValueError (a real file sits at the climbed-to place, so a missing guard would
return it); a directory at the path is not a fixture (skip without an overlay, AssertionError with one). tests/_private_fixtures.py is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@luisleo526
luisleo526 marked this pull request as ready for review October 13, 2026 09:08
@luisleo526
luisleo526 merged commit 2aef6e5 into main Oct 13, 2026
16 of 22 checks passed
luisleo526 added a commit that referenced this pull request Oct 13, 2026
The entry for the planned 1.6.0 release, in the form the 1.5.0 entry had at
v1.5.0-rc.1: planned number, exact pair with engine v1.6.0 (1.6.0-rc.1 pairs
with engine v1.6.0-rc.1), and the changes since 1.5.0 (#200, #201, #202).

The analyzer and the code generator do not change behavior: the only edits
under pineforge_codegen/ since v1.5.0 are comments and docstrings in five files
(#202; the Python syntax tree of each file, docstrings removed, is identical to
v1.5.0's), so the emitted C++ and the Python and JSON contract are unchanged.
The entry says so and points to the release note policy for the
regenerate-and-relink rule. The README, docs/ and VERSION are unchanged; the
pairing row, the current-version lines and the date are set when the release
is prepared.
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