Correctness¶
The harness defines correctness as evidence that a published dbwarden package can move a real database between intended schema states and describe the result accurately.
Correctness is layered:
- The package installs and exposes the public CLI.
- The provider starts and reports the expected server version.
- The migration file is generated and has the expected artifacts.
- The database accepts and applies the SQL.
- The resulting state matches the reference schema.
- The server enforces the constraints the models declared.
- Reverse-engineered models can be loaded by a consumer project.
- Public diff reports no remaining operations.
- Regenerating from unchanged models produces nothing at all.
- Rollback and reapplication preserve the expected history.
A command exit code is therefore only one assertion in a passing test.
Steps 6 and 9 are the two a shape comparison cannot reach. A schema can match the reference and still accept rows the models forbid, and it can be correct and still be rewritten on every deploy.