User Story
As an operator monitoring ETL health, I want warnings emitted when secondary FK columns (star_system_id, planet_id, orbit_id, moon_id, faction_id, company_id) can't be resolved so I can identify data gaps rather than silently receiving null values.
Definition of Done
Acceptance Criteria
- When a terminal record has a non-null
id_star_system (or other secondary FK field) that cannot be resolved to a local BIGINT id, an EtlWarning is saved with severity: 'warn' and a message identifying the unresolved UEX ID
- Terminals with unresolvable secondary FKs are still upserted (null stored), consistent with current behavior for primary location FKs
Technical Elaboration
Currently terminals-sync.step.ts silently nulls out starSystemId, planetId, orbitId, moonId, factionId, companyId when the UEX ID isn't found in the local lookup map. The inline comment says "warn and null out" but no warning is emitted.
The fix is to add warning calls similar to what's already done for the primary location FKs (space_station, outpost, city), before falling through to the upsert with null.
Design Elaboration
Keep the current behavior of still upserting the row with null FKs — this matches the pattern for primary location FK misses and avoids data loss for terminals with partial FK coverage.
User Story
As an operator monitoring ETL health, I want warnings emitted when secondary FK columns (star_system_id, planet_id, orbit_id, moon_id, faction_id, company_id) can't be resolved so I can identify data gaps rather than silently receiving null values.
Definition of Done
TerminalsSyncStepemits awarn-severityEtlWarningfor each secondary FK column that resolves to null due to a missing UEX ID (not just when the field is null in the source data)Acceptance Criteria
id_star_system(or other secondary FK field) that cannot be resolved to a local BIGINT id, anEtlWarningis saved withseverity: 'warn'and a message identifying the unresolved UEX IDTechnical Elaboration
Currently
terminals-sync.step.tssilently nulls outstarSystemId,planetId,orbitId,moonId,factionId,companyIdwhen the UEX ID isn't found in the local lookup map. The inline comment says "warn and null out" but no warning is emitted.The fix is to add warning calls similar to what's already done for the primary location FKs (space_station, outpost, city), before falling through to the upsert with null.
Design Elaboration
Keep the current behavior of still upserting the row with null FKs — this matches the pattern for primary location FK misses and avoids data loss for terminals with partial FK coverage.