A permits API is changing fields that several downstream agency apps consume. What practice best protects consumers from breaking producer changes?
Select an answer to reveal the explanation.
Short Explanation
If the restaurant renames every item on the menu overnight, the delivery apps crash. Contract tests are the handshake that catches breaking API changes before citizens feel them.
Full Explanation
When a permits API changes fields consumed by multiple agency applications, producer–consumer contract tests protect interoperability. Contract tests verify that payload shapes, required fields, and compatibility rules continue to meet consumer expectations before breaking changes reach production. Combined with versioning and change communication, they reduce brittle point-to-point failure across municipal integrations. Surprise schema changes in production with no tests shift discovery cost to citizen-facing incidents and overnight fire drills. Banning all interfaces so each team copies databases manually increases coupling, credential sprawl, and stale copies rather than solving change risk. Publishing undocumented breaking changes only in a private chat channel fails accessibility, auditability, and repeatability for teams not in the room. Exam caveat: contract tests complement—not replace—semantic versioning, deprecation windows, and stewarded interface ownership; they catch compatibility breaks but do not by themselves design a good domain model. Operational check: maintain consumer-driven or bilateral contracts in CI for the permits API, fail builds on incompatible producer changes, publish a deprecation timeline for field removals, and require consumer acknowledgment before cutting over major versions.