Files
SilvertakanaandClaude Sonnet 4.6 352fbce768 feat: CI smoke-test foundation (probe + mock-upstream + isolated docker CI) (#236)
* feat: CI smoke-test foundation (probe + docker compose + rule updates)

Phase 1 of multi-repo CI initiative for catching plugin/seeder integration
failures (ADR-0002 id drift, missing mapWebsocketPayload, namespace
collisions, BOM in package.json) that current CI misses.

- packages/wwv-ci-probe: shared CLI with `seeder`, `ws`, `id-contract`
  subcommands. README documents why no `plugin` subcommand (Playwright belongs
  in wwv-plugins, not coupled to this probe). `files` + `prepublishOnly`
  configured for clean npm publish.
- docker/ci/: reusable docker-compose stacks for plugin-CI and seeder-CI,
  plus mock-upstream HTTP fixture server and CI-only stub-seeder. Compose
  comments document scope boundary (consumer workflow owns user/plugin-row
  injection via Playwright globalSetup pattern) and the deferred stub-seeder
  bake-in for wwv-data-engine.
- .github/workflows/docker-publish.yml: adds `:ci` tag alias for downstream
  consumers (one-line edit).
- .agents/rules/*: rename worldwideview-plugins → wwv-plugins (4 files) to
  reflect repo rename + clarify it lives at local-plugins/ as its own git
  working tree.

Bump 2.15.16 → 2.16.0 (Minor — new ci-probe package + new docker/ci
infrastructure are net-new features for the CI ecosystem).

Foundation has NOT been booted end-to-end yet — ghcr.io/silvertakana/
worldwideview:ci doesn't exist until this lands on main and the workflow
publishes. Next session: validate via real compose-up, then mirror the :ci
tag in wwv-data-engine repo and wire consumer workflows in wwv-plugins.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* refactor(ci-probe): extract shared payload-shape validator with contract tests

* fix(ci): add /__health route to mock-upstream and gate engine on service_healthy

* chore: bump version to 2.48.18 for CI foundation landing

* chore: bump to 2.48.19 and reconcile lockfile after merging main (validateManifest fix)

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
2026-06-04 23:00:02 +12:00
..

mock-upstream

Tiny HTTP server used in CI to stand in for upstream data APIs (OpenSky, NASA FIRMS, Overpass, etc.) so seeder CI can run hermetically without real API keys or network flakiness.

How it works

Mount a fixture directory at /fixtures. The directory must contain a routes.json mapping request paths → fixture filenames:

{
  "/api/states/all": "opensky-states.json",
  "/api/v2/flights": "flights.json"
}

When the server receives GET /api/states/all, it serves the contents of /fixtures/opensky-states.json.

Env vars

Var Default Purpose
FIXTURE_DIR /fixtures Directory mounted from the seeder repo
ROUTES_FILE ${FIXTURE_DIR}/routes.json Override the routes manifest path
PORT 8080 Listen port

Per-seeder convention

Each seeder ships its own __fixtures__/ folder next to src/:

wwv-seeders-community/aviation/
├── src/index.ts
└── __fixtures__/
    ├── routes.json
    └── opensky-states.json

In CI compose, that folder is mounted into the mock-upstream container at /fixtures for the duration of the seeder smoke test.

Architectural contract

Seeders MUST read upstream URLs from documented env vars with the production URL as the default, e.g.:

const UPSTREAM = process.env.OPENSKY_API_BASE ?? "https://opensky-network.org";

The CI compose then overrides OPENSKY_API_BASE=http://mock-upstream:8080. Without this convention, CI mocking is impossible — hardcoded URLs cannot be intercepted.