Record supplied products and their transcript coverage

This commit is contained in:
2026-12-02 15:00:07 +00:00
parent 07fac1b968
commit cf8fd71a83
10 changed files with 371 additions and 32 deletions

View File

@@ -16,8 +16,16 @@ manifest placement belongs in
- remote identity metadata (`s3_bucket`, `s3_session_prefix`, `s3_run_prefix`)
- `inputs` records
- durable `artifacts` records
- optional versioned `supplied_products` records, keyed by source ID
- per-stage `stages` map, including the ordinary cleanup stage record
Supplied records hold a canonical session-relative path, SHA-256 checksum,
byte size, and optional product contract. The manifest store validates their
structure; artifact helpers check the recorded path and actual content. A
separate coverage helper derives transcript work satisfied by valid supplied
transcripts without creating records for absent intermediate products. These
foundations are not yet connected to restore or execution decisions.
Session, campaign, and run identities in local and downloaded manifests must be
portable opaque segments. Unsafe legacy identities are rejected with migration
guidance rather than being normalized into a different workspace or remote
@@ -205,8 +213,8 @@ it promote the saved target record and manifest `updated_at` into live state;
it preserves an existing target record's identity and leaves unrelated live
stage records in place.
The copy boundary includes stage records, input and artifact slices, aggregate
output/log/configuration slices, and the typed analyze and transcribe
The copy boundary includes stage records, input and artifact slices, supplied
product records, aggregate output/log/configuration slices, and the typed analyze and transcribe
collections that callbacks or `LocalStore.Save` may modify. Metadata and other
pointer fields remain shared read-only because neither checkpoint callback nor
the store mutates them. This is a bounded execution helper, not a general

View File

@@ -115,10 +115,12 @@ Each stage has one explicit responsibility and declares:
- failure behavior.
Stages write and validate run-local results before materializing canonical
outputs where that distinction applies. A stage is complete only after its
outputs where that distinction applies. Executed work is complete after its
required outputs have been written, validated, and recorded in durable manifest
state. Later stages depend on recorded success and artifact resolution, not
merely on incidental files existing on disk.
state. Validated supplied products recorded in that state can also satisfy work
according to the application's fixed coverage rules. Consumers resolve actual
recorded products; completion does not imply that an absent intermediate file
exists.
A failed or interrupted stage must not be presented as successful. Failure
should preserve enough local state and diagnostics for inspection, recovery,
@@ -154,16 +156,17 @@ adapter and publish metadata.
Resume and skip decisions are manifest-driven. Filesystem state may be
inspected and validated, but file presence alone does not replace recorded
stage state. Each invocation retains an in-memory command summary and a
run-local workspace identity, but neither is a durable progress ledger. The
stage state or accepted supplied-product records. Each invocation retains an
in-memory command summary and a run-local workspace identity, but neither is a
durable progress ledger. The
physical run directory is created on demand only when an executing stage
requires it; a fully reused invocation or a cleanup-only invocation does not
leave an empty run directory.
Restore treats committed remote current state as its authority. It must plan
deterministically, confine remote-to-local paths, protect local conflicts, and
install the validated session manifest after other restored durable files. The
physical workflow and recovery procedures belong in
Restore treats the pointer-selected publication inventory as its authority. It
must plan deterministically, confine remote-to-local paths, protect local
conflicts, and save a merged local baseline after accepting restored products.
The physical workflow and recovery procedures belong in
[Operations](../operations.md).
Restore and runner transitions for one session use the same local lock. A
@@ -206,8 +209,9 @@ Missing configuration or inspection capabilities are addressed upstream.
projections and concrete character-family artifacts as separate domain
objects before execution, without modifying configuration.
- Resume uses stage- or artifact-owned semantic evidence for observable
result-affecting configuration; overlay identity and an effective digest are
provenance, never blanket cache keys.
result-affecting configuration of locally generated work. Accepted supplied
products do not require historical generation evidence; overlay identity and
an effective digest are provenance, never blanket cache keys.
- Session templating remains narrow and deterministic rather than becoming a
general configuration language.
- Secret values are supplied indirectly and are not persisted in ordinary
@@ -234,8 +238,8 @@ and [ADR 0002](../adr/0002-assign-subprocess-content-ownership.md).
Artifact resolution is deterministic and manifest-aware. Producers materialize
canonical outputs before reporting success, and consumers resolve declared
artifact identities rather than infer files from unrelated directory contents.
Configured products become current through validated promotion and manifest
records; directory presence alone never establishes availability.
Configured products become current through validated promotion or accepted
supplied-product records; directory presence alone never establishes availability.
Writes, moves, replacements, and deletions must use narrow, explicit,
root-confined destinations. Symlinks, traversal, broad roots, and ambiguous

View File

@@ -115,7 +115,7 @@ part of this work.
## Stage 1: Introduce durable supplied-product records and fixed coverage
Status: Pending
Status: Complete
Read `internal/manifest/manifest.go`, manifest validation/store code,
`internal/artifactmodel`, and transcript/product registries.