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