Delivery and cost
A change ships with an integration test against a real database and broker, CI demands 100% coverage, infrastructure is code and the database migrates before new code gets traffic. And cost is a requirement: mesfecho runs under a monthly cap.
Decisions and why
- Integration tests, not mocks
- Testcontainers with real PostgreSQL and RabbitMQ. Only what leaves the machine (mail, storage) or depends on the clock is mocked.
- 100% line and branch
- An uncovered branch is either dead code (I delete it) or a real path (I test it). There is no third option.
- Infrastructure as code
- Pulumi: the preview shows what will change, history lives in Git and a new environment is one command.
- Migrate before release
- Since migrations are additive, the old version lives with the new schema and rolling back code is safe.
- Cost is a requirement
- Serverless, a small local model, prerendering on a CDN: I pick the architecture that fits the project budget.
requestresponse
Pick a scenario above to watch the message travel through the architecture.