One business rule, three entry points. Who guarantees consistency?
I've been building Django Nova, an open-source toolkit that connects Django models with Pydantic schemas. One problem keeps coming up in backend systems: the same data can enter through different paths. Consider an invoice:
- A background job imports it.
- A domain service processes it.
- A reviewer updates it through a DRF API.
All three paths should agree on what makes the invoice valid.
But what happens when a PATCH request omits a field? What if an adapter silently evaluates a default again? Or validation rejects an update after the in-memory object has already changed?
Django Nova already supports complete-state validation during partial DRF updates. I'm exploring a reusable cross-adapter regression scenario to verify consistency across all three entry points.
My proposed test would check omitted vs. explicit null, unchanged fields, callable defaults, and persisted database state after a rejected update.
How do you test this in your own systems?
Do you maintain shared domain-level contract tests, test every adapter independently, or use another approach?
I'd especially like to hear from developers working with document imports, financial workflows, or back-office automation.
GitHub: github.com/Artem7898/django-nova







Comments
0 comments