Migrate comparison bundles to v2

This commit is contained in:
2026-08-25 19:52:41 +00:00
parent 0c9cd6d5fb
commit b3b23fb381
9 changed files with 120 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ and retention belong to the [operations guide](../operations.md).
## Version And Layout
The current and only supported manifest schema version is
`weatherreporter.comparison.v1`. A bundle directory contains exactly these
`weatherreporter.comparison.v2`. A bundle directory contains exactly these
regular, non-symlinked files:
```text
@@ -51,7 +51,7 @@ this order:
```text
position, profileId, backendId, modelName, status, validationStatus,
reportPath, error
repairAttempts, reportPath, error
```
`startedAt` and `finishedAt` are nonzero UTC timestamps, and the latter is not
@@ -66,12 +66,15 @@ contiguous from one, profile IDs are distinct and nonblank, and
`succeeded + failed == total`.
A successful result has `status: "succeeded"`, `validationStatus: "passed"`,
and a non-negative `repairAttempts` count,
a `reportPath` exactly equal to the canonical `NN-profile-slug.md` filename for
its position, total, and logical profile ID, and no `error`. A failed result has
`status: "failed"`, no `reportPath`, and an `error` object with nonblank
`category` and `message`. Its validation status is absent, `failed`, or
`skipped`. Error messages are valid UTF-8 and no longer than 1,024 bytes.
`backendId` and `validationStatus` are omitted when unavailable.
`backendId` and `validationStatus` are omitted when unavailable. A failed
result with a completed validation (`failed` or `skipped`) must retain its
non-negative `repairAttempts`; early operational failures omit both fields.
Every successful Markdown file is declared by exactly one successful result.
The directory contains no extra entries. Consumers can therefore verify the
@@ -88,7 +91,9 @@ case-variant, or duplicate fields; multiple JSON values; extra entries;
symlinks; and future or otherwise unsupported versions. Treat a bundle that
fails recognition as an ordinary directory, not as a compatible bundle.
When replacing a recognized bundle, cancellation observed before the new
Only v2 is recognized as a replaceable bundle; v1 is unsupported and must be
moved or removed before a replacement at the same destination. When replacing
a recognized bundle, cancellation observed before the new
bundle is installed preserves the prior bundle rather than committing the
replacement.