Skip to content

Add daily_data to _UPSTREAM_MAX_AGE_H (belt-and-suspenders with #53)#54

Merged
cipher813 merged 2 commits into
mainfrom
fix/executor-upstream-gate-daily-data
Apr 16, 2026
Merged

Add daily_data to _UPSTREAM_MAX_AGE_H (belt-and-suspenders with #53)#54
cipher813 merged 2 commits into
mainfrom
fix/executor-upstream-gate-daily-data

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

Closes the stamp-side of the belt-and-suspenders daily-data freshness architecture:

Gate Catches Origin
`_UPSTREAM_MAX_AGE_H` stamp check (this PR adds `daily_data: 26`) "ran and failed today" with structured reason reads `health/daily_data.json` written by alpha-engine-data#41
Direct `LastModified` on `daily_closes/{date}.parquet` (#53) "stamp green, blob stale" head_object in main.py

The stamp alone is insufficient — producer self-reporting can lie. The LastModified check alone misses structured failure state. Having both closes both holes.

Change

One-liner in `executor/main.py:894` — adds `"daily_data": 26` to `_UPSTREAM_MAX_AGE_H`. 26h matches `predictor_inference` since both run at the same weekday 13:05 UTC cadence.

Deploy order — IMPORTANT

  1. First: merge alpha-engine-data#41 — data stamps start emitting on next weekday run (Mon 13:05 UTC)
  2. Wait for at least one weekday DailyData run to produce `health/daily_data.json`
  3. Then: merge this PR — executor begins enforcing the stamp gate

If this merges first, every executor run hard-fails with `daily_data: no health data returned` until DataPhase1 emits its first stamp. Keep this PR blocked until #41 has deployed AND been exercised on a weekday.

Pairs with

Test plan

🤖 Generated with Claude Code

Adds daily_data: 26 to _UPSTREAM_MAX_AGE_H. Pairs with the stamp
emission added in alpha-engine-data#41 — belt-and-suspenders with
the direct LastModified check from #53:

- Stamp (this PR's gate): catches "ran and failed today" with
  structured status/error/summary
- LastModified (#53): catches "stamp green, blob stale"

Both fire hard-fail + Telegram from main.py's existing upstream gate
and the #53 freshness block respectively.

Deploy order: alpha-engine-data#41 must merge AND run at least once
(next weekday 13:05 UTC) before this merges, otherwise every executor
run fails with "no health data returned" until daily_data writes
its first stamp.

26h matches predictor_inference's grace buffer — same weekday
cadence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit 508903d into main Apr 16, 2026
1 check passed
@cipher813 cipher813 deleted the fix/executor-upstream-gate-daily-data branch April 16, 2026 15:55
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