Migrate comparison bundles to v2
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -122,7 +122,9 @@ The destination is preflighted before prompt inspection and collection, then
|
||||
rechecked immediately before an atomic publish. A missing or empty directory
|
||||
is usable. A nonempty directory can be replaced only when `--replace` is given
|
||||
and it is recognized as a current Weatherreporter comparison bundle; ordinary
|
||||
directories, symlinks, and unsafe destinations are rejected. Cancellation and
|
||||
directories, symlinks, and unsafe destinations are rejected. Existing v1
|
||||
bundles are not recognized for replacement: move or remove them first.
|
||||
Cancellation and
|
||||
all failures before publication preserve an existing bundle, including a
|
||||
cancellation observed while a replacement is being prepared. If guarded
|
||||
restoration cannot complete, the error names the retained sibling bundle for
|
||||
|
||||
@@ -386,6 +386,8 @@ GOWORK=off go test -race -count=1 ./internal/adapters/promptkit ./internal/app
|
||||
|
||||
### Stage 7: Migrate Comparison Bundles To v2
|
||||
|
||||
Status: Complete.
|
||||
|
||||
Purpose: preserve repair activity in the profile-evaluation artifact and make
|
||||
the strict durable schema change explicit.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user