Publish products without execution ledgers

This commit is contained in:
2026-12-02 15:50:59 +00:00
parent ebdf8b522f
commit 4f50a57a38
21 changed files with 115 additions and 359 deletions

View File

@@ -188,8 +188,8 @@ Artifacts package owns shared remote current-state loading mechanics used by
restore, status and validation checks, and previous-cache planning.
`LoadCurrentInventory` reads and verifies the pointer-selected commit without
fetching an execution snapshot. Status, publication inspection, and session
configuration acquisition use that inventory. The existing restore and
previous-cache paths still use the snapshot reader until their cutover.
configuration acquisition and previous-session acquisition use that inventory.
The existing restore path still uses the snapshot reader until its cutover.
The selected session manifest is accepted only with
`schema_version: narratio.session-manifest.v2` and complete stage identity.
@@ -267,7 +267,7 @@ generation, and removal is idempotent.
- S3 session/run/current-state key layout.
New publication creates run-scoped immutable objects, including
`runs/{run_id}/commit.json` and `runs/{run_id}/session-manifest.json`. The sole
`runs/{run_id}/commit.json`, without an execution snapshot. The sole
mutable selector is `current/commit-pointer.json`; readers verify its selected
commit and declared object generations/checksums.

View File

@@ -22,7 +22,6 @@ Materialize canonical current-session inputs before processing stages.
- `inputs/players.yml`
- `inputs/party.yml`
- prepared recordings in `audio/` when audio is acquired
- optional `inputs/previous/manifest.json`
- optional `inputs/previous/artifacts/**`
- deterministic `manifest.inputs` entries (checksums + provenance)
@@ -57,7 +56,7 @@ Materialize canonical current-session inputs before processing stages.
see [previous requirement collection](artifacts.md#previous-requirement-collection).
- clears managed `inputs/previous/` state on every invocation, then, when requirements exist:
- resolves the pointer-selected previous source through the shared resolver;
- downloads previous manifest/artifacts;
- downloads declared previous artifacts;
- records previous inputs in `manifest.inputs`.
Required previous-session inputs fail when unavailable; optional missing inputs

View File

@@ -15,7 +15,7 @@ Upload run/session outputs to object storage and atomically advance remote curre
## Outputs
- uploaded session manifest, prepared campaign/session/party inputs, declared
- uploaded prepared campaign/session/party inputs, declared
run-local diagnostics, and selected publish outputs;
- uploaded durable previous-session cache files when present;
- immutable run-scoped commit manifest; and
@@ -31,8 +31,8 @@ manifest-derived archive metadata, confined opening, and checksum validation
live in `publish_sources.go`; artifact-catalog matching, selection, required
and optional rules, destination resolution, and collision inputs live in
`publish_outputs.go`. Copying, hashing, immutable upload, reuse checks, and
remote verification live in `publish_transfer.go`; committed-manifest,
immutable-commit, and current-pointer encoding and writes live in
remote verification live in `publish_transfer.go`; immutable-commit and
current-pointer encoding and writes live in
`publish_commit.go`. `publish_output_plan.go` owns the deterministic, I/O-free
five-outcome model and its secret-free metadata projection. Prepared input
objects are committed under the immutable run; the committed standalone session
@@ -53,7 +53,7 @@ supports remote loading when no authored session override is available. The
- opens each archive candidate beneath its archive root without following
symlinked ancestors or leaf entries, verifies that it is a regular file and
checks a declared checksum when present, then streams the opened descriptor.
- derives the durable previous-cache archive from its validated manifest using
- derives the durable previous-cache archive from recorded previous inputs using
the same confinement and regular-file checks.
- resolves publish output sources through runtime artifact catalog and
manifest-aware resolution. Configured Scriptorium outputs are publishable
@@ -106,8 +106,8 @@ Includes counts/lists for:
## Invariants
- `current/commit-pointer.json` is the remote commit marker and is written last.
- run files, selected outputs, previous-cache files, and the committed session
manifest are all declared by an immutable commit under the run prefix.
- run files, selected outputs, and previous-cache files are declared by an
immutable commit under the run prefix. Execution ledgers are not published.
- run and previous uploads contain only manifest-declared regular files opened
from verified descriptors. Symlinks, special files, and changed declared
content are rejected; undeclared entries are ignored. A later invalid source

View File

@@ -572,12 +572,16 @@ Publish commit model:
- uploads configured published outputs and `previous/**` cache files into the
same immutable run scope, including only explicitly configured extraction
lanes;
- does not upload the local execution ledger; and
- writes `{session_prefix}/runs/{run_id}/commit.json` after all declared
immutable objects are uploaded and verified; and
- writes `{session_prefix}/current/commit-pointer.json` once, last.
`current/commit-pointer.json` is the remote current-state commit marker. It
selects exactly one immutable commit, which declares the complete object set.
The current restore implementation still expects a published execution ledger;
new publications cannot be restored until the inventory-based restore cutover
described in the [implementation roadmap](roadmap/implementation.md) lands.
## Remote Commit Migration

View File

@@ -311,7 +311,11 @@ Validation: `go test ./internal/artifacts ./internal/app`.
## Stage 9: Use inventory-only history and stop publishing execution ledgers
Status: Pending
Status: Complete
Cutover note: `TestPreparedSessionPublishAndRemoteLoad` currently fails because
new publication omits the execution snapshot still required by restore. Stage 11
replaces that restore reader and must resolve this expected integration failure.
Read `internal/previouscache`, `stage/prepare_previous.go`,
`publish*.go`, and consumers of remote manifest fields.