ALL-845 PR3 (Tier 2): collapse src/commands/search/ingest-*.ts triplet into parameterized helper
failedAgent: carson-engineer
Priority: 3
Branch:
kai/collapse-hifld-ingest-tripletPR: #10401
Linear: ALL-875
After PR2 extracts the CLI bootstrap, the inner for-stateCode/for-hifldFeature loop is ~80% identical across the three ingest scripts. Lift it into ingestHifldDataset({ sourcePath, zoneType, formatRow }).
The schemas are subtly different (ElectricRetailServiceTerritory vs raw Zone for energy-markets). The unification has to be careful — likely a generic over the row type with a per-script formatter callback.
Do NOT start this until PR2 has merged.
Lower priority than PR1+PR2 because the pure-quality win is already shipped by then; this is a maintainability win.
Full report context: memory/2026-05-11-deepsource-sweep-domains-location.md (Tier 2 section).
Done-when: one of the three scripts can be deleted (or the three become ~20-line parameterizations of a shared module), ingest dry-run output unchanged on staging across all three datasets.
Event Timeline
created
status_change
queued → in_progress
failed
lease expired — re-queued for retry
in_progress → queued
status_change
queued → in_progress
progress
PR #10401 opened. Helper extracted, three scripts refactored, 6/6 unit tests pass, typecheck/lint/format clean. Behaviour preserved verbatim. Awaiting CI + review.
progress
PR #10401 opened 2026-05-12 00:02 UTC. New ingestHifldDataset helper (165 LOC) + 3 ingest scripts collapsed (328 → 233 LOC). 6/6 unit tests pass, typecheck + biome clean. CI kicked off, watching. Linear ALL-875 created as sub-issue of ALL-845.
progress
PR #10401: build/test/apollo/codesmith all green. Shadow path-filter check failed once on transient git fetch (Connection reset by peer during origin/main fetch — known infra noise). Pushed empty commit 4c75f37ea8 to retrigger CI. Will verify on next heartbeat.
failed
lease expired — re-queued for retry
in_progress → queued
status_change
queued → in_progress
progress
Resume verified 2026-05-12 03:11 UTC. PR #10401 OPEN, all 12 CI checks SUCCESS (build, test, shadow-check, apollo, codesmith, CodeRabbit, Cursor Bugbot, Vercel x4). 0 substantive review comments — only bot linkbacks. No CODEOWNER auto-assigned (no rule for domains/location or src/commands/search/). Per merge policy: needs ≥1 CODEOWNER approval (Victor, Carson, or other) before merge — none yet. Holding without re-pinging (PR only ~3h old, ping-once rule). Next heartbeat will continue monitoring.
failed
lease expired — max retries reached, marking failed (poison pill)
in_progress → failed
progress
2026-05-16 21:10 UTC ping-wave gate-block: CHECKLIST-CONTACT.md Gates 2/3/5/6 BLOCKED a repeat ping wave on Victor-pending PRs. The 2026-05-15 13:00 UTC back-off expiry was acted on at 2026-05-15 13:10 UTC (one nudge per PR posted). The 'back-off expiry' is not a Gate 2 material event by itself; PRs are still REVIEW_REQUIRED for the same reason as last heartbeat. Re-pinging again ~32h later would repeat the 2026-05-08 #9886 failure mode (3 pings in one UTC day). Recorded as NO_REPLY across all 5 PRs (#10401, #10498, #10499, #9886, #9932). Right venue for next escalation = DM Carson with a decision-options brief, not another PR comment.