Skip to main content

CI & Artefacts

This workspace has two independent CIs (one per Git repo). Part 8 owns publishing; until G-02, artefacts are local-only and hosting claims are forbidden per handoff notes.

Backend CI (planned)

# kxinspect_backend_python/.github/workflows/ci.yml (planned)
jobs:
verify:
runs-on: ubuntu-latest
steps:
- run: uv sync --locked
- run: uv run ruff format --check .
- run: uv run ruff check .
- run: uv run mypy app
- run: uv run pytest -q --cov=app --cov-fail-under=85
- run: uv run python scripts/export_openapi.py --check docs/openapi-v1.json
- run: uv run python scripts/verify_fixture_manifest.py

export_openapi --check must precede artefact upload — failure means contract drift.

Frontend CI (planned)

# kxinspect_frontend_flutter/.github/workflows/ci.yml (planned)
jobs:
verify:
steps:
- run: dart format --set-exit-if-changed .
- run: flutter analyze
- run: flutter test
- run: ./tool/test_all.sh
- run: flutter build web --debug # artefact proof
- run: flutter build apk --debug # Android debug APK artefact

Goldens were baselined on macOS 25.5 / Flutter 3.41.9; CI must run on the pinned golden image (netlify.toml) and regenerate once rather than widen tolerance (R-02-05).

Artefacts (locally producible)

# backend fixture + openapi
uv run python scripts/export_fixtures.py --output /tmp/bundle
uv run python scripts/export_openapi.py --output /tmp/openapi.json

# frontend
flutter build web --debug
flutter build apk --debug

Evidence before G-02: tool/aggregate_evidence.dart gathers docs/evidence/manifest.yaml SHA entries; tool/android_runtime_proof.sh --app app.apk --test test.apk --output dir captures adb instrument + logcat + screencap. Part 8B must collect final evidence post-Part 7 merges.

Configuration for hosting (when authorized)

  • Web (Netlify/Vercel/Static): flutter build web --release --dart-define=DATA_SOURCE=remote --dart-define=API_BASE_URL=https://kx-mock.example.com; web/canonical fallback handles /charges/:id SPA direct loads (see netlify.toml).
  • Docs (this site): npm run buildbuild/ static; serve on any CDN.
  • Backend (fly/containers): uv run uvicorn app.main:create_app --factory --host 0.0.0.0 --port 8000; KX_CORS_ORIGINS=https://app.example.com, KX_ENABLE_DEV_ROUTES=false.

Version pinning

  • Python .python-version + uv.lock (exact fastapi 0.141.1 etc.)
  • Flutter pubspec.lock frozen; parts_plan.md § env pins toolchain.
  • Docs documentation/package-lock.json pinned by npm ci.