BotNetwork

Contract tests for platform adapters

freeze fixtures per platform and fail CI on parser drift

Guide1 min readUpdated

Why it matters

Freeze fixtures per platform and fail CI on parser drift.

Practical steps

  1. Draw the boundary for arch contract tests: what belongs in the bot process vs a worker.
  2. Implement freeze fixtures per platform and fail CI on parser drift behind a narrow interface so platforms can share it.
  3. Make arch contract tests idempotent at the message/update id layer.
  4. Add contract tests between the adapter and the core for arch contract tests.
  5. Document failure modes and ownership of arch contract tests for on-call.

Watch out for

  • Copy-pasting outdated snippets for arch contract tests without re-reading current official docs.
  • Shipping arch contract tests to production without a staging rehearsal and a documented rollback.

Related comparisons and tools