Local Stack and Migrations
Extend machine-local configuration, environment generation, containers, and durable schema safely.
Add a Configuration Field
- Add the field to the schema in
scripts/stack.ts. - Add a complete safe placeholder to
config/local-stack.example.json. - Update
config/local-stack.schema.jsonwhen the generated schema is tracked separately. - Map it to every required host and container environment file.
- Update the consuming app’s environment validator.
- Represent optional values explicitly only where the schema maps empty to
undefined. - Add stack-generator tests.
- Update Local Stack.
Generated environment files are outputs. Do not add another local environment contract or ask operators to edit generated files.
Add a Container Service
- Keep the Dockerfile with the owning app.
- Add a health check.
- Wait for healthy infrastructure and one-shot migrations.
- Use Compose DNS names inside containers.
- Make persistent/disposable lifecycle explicit.
- Add bounded idempotent shutdown.
- Log startup, shutdown, failures, and recovery—not every healthy tick.
Agent images use the Debian/glibc Bun base with CA certificates and required shell tooling. Do not move Codex execution to Alpine without proving binary and TLS compatibility.
Add a Migration
- Update shared and app-local typed contracts.
- Change schema enums, tables, and relationships in their owning modules.
- Generate the migration and snapshot.
- Inspect generated SQL.
- Update repositories and lifecycle services.
- Update endpoint validators and OpenAPI.
- Add migration and repository tests.
- Verify upgrade behavior against existing state.
Do not edit an already-applied migration to represent a new schema change.
Add a Pinned Vendor Binary
Install it during the owning image build with an exact version and per-architecture checksum. Keep integration binaries below their provider-owned directory and off the global path. Rebuild and verify every affected image.