Elie Habib
38218db7cd
fix(energy): strict validation — emptyDataIsFailure on Atlas seeders ( #3350 )
...
Adds `emptyDataIsFailure: true` to all 5 curated-registry seeders in the
`seed-bundle-energy-sources` Railway service. File-read-and-validate
seeders whose validateFn returns false (stale container, missing data
file, shape regression, etc.) MUST leave seed-meta stale rather than
stamping fresh `recordCount: 0` via the default `publishResult.skipped`
branch in `_seed-utils.mjs:906-917`.
Why this matters — observed production incident on 2026-04-23 (post
PR #3337 merge):
- Subset of Atlas seeders hit the validation-skip path (for reasons
involving a Railway container stale vs the merged code + a local
Option A run during an intermediate-file-state window).
- `_seed-utils.mjs:910` `writeFreshnessMetadata(..., 0, ...)` stamped
`seed-meta:energy:pipelines-oil` and `seed-meta:energy:storage-facilities`
with fresh `fetchedAt + recordCount: 0`.
- Bundle runner's interval gate at `_bundle-runner.mjs:210` reads
`fetchedAt` only, not `recordCount`. With `elapsed < 0.8 × 10080min =
8064min`, the gate skipped these 2 sections for ~5.5 days. No
canonical data was written; health reported EMPTY; bundle never
self-healed.
With `emptyDataIsFailure: true`, the strict branch at
`_seed-utils.mjs:897-905` fires instead:
FAILURE: validation failed (empty data) — seed-meta NOT refreshed;
bundle will retry next cycle
Seed-meta stays stale, bundle counts it as `failed++`, next cron tick
retries. Health flips STALE_SEED within max-stale-min. Operator sees
it. Loud-failure instead of silent-skip-with-meta-refresh.
Pattern previously documented for strict-floor validators
(IMF/WEO 180+ country seeders in
`feedback_strict_floor_validate_fail_poisons_seed_meta.md`) — now
applied to all 5 Energy Atlas curated registries for the same reasons.
No functional change in the healthy path — validation-passing runs
still publish canonical + fresh seed-meta as before.
Verification: typecheck clean, 6618/6618 data tests pass.
2026-04-23 20:43:27 +04:00
..
2026-04-23 12:32:29 +04:00
2026-04-23 11:50:19 +04:00
2026-04-20 19:03:47 +04:00
2026-04-23 19:47:10 +04:00
2026-02-28 17:43:56 +04:00
2026-04-23 08:36:05 +04:00
2026-04-02 08:17:32 +04:00
2026-03-23 16:10:49 +04:00
2026-04-04 15:38:02 +04:00
2026-04-11 09:39:27 +04:00
2026-03-29 11:09:26 +04:00
2026-04-23 09:15:57 +04:00
2026-04-13 13:00:14 +04:00
2026-04-23 09:15:57 +04:00
2026-04-16 10:41:15 +04:00
2026-03-28 15:03:54 +04:00
2026-03-16 08:40:14 +04:00
2026-04-16 09:24:12 +04:00
2026-04-23 07:34:07 +04:00
2026-03-14 21:29:21 +04:00
2026-04-20 09:36:10 +04:00
2026-03-19 00:24:47 +04:00
2026-04-14 22:11:56 +04:00
2026-04-14 22:11:56 +04:00
2026-04-23 18:14:51 +04:00
2026-03-31 07:54:23 +04:00
2026-04-23 07:34:07 +04:00
2026-03-28 19:51:29 +04:00
2026-04-11 08:21:08 +04:00
2026-04-16 09:25:06 +04:00
2026-03-14 21:29:21 +04:00
2026-04-20 22:37:49 +04:00
2026-03-31 13:09:21 +04:00
2026-04-23 10:25:18 +04:00
2026-04-23 10:25:18 +04:00
2026-04-04 15:38:02 +04:00
2026-03-14 21:29:21 +04:00
2026-03-12 06:50:30 +04:00
2026-03-05 10:16:43 +04:00
2026-03-19 10:31:37 +04:00
2026-04-23 10:25:18 +04:00
2026-03-14 21:29:21 +04:00
2026-03-23 23:59:21 +04:00
2026-02-26 20:52:44 +04:00
2026-04-22 09:55:59 +03:00
2026-04-22 09:55:59 +03:00
2026-03-15 15:57:22 +04:00
2026-03-24 18:52:02 +04:00
2026-03-15 15:57:22 +04:00
2026-03-19 02:40:05 +04:00
2026-03-17 06:35:12 +04:00
2026-03-01 11:53:20 +04:00
2026-03-01 11:53:20 +04:00
2026-03-14 21:29:21 +04:00
2026-04-21 22:37:27 +04:00
2026-03-28 23:59:47 +04:00
2026-04-04 15:38:02 +04:00
2026-03-01 15:59:53 +04:00
2026-04-03 23:25:08 +04:00
2026-04-08 11:21:40 +04:00
2026-04-11 17:55:39 +04:00
2026-03-14 21:29:21 +04:00
2026-03-01 11:53:20 +04:00
2026-04-17 08:35:20 +04:00
2026-04-23 09:15:57 +04:00
2026-04-23 11:53:37 +04:00
2026-04-23 11:53:37 +04:00
2026-04-05 09:03:34 +04:00
2026-04-05 09:03:34 +04:00
2026-03-15 15:57:22 +04:00
2026-03-23 23:59:21 +04:00
2026-03-01 11:53:20 +04:00
2026-04-03 10:27:37 +04:00
2026-04-10 15:54:30 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 11:43:54 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 07:34:07 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-20 15:21:43 +04:00
2026-04-20 15:21:43 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-22 17:10:38 +04:00
2026-04-23 08:19:04 +04:00
2026-04-13 08:05:59 +04:00
2026-04-16 13:41:28 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-16 09:25:06 +04:00
2026-04-14 12:29:17 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:06:24 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 11:50:19 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-03-27 11:48:02 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-18 14:40:00 +04:00
2026-04-07 22:24:17 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 20:43:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-16 09:25:06 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 20:38:11 +04:00
2026-04-01 08:53:13 +04:00
2026-04-22 17:10:38 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 20:43:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-16 10:41:15 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-16 09:25:06 +04:00
2026-04-03 10:27:37 +04:00
2026-04-15 09:16:27 +04:00
2026-04-12 21:34:38 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-03-22 19:59:42 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-06 13:58:54 +04:00
2026-04-22 23:47:45 +04:00
2026-04-15 09:16:27 +04:00
2026-04-16 09:25:06 +04:00
2026-03-15 15:57:22 +04:00
2026-04-15 09:16:27 +04:00
2026-03-22 19:59:42 +04:00
2026-04-20 19:03:47 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 20:43:27 +04:00
2026-04-23 20:43:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-22 22:37:08 +04:00
2026-04-15 09:16:27 +04:00
2026-04-22 17:10:38 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-12 11:46:04 +04:00
2026-04-04 23:19:33 +04:00
2026-04-15 09:16:27 +04:00
2026-04-13 09:21:13 +04:00
2026-04-23 10:25:18 +04:00
2026-04-13 13:00:58 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-03-22 19:59:42 +04:00
2026-04-23 07:58:40 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-23 20:43:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-04-21 19:39:16 +04:00
2026-04-15 09:16:27 +04:00
2026-04-15 09:16:27 +04:00
2026-03-17 16:12:05 +04:00
2026-04-15 09:16:27 +04:00
2026-03-14 10:23:20 +04:00
2026-04-15 09:16:27 +04:00
2026-03-19 01:57:27 +04:00
2026-04-13 21:53:21 +04:00
2026-04-20 08:40:29 +04:00
2026-02-19 07:53:15 +04:00
2026-04-23 10:25:18 +04:00
2026-04-23 10:25:18 +04:00
2026-04-12 10:22:21 +04:00
2026-03-14 21:29:21 +04:00
2026-04-02 08:55:22 +04:00
2026-04-23 20:23:45 +04:00
2026-04-14 22:11:56 +04:00