Skip to content

feat: ETL steps for planets and moons#214

Merged
GitAddRemote merged 1 commit into
mainfrom
feature/ISSUE-192
May 24, 2026
Merged

feat: ETL steps for planets and moons#214
GitAddRemote merged 1 commit into
mainfrom
feature/ISSUE-192

Conversation

@GitAddRemote
Copy link
Copy Markdown
Owner

Summary

  • PlanetsSyncStep — fetches `/planets`, validates `star_system_uex_id` FK (hard skip on missing), guards `orbit_uex_id`, `faction_uex_id`, and `jurisdiction_uex_id` with warn+null, upserts `station_planet` on `uex_id`
  • MoonsSyncStep — fetches `/moons`, validates `star_system_uex_id` and `planet_uex_id` FKs (hard skip on either missing), guards `orbit_uex_id`, `faction_uex_id`, and `jurisdiction_uex_id` with warn+null, upserts `station_moon` on `uex_id`
  • Both steps registered in `CatalogEtlModule` and `CatalogEtlService` at tier-4 (after orbits), consistent with dependency order
  • `CatalogEtlService` spec updated with mock providers for both new steps

Test plan

  • 27 new unit tests across 3 spec files — all passing locally
  • TypeScript typecheck passes (backend + frontend)
  • Lint/Prettier clean (enforced by pre-commit hook)
  • After ETL run: `SELECT count(*) FROM station_planet` matches UEX count
  • After ETL run: `SELECT count(*) FROM station_moon` matches UEX count
  • Planet/moon with unknown star system appears in `station_etl_warning` and is absent from its table
  • Planet/moon with unknown orbit is present with `orbit_uex_id = NULL` and a warning row

Closes #192

- PlanetsSyncStep — fetches /planets, validates star_system_uex_id FK
  (hard skip), guards orbit/faction/jurisdiction FKs with warn+null,
  upserts station_planet
- MoonsSyncStep — fetches /moons, validates star_system_uex_id and
  planet_uex_id FKs (hard skip on either), guards orbit/faction/
  jurisdiction FKs with warn+null, upserts station_moon
- Both steps registered in CatalogEtlModule and CatalogEtlService at
  tier-4 (after orbits)
- CatalogEtlService spec updated with mock providers for both new steps
- 27 new unit tests across 3 spec files; all passing
Copilot AI review requested due to automatic review settings May 24, 2026 04:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@GitAddRemote GitAddRemote self-assigned this May 24, 2026
@GitAddRemote GitAddRemote merged commit 8e263b6 into main May 24, 2026
9 of 10 checks passed
@GitAddRemote GitAddRemote deleted the feature/ISSUE-192 branch May 24, 2026 05:41
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.

ETL: sync planets and moons with orbit name resolution

2 participants