fix(morning-enrich): refresh daily_data health stamp on success#98
Merged
Merged
Conversation
2026-04-27 weekday SF dropped through to executor with a 65h-stale daily_data stamp because _run_morning_enrich (added 2026-04-24 PR #91) never refreshed it. The post-close DailyData run is the only writer of the stamp; on Mondays, that's Friday afternoon — well past the executor's 26h staleness gate. Today was the first Monday since MorningEnrich shipped, which is why this surfaced now. Fix: on the success path, _run_morning_enrich now calls _write_module_health(module_name="daily_data", ...) with the polygon overwrite results in the summary, so the stamp's last_success refreshes to the morning-enrich run time. Failure paths intentionally leave the prior stamp untouched — writing a fresh "ok" stamp on failure would mask outages from the executor's gate. Dry runs also skip the write. 3 new tests cover: stamp written on success with morning_enrich=true in the summary, stamp NOT written on PolygonForbiddenError, stamp NOT written in dry-run. Full suite: 218/218 passes. Co-Authored-By: Claude Opus 4.7 (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
_run_morning_enrichnever refreshed thedaily_datahealth stamp, so on Mondays the executor's 26h staleness gate fired against Friday's post-close stamp (~65h gap). Today was the first Monday since MorningEnrich shipped (PR weekday SF: add MorningEnrich step (polygon overwrite before predictor inference) #91, 2026-04-24).Test plan
morning_enrich=truein summary, stamp NOT written onPolygonForbiddenError, stamp NOT written in--dry-run.Follow-ups (separate PRs)
daily_appendperf: ~12 min for one row × ~900 universe symbols is dominated by per-ticker sequentialread()+update()to S3-backed Arctic.read_batchwithdate_rangetail + threadpooled writes should bring it back under a minute.alpha-engine-executor-rolelackscloudwatch:PutMetricData—_emit_unscored_count_metricwarning-logs but doesn't block.🤖 Generated with Claude Code