From 8da4946be27aa045e8d60315f197ece9bee69065 Mon Sep 17 00:00:00 2001 From: chase2955 Date: Tue, 28 Apr 2026 09:50:58 +0900 Subject: [PATCH 1/2] fix(compose): add attendance-registry-api + db + env example `development/service-attendance-registry/` exists in clever-msa-platform and is whitelisted in WORKSPACE.md, but attendance-registry-api is absent from docker-compose.account-driver-settlement.yml and there is no attendance-registry.env.example. The gateway nginx.conf already declares `upstream attendance-registry-api`, so on a fresh clone the gateway container fails with: [emerg] host not found in upstream "attendance-registry-api" in /etc/nginx/nginx.conf:290 Mirrors the dispatch-registry-api stanza (closest sibling) and adds: - attendance-registry-api service (build context ../service-attendance-registry, depends on attendance-registry-db and dispatch-registry-api per service README phase-1 source rule) - attendance-registry-db postgres stanza - attendance-registry.env.example with Django + Postgres + JWT defaults and DISPATCH_REGISTRY_BASE_URL + DRIVER_PROFILE_BASE_URL. Verified locally: `docker compose up -d attendance-registry-db attendance-registry-api gateway` reaches healthy and `curl /healthz` returns 200. Trace: required by EVNSolution/clever-change-control#23. Co-Authored-By: Claude Opus 4.7 --- docker-compose.account-driver-settlement.yml | 20 +++++++++++++++++++ .../env/local/attendance-registry.env.example | 15 ++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 infra/env/local/attendance-registry.env.example diff --git a/docker-compose.account-driver-settlement.yml b/docker-compose.account-driver-settlement.yml index 78cd13f..a168cbd 100644 --- a/docker-compose.account-driver-settlement.yml +++ b/docker-compose.account-driver-settlement.yml @@ -158,6 +158,17 @@ services: expose: - "8000" + attendance-registry-api: + build: + context: ../service-attendance-registry + env_file: + - ./infra/env/local/attendance-registry.env.example + depends_on: + - attendance-registry-db + - dispatch-registry-api + expose: + - "8000" + region-registry-api: build: context: ../service-region-registry @@ -416,6 +427,15 @@ services: expose: - "5432" + attendance-registry-db: + image: postgres:16-alpine + environment: + POSTGRES_DB: attendance_registry + POSTGRES_USER: attendance_registry + POSTGRES_PASSWORD: attendance_registry + expose: + - "5432" + region-registry-db: image: postgres:16-alpine environment: diff --git a/infra/env/local/attendance-registry.env.example b/infra/env/local/attendance-registry.env.example new file mode 100644 index 0000000..d67beb4 --- /dev/null +++ b/infra/env/local/attendance-registry.env.example @@ -0,0 +1,15 @@ +API_PORT=8000 +DJANGO_SECRET_KEY=change-me +DJANGO_DEBUG=1 +DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,attendance-registry-api +POSTGRES_DB=attendance_registry +POSTGRES_USER=attendance_registry +POSTGRES_PASSWORD=attendance_registry +POSTGRES_HOST=attendance-registry-db +POSTGRES_PORT=5432 +JWT_SECRET_KEY=change-me-local-jwt-secret-key-32chars +JWT_ISSUER=msa-server +JWT_AUDIENCE=msa-server +JWT_ALGORITHM=HS256 +DISPATCH_REGISTRY_BASE_URL=http://dispatch-registry-api:8000 +DRIVER_PROFILE_BASE_URL=http://driver-profile-api:8000 From 8aa3c6f8fb7d694ff0ebbd89276ee15ee2590ee2 Mon Sep 17 00:00:00 2001 From: chase2955 Date: Tue, 28 Apr 2026 09:50:58 +0900 Subject: [PATCH 2/2] fix(scripts): align inventory heading lookup in build_unified_openapi.py build_unified_openapi.py:172 parses clever-msa-platform/docs/mappings/current-runtime-inventory.md looking for `## Active Runtime Repos`, but on main the canonical heading is `## Active Runtime Source Slices`. refresh_api_docs.py therefore fails: ValueError: Heading not found: ## Active Runtime Repos in /home/.../current-runtime-inventory.md This blocks generating edge-api-gateway/public-api-docs/openapi.yaml, revision.json, and service-export-manifest.json, which the gateway Dockerfile requires via `RUN test -f`. Fresh-clone gateway image builds fail until the lookup is aligned. Single-line fix: align the heading with the canonical inventory. Trace: required by EVNSolution/clever-change-control#23. Co-Authored-By: Claude Opus 4.7 --- scripts/build_unified_openapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_unified_openapi.py b/scripts/build_unified_openapi.py index 8e364d8..67d7027 100644 --- a/scripts/build_unified_openapi.py +++ b/scripts/build_unified_openapi.py @@ -169,7 +169,7 @@ def parse_table_after_heading(path: Path, heading: str) -> list[dict[str, str]]: def load_active_services() -> list[ServiceMetadata]: - inventory_rows = parse_table_after_heading(INVENTORY_PATH, "## Active Runtime Repos") + inventory_rows = parse_table_after_heading(INVENTORY_PATH, "## Active Runtime Source Slices") matrix_rows = parse_table_after_heading(RESPONSIBILITY_MATRIX_PATH, "## Matrix") matrix_by_repo = {row["Target repo"]: row for row in matrix_rows}