11. Report publication: versioned definitions, sign-off, contracted delivery, lineage and restatement
11. Report publication: versioned definitions, sign-off, contracted delivery, lineage and restatement
Date: 2026-10-26
Status
Accepted
Problem
"Downstream" for Acme is not only systems that subscribe to business events (ADR 7). It also includes published reports: figures that leave the platform as files or feeds for Finance and, assumed until Q2 is answered, clients and partners, on a cadence, and that people act on and later ask questions about. The architect's reference for this half of the problem is a statistical reporting platform at a public-sector agency, where the upstream (intake, validation, transcoding) was strong and the downstream was the weak half: reports generated by hand, delivered over an inherited channel, with no lineage from a published figure back to the source record, no recorded sign-off, and no answer to "what happens when a source corrects a file after the report went out". The same questions apply here:
- Report generation. What the reports are, who defines them, how a definition change is versioned and released.
- Delivery. Whether the recipient's channel (SFTP, API, email, a Power BI app) is contractual or a habit, and what the alternatives are.
- Lineage. Tracing a published figure back through Gold and Silver to the landed file and source window it came from.
- Restatement. Marketing data restates (Google Ads conversions, reloads after reconciliation). If a figure changes after a report was delivered: reissue, version or supersede? Is the previously published figure retained? Who decides?
- Sign-off. Who approves a report before it leaves, and whether that approval is recorded.
- Retention and audit. How long each publication is kept and what an auditor needs to reconstruct it.
- Access. Who may see what at Gold and in the delivered files.
⚠️ Requires stakeholder input: the report set, definitions and cadence; whether the delivery channel is contractual; what recipients do on a restatement; retention periods. Asked in open questions Q2 (reconcile or reload, which carries the restatement and sign-off policy); the report set and channels are open items there. The decision below is the mechanism; the policy values are theirs.
Decision
We will treat publication as a pipeline with the same discipline as ingestion.
- Report definitions as code. One definition per report (YAML plus a Python renderer): name, owner, approver, audience, grain, Gold tables and measures, filters, format (CSV, XLSX, PDF), cadence, recipients and channel. Versioned in Git and released through the deployment pipeline; a change is a new definition version, and the version is stamped on every publication.
- Generation from pinned Gold versions. The report
generator (Fabric notebook, Python) reads Gold at explicit Delta
versions and writes a publication manifest: definition
version, period, the Gold table versions used, generator version,
generated-at, and
supersedes(if a revision). Files go toFiles/publications/{report}/{period}/{version}/. Any publication can be reproduced by re-running its definition at its pinned versions. - Sign-off before release. The orchestrator routes a
generated publication to the named approver through a Power Automate
approval in Teams; the decision (approver, time, comment) is written to
control.publication_log. The delivery adapter refuses a publication without an approved row. - Delivery over the contracted channel. A delivery
adapter sends approved files over whatever the recipient's contract
requires: SFTP with key authentication, an HTTPS API, email, or a Power
BI app for recipients who accept it. Files and messages are flagged
originalorrevision. Delivery evidence (file hash, channel response, time) is recorded; retries and dead-lettering as for webhooks. FTP in clear is not offered; where a recipient insists on FTP, it is recorded as a risk accepted by the business. - Lineage. Publication manifest → Gold Delta versions
(time travel) →
_batch_idon every Gold and Silver row → Bronze rows → landing manifest → source window and extraction time. Tokens keep the chain free of identifiers. A published figure can be explained to an auditor as a query over pinned versions plus the batch ids it aggregates. - Restatement policy. When Gold for an
already-published period changes beyond tolerance, the Gold jobs emit
metrics.restated; Activator triggers re-publication for the affected period. The generator produces a new revision withsupersedesset and a change summary (per measure: before, after, cause: reload, replay, logic change); it goes through sign-off again and is delivered flaggedrevision. Previous publications are retained and retrievable; nothing is overwritten. A closed-period freeze (no automatic re-publication after period close, revisions on request only) is available as a per-report setting for Finance. - Retention and audit. Publications, manifests and
the publication log are retained for the longer of the recipient's
contractual period and the company retention schedule (assumption: 7
years for financial reporting); the log is append-only;
report.publishedandreport.supersededare business events on the bus. - Access. Row- and object-level security stays in the semantic model for interactive use; a report definition carries its audience, and a recipient receives only the rows its definition filters to (for example one client's campaigns).
Considered Options
| Option | Summary | Pros | Cons |
|---|---|---|---|
| ✅ Python generation from pinned Gold versions, recorded sign-off, delivery adapter, version-and-supersede | As above | Reproducible figures; lineage to the source window; sign-off and delivery are evidence, not habits; restatement is explicit; any channel behind one adapter | Definitions must be maintained as code; approvers become a step in the pipeline; a revision policy must be agreed with each recipient |
| Manual export and scripted upload | Analyst exports, a script uploads | No build | Invisible, untestable, no lineage, no sign-off record; the pattern the reference design is replacing. Rejected. |
| Power BI paginated reports with subscriptions | Reports rendered and emailed by the service | No code for internal audiences; good formatting | No pinned-version manifest, weak restatement evidence, external channels limited to email; kept for internal distribution where lineage is not required |
| Third-party reporting or distribution tool | Vendor product | Mature scheduling and delivery | Another vendor in the data path; lineage and restatement semantics are the vendor's; cost. Not justified at this report count |
| Overwrite on restatement | Replace the delivered file in place | Simplest for recipients who only want "the latest" | Destroys the record of what was published; fails audit. Rejected; recipients who want only the latest receive the revision flagged as such |
Consequences
Positive:
- A published number is explainable: definition version, Gold versions, batch ids, source window.
- Restatements are visible events with a change summary instead of silent drift between two files.
- Sign-off and delivery leave evidence without anyone keeping a spreadsheet.
Negative / Trade-offs:
- A Gold schema version bump must be tested against every definition before release (contract test in CI).
- Approval latency is now part of publication latency; delegation and SLAs for approvers are needed.
- Recipients that cannot accept revisions need a per-report policy (hold and notify).
Risks: | Risk ID | Description | Impact (E/H/M/L) | Mitigation | |---------|-------------|------------------|------------| | R1 | A recipient's contract forbids re-delivery or demands a fixed format on restatement | M | Per-report policy; hold-and-notify option; contract review before launch | | R2 | Approver unavailable; reports late | M | Delegation rules; reminder and escalation in the flow; SLA per report | | R3 | Definition drifts from the Gold schema | M | Definitions versioned with the schema; contract tests at G2 | | R4 | Channel credentials (SFTP keys, API tokens) leak | H | Key Vault, managed identity, rotation runbook | | R5 | Recipient insists on plain FTP | M | Risk recorded and accepted by the business owner; SFTP offered |
Related
- Related ADRs: 5 (where restatements originate), 7 (events), 9 (interactive access)
- Related requirements: Timely visibility; Data integrity (auditable); Architecture evolution
- Related documents: Dynamic — publish and restate, control tables, business architecture
- Principles: BP-01, DP-02, AP-03, AP-04
- TOGAF phase: C (Application)
- Decision maker(s): Lead Architect
- Stakeholders: Marketing Operations, Finance, recipients' integration owners, internal audit