Route report projections through prepared identity

This commit is contained in:
2026-08-13 02:00:18 +00:00
parent e2dd8d0e29
commit 360c665a3e
15 changed files with 163 additions and 253 deletions

View File

@@ -77,13 +77,13 @@ are unavailable. Empty alert and outlook runs can still produce checked-empty
modules. SPC discussion is omitted unless a retained categorical outlook meets
the package's severity criterion and matching discussion text exists.
Effective units, timezone, and location context arrive in `ModuleContext` from
configuration and resolved report metadata. Report preparation also creates one
`PreparedIdentity` for the shared report identity, timing, configuration
context, and source warnings. Briefing metadata derives its matching fields
from that value; module projections retain their prompt-safe shape. Field
defaults are owned by [configuration](../config.md), and prompt-package layout
is owned by [prompt input](prompt-input.md).
`ModuleContext` carries the effective units, timezone, location context, and
prepared identity. Report preparation creates that one `PreparedIdentity` for
the shared report identity, timing, configuration context, and source warnings
before module construction. The metadata module projects its matching fields
from that value and retains its prompt-safe shape. Field defaults are owned by
[configuration](../config.md), and prompt-package layout is owned by [prompt
input](prompt-input.md).
## Verification and invariants

View File

@@ -6,15 +6,14 @@ and profile comparison; it is not a durable artifact.
Preparation first establishes one `PreparedIdentity` for the report run, report
and prompt IDs, variant, generation time, units, timezone, valid period,
location, and source warnings. It then builds report facts, the configured
module snapshot, briefing metadata, the curated prompt-input package,
serialized YAML, and the generated-text definition. The current metadata
projections remain equivalent to that identity while each retains its own
boundary-specific shape.
location, and source warnings. It passes that identity to the configured module
snapshot, curated prompt-input package, serialized YAML, generated-text render
context, and generated-text definition. Each boundary projects only the fields
it needs from that prepared authority.
Preparation deep-copies mutable facts, snapshots, identity, metadata, and
data-package bytes before returning them. Consumers receive independent copies
so one execution cannot change another's input or rendering context.
Preparation deep-copies mutable facts, snapshots, identity, and data-package
bytes before returning them. Consumers receive independent copies so one
execution cannot change another's input or rendering context.
Single-report generation executes one prepared profile and publishes its
Markdown. Comparison prepares once, gives every selected profile the same YAML

View File

@@ -4,7 +4,7 @@
## Package Construction
`Build` produces `weatherreporter.data_package.v4`. It copies the run ID; report ID, variant, prompt ID, generation time, timezone, local current date, and valid period; ordered briefing stanzas; and prompt-safe source-warning summaries. Warning summaries include only source, code, severity, message, and completeness impact; raw transport and provenance fields such as endpoints never cross into the provider input. Prompt input contains no historical comparison section.
`Build` produces `weatherreporter.data_package.v4`. Its metadata projection comes from the prepared report identity and copies the run ID; report ID, variant, prompt ID, generation time, timezone, local current date, and valid period; ordered briefing stanzas; and prompt-safe source-warning summaries. Warning summaries include only source, code, severity, message, and completeness impact; raw transport and provenance fields such as endpoints never cross into the provider input. Prompt input contains no historical comparison section.
Briefing is a flat ordered set of stanza values. `Build` uses each output's `DataPackageValue`, so curated prompt exports take precedence and rich values are used only as a fallback. Prompt exports are selected by the [briefing registry](briefing.md), while the rich-versus-prompt contract is in [module internals](module.md).