Why it matters
Fake platform ports in unit tests; reserve network for contract suites.
Practical steps
- Draw the boundary for arch port adapters tests: what belongs in the bot process vs a worker.
- Implement fake platform ports in unit tests; reserve network for contract suites behind a narrow interface so platforms can share it.
- Make arch port adapters tests idempotent at the message/update id layer.
- Add contract tests between the adapter and the core for arch port adapters tests.
- Document failure modes and ownership of arch port adapters tests for on-call.
Watch out for
- Copy-pasting outdated snippets for arch port adapters tests without re-reading current official docs.
- Shipping arch port adapters tests to production without a staging rehearsal and a documented rollback.