Notify hourly generated reports after success

This commit is contained in:
2026-06-14 05:13:40 +00:00
parent 9e14a9b7c7
commit f6e20d1412
5 changed files with 188 additions and 15 deletions

View File

@@ -35,14 +35,14 @@ weatherreporter inspect prior [--config PATH] RUN_ID
weatherreporter inspect sources [--config PATH] RUN_ID
```
Implemented Markdown `generate` commands write a JSON module snapshot, YAML
data package, preflight artifact, managed Markdown report, and metadata under
the configured workspace. `--out` writes an extra Markdown copy for the
operator on those Markdown-path commands; distributor notification uses the
managed report path, not the extra copy. `generate hourly` covers the next six
hours in the effective report timezone, does not accept date or event window
flags, writes managed generated-text artifacts, validates the structured text,
and renders the managed Markdown report from the embedded hourly template.
Implemented `generate` commands write a JSON module snapshot, YAML data package,
preflight artifact, managed Markdown report, and metadata under the configured
workspace. `--out` writes an extra Markdown copy for the operator; distributor
notification uses the managed report path, not the extra copy. `generate
hourly` covers the next six hours in the effective report timezone, does not
accept date or event window flags, writes managed generated-text artifacts,
validates the structured text, and renders the managed Markdown report from the
embedded hourly template.
`generate storm` requires explicit event-window bounds with `--start` and
`--end`.

View File

@@ -97,6 +97,11 @@ For `generated_text_template` reports, generation then:
16. Renders Markdown from the embedded template to the managed report path.
17. Saves final metadata with generated-text paths, render context path, schema
ID, and managed report path.
18. Copies the managed report to the requested `--out` path when provided.
19. If distributor notification is enabled, notifies using the managed report
path as the source file.
20. Saves a distributor notification debug artifact and updates metadata with
its path.
If render preflight returns both a result and an error, preflight JSON and
metadata are persisted before the error is returned. If Scriptorium report

View File

@@ -31,7 +31,10 @@ the effective report timezone and is not part of scheduled morning or evening
batches. It builds the same module snapshot and data package, runs
`scriptorium render` as preflight, runs structured `scriptorium run` to raw
GeneratedText JSON, validates the structured text, saves a render context, and
renders the managed Markdown report from the embedded hourly template.
renders the managed Markdown report from the embedded hourly template. When
distributor notification is enabled, hourly uploads the managed Markdown report
after final metadata is saved. `--out PATH` writes an extra Markdown copy and
is not used as the distributor upload source.
Batch commands:
@@ -193,11 +196,10 @@ report generation has a distinct retry identity. The default bundle path uses
the valid-period start date, artifact group, and RunID. Distributor owns
destination merge, retention, and derived snapshot behavior such as `latest`.
Notification happens after final metadata save for Markdown-path generation.
Weather API, module snapshot, data-package, render preflight, Scriptorium run,
and metadata-save failures do not trigger notification. Hourly generated-text
reports write the managed Markdown report and generated-text artifacts but do
not notify distributor yet. A notification failure fails that report.
Notification happens after final metadata save for generated reports. Weather
API, module snapshot, data-package, render preflight, Scriptorium run,
generated-text validation, template rendering, and metadata-save failures do
not trigger notification. A notification failure fails that report.
In a batch, other reports continue, the failed report includes notification
fields in the JSON summary, and the batch returns nonzero.