Local stack bring-up¶
Relocated from the root CLAUDE.md. See also
Quartz local development and
local MongoDB development.
Local stack bring-up invariant (scripts/setup-local.sh + process-compose.yaml)¶
The local stack deliberately runs API and Project Management with two different
ActiveEnvironment readings, and both are load-bearing. Do not "simplify" either side.
- Overlay selection is command-line.
setup-local.shappends-- ... --ActiveEnvironment=localtoCMD_API/CMD_PM(and already did forCMD_QUARTZ).HostExtensions.GetEnvironmentName()builds its probe withAddCommandLinelast, and its result selectsappsettings.{env}.json. Remove the flag and the services look for a non-existentappsettings.staging.json, so the generated per-worktreeappsettings.local.json— Mongo/RabbitMQ ports, mock OIDC — is never loaded and startup fails. - Effective identity is the
SYRF__environment.process-compose.yamlexportsSYRF__RuntimeEnvironment=staging,SYRF__ActiveEnvironment=stagingandSYRF__BulkPdfStorage__EnvironmentRoot=staging.CreateSyrfWebApplicationBuilderappendsAddEnvironmentVariables("SYRF__")after theWebApplicationBuilder's own command-line source, so the effectiveActiveEnvironmentvalue staysstagingandBulkPdfDeploymentIdentitystill matches exactly. Reordering those two sources breaks one side or the other. - Application arguments go after
--.dotnet runparses--urlsas its own option otherwise. - Only
BulkPdfStorage:PublicBaseUrlpoints atpdf-static.pdf-staticserves the agent's bulk output directory alone.PdfSettings:BaseUrlis the legacy link base used byBulkPdfLinkServicefor studies without aBulkPdfDeliveredPath; it keeps the local template's own value and must not be overridden to the bulk server. - Compose project name. Every
docker composeinvocation passes-p "${COMPOSE_PROJECT_NAME:-syrf-local}".setup-local.shexports a per-worktree name; directprocess-composeinvocations sharesyrf-localunless you export your own.
.github/scripts/test-local-bulk-pdf-authority.sh pins this contract; changing either side
fails CI until the test is updated deliberately.