Skip to content

chore(eod-sf): remove redundant python -m builders.daily_append invocation#129

Merged
cipher813 merged 2 commits into
mainfrom
chore/eod-sf-remove-redundant-daily-append
May 1, 2026
Merged

chore(eod-sf): remove redundant python -m builders.daily_append invocation#129
cipher813 merged 2 commits into
mainfrom
chore/eod-sf-remove-redundant-daily-append

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

  • Follow-up to feat(daily_append): source-aware skip_if_exists for EOD re-runs #128. The EOD SF's PostMarketData step ran daily_append twice back-to-back: once via weekly_collector --daily (which feat(daily_append): source-aware skip_if_exists for EOD re-runs #128 made source-aware) and again via a bare python -m builders.daily_append CLI call (which still defaulted to skip_if_exists=False).
  • The second invocation was a no-op duplicate. _run_daily already runs daily_closes + feature_store + daily_append regardless of --only (the flag only filters in _run_phase1).
  • Removes the redundant invocation. Re-runs of the EOD SF should now be ~3 min instead of ~25 min, well under the 1200s SSM timeout.

Why now

The 2026-05-01 EOD SF rerun (after PR #126 merged + the universe was re-migrated) timed out at the SSM 1200s ceiling. With #128 deployed, the first invocation completes in seconds when today's row is already written. The second bare-CLI invocation still hits the slow lib.write backfill path on every ticker (~22 min) and re-introduces the timeout. Removing it drops total wall time below 3 min on re-runs and gets us back the 5/1 EOD reconcile run cleanly.

Also dropped

The --only daily_closes qualifier on the remaining invocation. It was misleading — --only is only wired into _run_phase1, not _run_daily, so the qualifier did nothing. The bare --daily is the canonical invocation.

Test plan

  • pytest tests/test_daily_append_skip_if_exists.py — 8/8 pass (new test_eod_ssm_script_has_no_redundant_daily_append regression locks the simplification).
  • Run infrastructure/update_eod_pipeline_sf.sh on ae-trading after merge to redeploy the SF.
  • Trigger EOD SF rerun for 2026-05-01 to verify CaptureSnapshot + EODReconcile now run.

🤖 Generated with Claude Code

cipher813 and others added 2 commits May 1, 2026 15:44
…ation

Follow-up to PR #128. The PostMarketData step in alpha-engine-eod-pipeline
ran two python commands back-to-back:

    python weekly_collector.py --daily --only daily_closes
    python -m builders.daily_append

The second one was a no-op duplicate. ``_run_daily`` runs daily_closes
+ feature_store + daily_append regardless of ``--only`` (the flag is
only wired into ``_run_phase1``), so the second invocation just ran
daily_append again — and as a bare CLI call it didn't get the new
``skip_if_exists`` flag PR #128 added, so on re-runs every ticker took
the slow lib.write backfill path (904 × ~1.5s ≈ 22 min, over the SSM
1200s timeout — exactly what blew up the 2026-05-01 EOD SF rerun).

Also drop the misleading ``--only daily_closes`` qualifier on the
remaining invocation since it doesn't actually filter.

Adds a regression test locking the SSM script to a single
``weekly_collector --daily`` invocation. Both
infrastructure/step_function_eod.json and
infrastructure/update_eod_pipeline_sf.sh updated; the deploy script
needs to be run on ae-trading after merge to take effect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit 8f8b529 into main May 1, 2026
1 check passed
@cipher813 cipher813 deleted the chore/eod-sf-remove-redundant-daily-append branch May 1, 2026 22: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