Skip to content

harness: derive chart feeds from the corpus's single committed 1m feed#59

Merged
luisleo526 merged 2 commits into
mainfrom
feed/single-1m-derive
Jul 2, 2026
Merged

harness: derive chart feeds from the corpus's single committed 1m feed#59
luisleo526 merged 2 commits into
mainfrom
feed/single-1m-derive

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Companion to corpus PR #5 (merged, a84307d): the corpus now ships exactly one feed — full-history 1m via Git LFS — and this PR teaches the harness to derive everything else from it.

New: scripts/derive_corpus_feeds.py
Materializes into corpus/data/derived/ (gitignored): the full-history 900s resample (default 15m chart feed) and its comparison-window slice (cold-start probes, benchmark runners, window-bounds reference). Idempotent (mtime-gated), pure-local, guards against unsmudged LFS pointers.

Rewired consumers

  • run_strategy.py: feed constants → derived paths; ensure_derived() at main() entry (module import stays side-effect free for ABI-mirror importers).
  • run_corpus.sh: derive step before build.
  • crossvalidate_metrics.py: ensure after arg parse.
  • benchmarks (compare.py, run_pinets_canonical.mjs, run_pineforge_canonical.cpp, run_pynecore.py): corpus fallback → derived window slice, keeping bench inputs bar-identical with the historical baseline.
  • CONTRIBUTING.md feed wording.

Semantics: native-15m engine execution unchanged. Derived 15m verified bar-identical to the old committed files except two warmup bars on the 2024-10-28 outage day, one 0.01 in-window open (Binance's 15m kline disagrees with its own 1m klines during a flat outage), and a fuller final partial bucket — the corpus PR refreshed 24 engine_trades.csv with ≈0.02 cumulative-PnL ripples accordingly.

Gate: ctest 78/78; corpus sweep 252/252 ok; verify_corpus.py --all = excellent=251 / anomaly=1 (exact baseline hold, re-verified after merge-state amend).

🤖 Generated with Claude Code

https://claude.ai/code/session_01CnvqmHPmgUpeu2fz6A1mMU

luisleo526 and others added 2 commits July 2, 2026 22:53
The corpus now ships exactly one feed: data/ohlcv_ETH-USDT-USDT_1m.csv
(full-history Binance ETH perp 1m, Git LFS). New
scripts/derive_corpus_feeds.py materializes the 15m chart feeds into
corpus/data/derived/ (gitignored): a full-history 900s resample (the
default chart feed) and its comparison-window slice (cold-start probes,
benchmark runners, window-bounds reference). Derivation is idempotent
(mtime-gated), pure-local, and guards against unsmudged LFS pointers.

- run_strategy.py: feed constants point at the derived files;
  ensure_derived() runs at main() entry (import stays side-effect free
  for ABI-mirror consumers like crossvalidate_metrics).
- run_corpus.sh: derive step before the build.
- crossvalidate_metrics.py: ensure_derived() after arg parse.
- benchmarks: corpus fallback paths now the derived window slice, so
  bench inputs stay bar-identical with the historical baseline.

Native-15m engine execution is unchanged — the resample was verified
bar-identical to the old committed 15m files except two warmup bars on
the 2024-10-28 outage day, one 0.01 in-window open (Binance's 15m kline
disagrees with its own 1m klines during a flat outage), and a fuller
final partial bucket. Gate: ctest 78/78; corpus 252/252 ok,
excellent=251/anomaly=1 exact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CnvqmHPmgUpeu2fz6A1mMU
Corpus PR #5: one committed feed (data/ohlcv_ETH-USDT-USDT_1m.csv,
full-history 1m via Git LFS); 15m chart feeds derived locally by
scripts/derive_corpus_feeds.py; private-infra rebuild script removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CnvqmHPmgUpeu2fz6A1mMU
@luisleo526 luisleo526 merged commit 517cf6e into main Jul 2, 2026
5 checks passed
@luisleo526 luisleo526 deleted the feed/single-1m-derive branch July 2, 2026 14:59
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