Skip to content

Add the real promotion-gate snapshot ingest and a bounded scheduled paper trial - #84

Merged
seathatflowsinourveins merged 7 commits into
mainfrom
claude/paper-trial-readiness-20260922
Sep 23, 2026
Merged

seathatflowsinourveins merged 7 commits into
mainfrom
claude/paper-trial-readiness-20260922

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Owner

Summary

  • blueprints/us-equities/data/ingest_snapshot.py is the first real promotion-gate snapshot ingest. It writes the CSV that promotion_gate.py validates from Alpaca daily bars (feed taken from the config, raw adjustment).
    • Credentials go through runner.credentials; the receipt holds counts and hashes only.
    • It exits 2 unless every symbol's completed bars end at the expected latest XNYS session and contain the requested number of sessions. A stale or truncated feed fails.
  • blueprints/us-equities/adaptive-paper/scheduled_trial.sh runs ingest, then the gate, then one runner.py paper trial.
    • It never retries, and a second invocation against the same OUT_DIR is refused by a one-run lock.
    • It is meant to run from a frozen, read-only copy of a published commit, not from a live worktree.
  • Tests: tests/test_ingest_snapshot.py covers rows, CSV/header, the 17:00 ET completed-session rule, the expected-latest-session calendar, stale/truncated/empty coverage, and rejection of non-positive --sessions.

Evidence

  • 2026-09-22 live check:
    • Ingest: 480 rows (24 symbols × 20 sessions, 2026-08-25..09-22) with no coverage problems.
    • Gate: promotion_gate.py in its pinned venv passed 12/12.
    • An after-hours runner.py paper passed the gate and stopped at regular_session_window_unavailable with 0 orders.
  • Review: an independent review (workflow wf_15a285a3-93b) found the live-worktree execution risk (major) and five minor issues. All are fixed in cad8d04; the fixes are under verification.
  • python3 -m unittest: 2130 OK (318 skipped). All validate.yml steps and trading_gates.py --check rc=0. Guarded gitleaks ran before each commit: no leaks.
  • The scheduled first 1x paper trial (2026-09-23 10:05 ET) will run from a read-only git archive of the merge commit of this PR, not from any worktree.

🤖 Generated with Claude Code

…aper trial

ingest_snapshot.py writes the CSV promotion_gate.py validates from Alpaca SIP
raw daily bars (credentials via runner.credentials, counts and hashes only in
its receipt). scheduled_trial.sh runs ingest, gate and one runner.py paper
trial with no retries. First real run 2026-09-22: 480 rows, gate pass 12/12;
an after-hours paper call passed the gate and stopped at
regular_session_window_unavailable with 0 orders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review of 689d967: ingest now fails (exit 2) unless every symbol's completed
bars end at the expected latest XNYS session and hold the requested session
count; the feed defaults to the config's feed; --sessions must be positive;
the completed-session rule, calendar and coverage logic are testable
functions with tests. scheduled_trial.sh refuses a second run in the same
OUT_DIR and documents running from a frozen copy of a published commit.
Live check 2026-09-22: 480 rows, no coverage problems.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins
seathatflowsinourveins merged commit 41d39b3 into main Sep 23, 2026
6 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/paper-trial-readiness-20260922 branch September 25, 2026 18:47
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