2.7 KiB
status, priority, issue_id, tags, dependencies
| status | priority | issue_id | tags | dependencies | |||||
|---|---|---|---|---|---|---|---|---|---|
| complete | p1 | 166 |
|
Health check for regionalSnapshots is dead wiring (not in BOOTSTRAP_KEYS or STANDALONE_KEYS)
Problem Statement
PR #2940 added SEED_META.regionalSnapshots to api/health.js:225 but the entry is never read. health.js only dereferences SEED_META[name] inside two loops that iterate BOOTSTRAP_KEYS (line ~402) and STANDALONE_KEYS (line ~474). There is no regionalSnapshots key in either map, so the freshness check silently no-ops. The 12h staleness budget is unobservable: if the seeder falls behind, nothing alerts.
Same failure mode as feedback_empty_data_ok_keys_bootstrap_blind_spot.md and the health-maxstalemin-write-cadence skill.
Findings
api/health.js:225has theSEED_METAentry forregionalSnapshots.- Neither
BOOTSTRAP_KEYSnorSTANDALONE_KEYScontainsregionalSnapshots. - Verified by grepping for
regionalSnapshotsacrossapi/health.js: only one match (theSEED_METAentry itself). - Net effect: the health endpoint never exercises the freshness budget for this seed.
Proposed Solutions
Option 1: Add to STANDALONE_KEYS
Add regionalSnapshots: 'intelligence:regional-snapshots:summary:v1' to STANDALONE_KEYS. This is the seeded summary key written by seed-regional-snapshots.mjs:208.
Pros: Minimal change, matches current phase (Phase 0 seeds but no panel consumer yet).
Cons: Will need to move it to BOOTSTRAP_KEYS when Phase 1 panel bootstrap lands.
Effort: Small
Risk: Low
Option 2: Add to BOOTSTRAP_KEYS now
Add to BOOTSTRAP_KEYS directly since Phase 1 will consume this in the panel bootstrap.
Pros: Cleaner forward compat, avoids a second migration. Cons: Premature coupling; bootstrap payload grows before consumer exists. Effort: Small Risk: Medium (risks shipping bootstrap field with no consumer)
Recommended Action
(leave blank for triage)
Technical Details
- Affected files:
api/health.js - Components: health endpoint, seed freshness monitoring
- Related seed:
scripts/seed-regional-snapshots.mjs:208 - Related key:
intelligence:regional-snapshots:summary:v1
Acceptance Criteria
regionalSnapshotskey appears in eitherBOOTSTRAP_KEYSorSTANDALONE_KEYSinapi/health.js- Hitting
/api/healthon production after first cron cycle returns OK status forregionalSnapshots - If seeder fails for >720 min,
/api/healthgoes red
Work Log
(empty)
Resources
- PR #2940
- Spec: docs/internal/pro-regional-intelligence-upgrade.md
- Related memory:
feedback_empty_data_ok_keys_bootstrap_blind_spot.md - Related skill:
health-maxstalemin-write-cadence