Enforce quality gates on output publication

This commit is contained in:
2026-08-04 11:33:11 +02:00
parent 075d2fc087
commit 2d93ad07d2
4 changed files with 221 additions and 23 deletions
+17 -5
View File
@@ -1,10 +1,10 @@
# Datasource Stage Quality Policy
# Datasource Quality Policy
Datasource quality policy is a deterministic JSON contract stored in
`governance.quality_policy`. A tabular stage inherits the current target
Datasource policy unless the stage has its own governed definition. Validation
runs before the stage is stored, but a failed stage remains available for
inspection and correction through a new stage.
`governance.quality_policy`. A tabular stage or producer publication inherits
the current target Datasource policy unless it supplies its own governed
definition. Stage validation runs before the stage is stored, but a failed
stage remains available for inspection and correction through a new stage.
## Contract
@@ -78,6 +78,18 @@ contain only affected counts and at most 25 one-based row numbers; they never
copy field values. Promotion copies this validation object into the immutable
materialization provenance and records the policy hash in the audit event.
Producer publication uses the same gate before any catalogue target,
materialization, or publication record is persisted. A rejected output has no
partial catalogue effect. Successful output materializations retain the exact
validation result, policy version/hash, and schema classification in
`provenance.publication_validation`; the publication record retains the same
evidence for operational inspection. Dataflow, Workflow, and Reporting can
therefore consume an immutable output reference without re-running a possibly
changed quality policy. Publication also emits a transactional
`datasource.publication.published` audit/platform event; an enabled Audit
module stores it in the durable outbox, while reduced installations deliver it
through Core after commit.
Approval authority, approval expiry, and retention/deletion execution remain
separate work under `govoplan-datasources#2`. Until those contracts are added,
no JSON flag is treated as an approval and no stage is deleted automatically.