Move health_checker + trading_calendar from alpha-engine-data#18
Merged
Conversation
Part 1 of 3 in the ae-dashboard de-bloat split. Both scripts are
observability/gating code that executes on the dashboard instance
via cron and Step Function SSM steps — their semantic home is here,
not in the data-production repo (alpha-engine-data).
Rationale for the split:
alpha-engine-data = data producer (writes S3: daily_closes, features,
slim cache, manifests)
alpha-engine-dashboard = observability consumer (reads S3, emits alerts,
gates Step Function on market-day check)
Today ae-dashboard (t3.micro, 1GB) clones the full alpha-engine-data
repo just to execute these two Python files. Moving them here lets
us drop the clone entirely once the Step Function cuts over (PR 2)
and the originals are deleted (PR 3).
Files (identical copies from alpha-engine-data):
health_checker.py — data staleness checker + SNS alerter
trading_calendar.py — NYSE holiday-aware trading-day check
tests/test_health_checker.py
tests/test_trading_calendar.py
Test plan: full suite 246 passed (was 233 before this PR).
Sequencing:
1. This PR merges → ae-dashboard pulls via boot-pull.timer (already
installed? TBC — user to verify / install via install-boot-pull.sh)
2. alpha-engine PR (Step Function IaC) updates CheckTradingDay +
HealthCheck SSM commands to new paths
3. alpha-engine-data PR deletes the two moved files; remove
alpha-engine-data from boot-pull REPOS list; delete
/home/ec2-user/alpha-engine-data on ae-dashboard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cipher813
added a commit
to cipher813/alpha-engine-data
that referenced
this pull request
Apr 16, 2026
…board Part 2/3 of ae-dashboard de-bloat. Once this deploys, the Step Function invokes trading_calendar.py and health_checker.py from /home/ec2-user/alpha-engine-dashboard instead of /home/ec2-user/ alpha-engine-data. Both scripts were copied to the dashboard repo in cipher813/alpha-engine-dashboard#18 — identical content, same CLI contract (TRADING DAY / MARKET_CLOSED stdout markers, --alert flag). Pre-merge requirements: 1. cipher813/alpha-engine-dashboard#18 must be merged 2. ae-dashboard must have pulled the new dashboard repo files (daily boot-pull.timer or manual pull) No other SF states touched. No CloudFormation or deploy-script changes needed — operator runs the existing infrastructure/deploy_step_function_daily.sh after merge to apply the updated definition. Part 3/3 (file deletion + alpha-engine-data removal from ae-dashboard's boot-pull REPOS list + clone removal) follows after next weekday run verifies the new paths work. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
cipher813
added a commit
to cipher813/alpha-engine-data
that referenced
this pull request
Apr 16, 2026
…board (#42) Part 2/3 of ae-dashboard de-bloat. Once this deploys, the Step Function invokes trading_calendar.py and health_checker.py from /home/ec2-user/alpha-engine-dashboard instead of /home/ec2-user/ alpha-engine-data. Both scripts were copied to the dashboard repo in cipher813/alpha-engine-dashboard#18 — identical content, same CLI contract (TRADING DAY / MARKET_CLOSED stdout markers, --alert flag). Pre-merge requirements: 1. cipher813/alpha-engine-dashboard#18 must be merged 2. ae-dashboard must have pulled the new dashboard repo files (daily boot-pull.timer or manual pull) No other SF states touched. No CloudFormation or deploy-script changes needed — operator runs the existing infrastructure/deploy_step_function_daily.sh after merge to apply the updated definition. Part 3/3 (file deletion + alpha-engine-data removal from ae-dashboard's boot-pull REPOS list + clone removal) follows after next weekday run verifies the new paths work. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cipher813
added a commit
to cipher813/alpha-engine-data
that referenced
this pull request
Apr 16, 2026
…oard) Part 3/3 of ae-dashboard de-bloat. Both scripts were copied verbatim to alpha-engine-dashboard in cipher813/alpha-engine-dashboard#18, and the Step Function SSM commands were repointed in #42 (merged 2026-04-16) to run from /home/ec2-user/alpha-engine-dashboard. This PR removes the original copies from alpha-engine-data now that nothing in the weekday Step Function or Saturday pipeline references them anymore. The data repo is now scoped purely to data-production code (collectors, builders, features, weekly_collector) — matches the producer-vs-observability seam documented in the earlier commits. Pre-merge requirements (MERGE ORDER IS IMPORTANT): 1. Friday 2026-04-17 weekday Step Function run must complete successfully using the new dashboard paths (verify CheckTradingDay logs `cd /home/ec2-user/alpha-engine-dashboard`, HealthCheck writes /var/log/health-check.log normally) 2. Update ae-dashboard crontab — there's a `0 */6 * * *` entry still running `cd /home/ec2-user/alpha-engine-data && .venv/bin/python health_checker.py --alert`. Operator must crontab -e on ae-dashboard and swap the path to /home/ec2-user/alpha-engine-dashboard before this PR merges, else the cron breaks until that edit happens Pairs with cipher813/alpha-engine-dashboard#19 (removes alpha-engine-data from the dashboard's boot-pull.sh REPOS list). Tests: full suite 49 passed (was 71 before moves — the 22 delta is 26 tests deleted with the moved files + 5 new test_module_health tests added earlier + others). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
cipher813
added a commit
that referenced
this pull request
Apr 16, 2026
Part of the ae-dashboard de-bloat split. After cipher813/alpha-engine-data#43 merges (deletes trading_calendar.py + health_checker.py from the data repo), ae-dashboard no longer has any runtime dependency on alpha-engine-data — both files moved to this repo in #18 and the Step Function's CheckTradingDay + HealthCheck commands now run from here. Removing alpha-engine-data from the REPOS array stops the daily 12:00 UTC boot-pull from refreshing the now-unused clone. Existing clone at /home/ec2-user/alpha-engine-data on ae-dashboard can be rm'd manually post-merge. Pre-merge requirements: - cipher813/alpha-engine-data#43 merged (or mergeable in same batch) - ae-dashboard crontab updated so the `0 */6 * * *` health_checker cron no longer references /home/ec2-user/alpha-engine-data Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cipher813
added a commit
to cipher813/alpha-engine-data
that referenced
this pull request
Apr 16, 2026
…oard) (#43) Part 3/3 of ae-dashboard de-bloat. Both scripts were copied verbatim to alpha-engine-dashboard in cipher813/alpha-engine-dashboard#18, and the Step Function SSM commands were repointed in #42 (merged 2026-04-16) to run from /home/ec2-user/alpha-engine-dashboard. This PR removes the original copies from alpha-engine-data now that nothing in the weekday Step Function or Saturday pipeline references them anymore. The data repo is now scoped purely to data-production code (collectors, builders, features, weekly_collector) — matches the producer-vs-observability seam documented in the earlier commits. Pre-merge requirements (MERGE ORDER IS IMPORTANT): 1. Friday 2026-04-17 weekday Step Function run must complete successfully using the new dashboard paths (verify CheckTradingDay logs `cd /home/ec2-user/alpha-engine-dashboard`, HealthCheck writes /var/log/health-check.log normally) 2. Update ae-dashboard crontab — there's a `0 */6 * * *` entry still running `cd /home/ec2-user/alpha-engine-data && .venv/bin/python health_checker.py --alert`. Operator must crontab -e on ae-dashboard and swap the path to /home/ec2-user/alpha-engine-dashboard before this PR merges, else the cron breaks until that edit happens Pairs with cipher813/alpha-engine-dashboard#19 (removes alpha-engine-data from the dashboard's boot-pull.sh REPOS list). Tests: full suite 49 passed (was 71 before moves — the 22 delta is 26 tests deleted with the moved files + 5 new test_module_health tests added earlier + others). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 1/3 of the ae-dashboard de-bloat. Copies `health_checker.py` and `trading_calendar.py` from `alpha-engine-data` into this repo so ae-dashboard can eventually drop its `alpha-engine-data` clone entirely.
Why move
Semantic seam: `alpha-engine-data` = data producer; `alpha-engine-dashboard` = observability consumer. These two files belong on the consumer side.
Changes
No existing code touched. No dependency changes (both scripts are stdlib + boto3 which is already in requirements.txt).
Test plan
Sequencing
One note for the user: I confirmed earlier that ae-dashboard has the `boot-pull.timer` infrastructure in the repo (`infrastructure/boot-pull.sh`, `install-boot-pull.sh`, `systemd/boot-pull.timer`) but the installer was never run on the instance — `systemctl list-timers` shows nothing. Running `sudo bash install-boot-pull.sh` once will activate daily 12:00 UTC auto-pulls, covering the "24h code freshness" ask without a new PR.
🤖 Generated with Claude Code