Skip to content

fix: post-monorepo-migration cleanup (compose + script)#1

Open
chase2955 wants to merge 2 commits intoEVNSolution:mainfrom
chase2955:fix/post-monorepo-migration-cleanup
Open

fix: post-monorepo-migration cleanup (compose + script)#1
chase2955 wants to merge 2 commits intoEVNSolution:mainfrom
chase2955:fix/post-monorepo-migration-cleanup

Conversation

@chase2955
Copy link
Copy Markdown

Summary

Two regressions discovered while validating a fresh clone of
EVNSolution/clever-msa-platform end-to-end through this repo. Both
originate from the 1cc4008 refactoring: convert msa platform to monorepo umbrella commit on clever-msa-platform, are bundled here
because they share a root cause and the same review axis: a fresh
clone must boot through seed-runner completed successfully and
reach gateway healthy at http://127.0.0.1:8080/healthz.

Commit 1 — compose: add attendance-registry-api + db + env

development/service-attendance-registry/ exists in
clever-msa-platform (whitelisted in WORKSPACE.md, listed in
docs/mappings/current-runtime-inventory.md as active runtime), but
attendance-registry-api is absent from
docker-compose.account-driver-settlement.yml and there is no
infra/env/local/attendance-registry.env.example. Yet
development/edge-api-gateway/nginx.conf declares
upstream attendance-registry-api. On a fresh clone the gateway
container therefore fails to start with:

[emerg] host not found in upstream "attendance-registry-api" in /etc/nginx/nginx.conf:290

Mirroring the closest sibling stanza (dispatch-registry-api), this
commit adds:

  • attendance-registry-api service (build context
    ../service-attendance-registry, depends on
    attendance-registry-db and dispatch-registry-api — phase-1
    attendance source per the service README)
  • attendance-registry-db postgres stanza
  • infra/env/local/attendance-registry.env.example matching sibling
    shape (Django + Postgres + JWT + DISPATCH_REGISTRY_BASE_URL +
    DRIVER_PROFILE_BASE_URL)

Commit 2 — scripts: inventory heading drift in build_unified_openapi.py

scripts/build_unified_openapi.py:172 parses
docs/mappings/current-runtime-inventory.md looking for a heading
## Active Runtime Repos, but on main of clever-msa-platform the
canonical heading reads ## Active Runtime Source Slices. As a result
scripts/refresh_api_docs.py fails at the enabled_services step:

ValueError: Heading not found: ## Active Runtime Repos in /home/.../current-runtime-inventory.md

This blocks generating
development/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 therefore fail until the heading lookup is aligned.

Single-line fix: align the lookup with the canonical heading in
inventory.

Verified locally

After both commits applied:

  • docker compose -f docker-compose.account-driver-settlement.yml build attendance-registry-api succeeds.
  • docker compose ... up -d attendance-registry-db attendance-registry-api reaches Up healthy with Django migrations applied and gunicorn workers booting.
  • gateway container transitions from unhealthy/exit to Up healthy.
  • curl -i http://127.0.0.1:8080/healthz200 OK.
  • curl -i http://127.0.0.1:8080/api/auth/health/200 OK.
  • seed-runner reaches Seed runner completed successfully.

Trace

Discovered during fresh-clone validation for
EVNSolution/clever-change-control#23 (체이스운수 운영현황·정산·전자계산서
역발행 시스템). A consolidated audit covering all four monorepo-migration
regressions (two more in clever-msa-platform itself, addressed in
EVNSolution/clever-msa-platform#3) is being filed on
clever-change-control with cross-links to this PR.

🤖 Generated with Claude Code

chase2955 and others added 2 commits April 28, 2026 09:50
`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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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.

1 participant