Repository navigation
L1: single-command local stack with seeded synthetic release (Refs #96) - #100
Merged
Merged
Conversation
#96) Add invented BAFU-shaped seed sources, a pre-built B3 artifact built from them with the Spark pipeline, and an idempotent loader that only uses B4 promote and publish with fixed operation IDs. Unexpected release state fails loudly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…k (Refs #96) Add compose.app.yaml under its own project/volumes, ./dev app-up/app-down/ app-reset/app-status/app-logs/app-smoke/app-import and make up/down. Postgres, one-shot migrate and B4 seed tasks, the Auth Emulator with a recreated verified demo account, the lca_api API and a mock-mode frontend start in healthcheck order on localhost-only ports. Seed tests run in ETL CI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#96) Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 tasks
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #96
L1 of ADR 0006:
./dev app-up(andmake up) starts the whole local application with one command, in healthcheck order, with a deterministic synthetic release that is published through B4.Behavior
Commands.
./dev app-up,app-down(keeps volumes),app-reset(refuses without--yes),app-status,app-logs [service],app-smokeandapp-import <lca-import args>.make upandmake downwrapapp-upandapp-down../dev confignow also validatescompose.app.yaml. The existingup,api-up,etl-*,publication-*and mock-frontend flows are unchanged.Isolation. The stack is
compose.app.yaml. It uses project--project-name ${LCA_APP_PROJECT:-lca-diff-app}, which is neverCOMPOSE_PROJECT_NAME. It has its own network and its own volumes,app-dbandapp-archive. The database service is nameddb, so test suites, which reset onlypostgres/postgres-targetin other projects, cannot reach it.Ports. Ports bind to
127.0.0.1only: frontend 5180, API 8010, auth 9110. They can be overridden with theLCA_APP_*_PORTvariables. Postgres has no host port.app-upstops before starting anything if a configured port is in use.Startup order.
dbbecomes healthy.migraterunsalembic upgrade headaslca_migrator.seedrunspython -m lca_etl.seed load, which uses B4promotethenpublishaslca_import/lca_publisherwith fixed operation UUIDs.authbecomes healthy.auth-seedrecreates the verified demo account. The emulator keeps no state, so this runs on every start.apistarts aslca_apiwithLCA_ENVIRONMENT=local, the emulator, and CORS restricted to the local frontend origin. It has a healthcheck on/api/v1/readyand never migrates.frontendstarts: a lockednpm ciand aVITE_SERVICE_MODE=mockbuild served byvite preview.Airflow and Spark are not started. Every service has
cap_drop: [ALL]andno-new-privileges.Seed.
data_pipeline/seed/holds invented, BAFU-shaped data and no provider data:python -m lca_etl.seed build). Startup therefore needs neither Spark nor an import database.The seed has a fixed version,
synthetic-local-2026.1, and deterministic release and revision IDs. It publishes 24 processes under three top-level categories, with paths of depth 3. It includes:0and absent across processes;1.2345E-33and…e-40.The loader refuses any revision or pointer for its release that it did not create (
SEED_UNEXPECTED_REVISION/SEED_UNEXPECTED_ACTIVE_REVISION). It never writes tables directly. Later starts are B4reused: trueno-ops.Tools image.
ops/local/tools.Dockerfileis the stack's ETL runtime: thelca-etlpackage from the frozen lock, without Spark's JVM. It runs migrate, seed, auth-seed, smoke and the opt-in import. The API image is unchanged and still excludes pyspark and airflow.seedandimportrun as namespace UID 0 (ADR 0003) so that they share the archive owner and can read owner-only private B3 artifacts.Smoke (AC2).
./dev app-smokerunsops/local/local_stack.py smokein a container on the stack network. It prints no tokens.Docs.
development-environment.mdgains an app-stack section and the L1 verification record.CI. The ETL workflow now runs
make backend-test-seed. Backend ruff and mypy now coverops/.Exact commands and results (engineering, rootless host, Compose v5.7.0)
All runs used an isolated app project and ports (
LCA_APP_PROJECT=lca-diff-l1-app LCA_APP_FRONTEND_PORT=5240 LCA_APP_API_PORT=8240 LCA_APP_AUTH_PORT=9240) and workspace projectlca-diff-l1. Other projects' containers were left running../dev config./dev app-up(no volumes, no.env)migrate/seed/auth-seedExited (0).curlfrom 127.0.0.1: frontend 200,/api/v1/health200,/api/v1/ready200git cloneof this branch at59dce85, projectlca-diff-l1-clean, ports 5241/8241/9241:./dev app-up,./dev app-smoke,make down,make up./dev app-smokeAUTH_REQUIRED; demo token returns releasee0639837-ac2a-56e4-9746-967bc5ad433f/ revisiondc63c04e-8927-5825-8544-ffbfe2de8e8e; exact1.234567890123456789012345678901234; unverified 403EMAIL_NOT_VERIFIED; untrusted-origin preflight without allow header; local origin allowed./dev app-down, then./dev app-upactivated_at; one revision; the same 2publication_operationrows (promotelca_import/lca_import, publishlca_publisher/lca_publisher); archive has 55 files with the same digest; seed reportspromote_reused/publish_reusedtrue; smoke passes./dev app-reset./dev app-reset --yes, then./dev app-upseeded: true) with the same IDs./dev app-upSEED_UNEXPECTED_REVISION, API and frontend not started (then reset)LCA_APP_FRONTEND_PORT=5173 ./dev app-upwhile thelca-diff-devworkspace holds 5173./dev app-upwithlca-diff-l1andlca-diff-devworkspaces runningconfiganddocker port127.0.0.1bindings;dbnone; every servicecap_drop [ALL],no-new-privileges:true. API image:pyspark/airflow/lca_etlabsent; user65532:65532make backend-format-check backend-lint backend-typecheck backend-test-unitmake backend-test-integration backend-test-api backend-test-auth backend-openapi-check./dev publication-run make backend-test-publication/make backend-test-seedInside the containers, commands used
UV_PROJECT_ENVIRONMENT=/var/tmp/lca-venv, because this worktree sits on a size-limited tmpfs. The locked packages are the same.Limitations and follow-ups
apps/frontend/srcis unchanged../devrequires a rootless daemon, and GitHub runners are rootful. The stack and smoke are therefore a documented local check here. ADR 0006 item 7 covers adding a CI smoke with L2/L3../dev app-importexists; running the path end to end is L3 ([Task] L3 — Differences toggles on the real API and local MVP acceptance #30) verification.data_pipeline/DockerfileETL image.🤖 Generated with Claude Code