Separate publication imports from execution recovery

This commit is contained in:
2026-12-01 02:04:19 +00:00
parent 2763890ffc
commit 935b513255

View File

@@ -13,10 +13,10 @@ own the detailed evidence. This document records decisions, explains consequence
and distinguishes recommendations from approved scope. No remediation has been
implemented by this document.
The operator has settled the main direction for topics 1 and 3. Topics 2, 4, 5,
6, and 7 need discussion. Each open topic ends with a question and space for a
response. Implementation details can be settled during planning after the
operator-facing behavior is clear.
The operator has settled the main direction for topics 1, 2, and 3. Checkpoint
upload timing in topic 2 and topics 4, 5, 6, and 7 need discussion. Each open
topic ends with a question and space for a response. Implementation details can
be settled during planning after the operator-facing behavior is clear.
## 1. Coordinate destructive cleanup with other work
@@ -61,22 +61,25 @@ Operator response:
_Optional: confirm waiting or prefer an immediate busy error._
## 2. Restore a locked publication with truthful completion records
## 2. Separate published artifacts from resumable execution checkpoints
Status: Open
Status: Separation agreed; checkpoint upload timing open
Finding: [CAT-02](catalog.md#cat-02--p2-make-restored-carried-products-agree-with-manifest-authority).
### The two records involved
### The two purposes of remote storage
The session manifest is Narratio's local progress ledger. It records which
outputs completed, their checksums, and evidence used to decide whether they can
be reused. A checksum identifies bytes. Other completion evidence describes the
inputs and settings under which an output was generated.
Remote storage serves two independent purposes:
The remote publication commit identifies the files selected for publication.
A remote lock preserves an already published product, even when a newer local
version exists. Locking publication does not prevent local regeneration.
1. Store completed artifacts for publication and later use. Publication locks
preserve selected published files.
2. Store execution checkpoints so a saved session can later be restored and
resumed, retaining its manifest, fingerprints, and applicable provenance.
The current session manifest is Narratio's local progress ledger. It records
completed work and evidence used to decide whether that work can be reused.
The remote publication commit separately identifies published files. The current
restore flow combines these records in a way that can mix different generations.
### Concrete example
@@ -96,56 +99,93 @@ The audit reproduced this result:
| Restore command | Reports success |
| Subsequent normal transcript resolution | Rejects the checksum mismatch |
The problem is not that the lock retained A. The problem is that the restored
ledger describes a different file from the one restored.
The lock correctly retained A. The failure comes from combining publication's A
with execution's manifest describing B.
### Why changing the checksum is insufficient
### Agreed direction: published artifacts
Suppose an analysis artifact was generated from B. Replacing the transcript
checksum with A's checksum does not establish that the analysis artifact was
generated from A. Likewise, retaining B's producer fingerprint would incorrectly
claim that A was generated using B's inputs and settings.
Published artifacts are finished products available for consumption. They can be
imported as inputs to a subsequent session or a fresh run of the same session.
A publication may intentionally contain products from different generations.
There is no existing requirement that all published products come from one
coherent pipeline generation. The repair needs truthful per-product evidence;
it does not require inventing that stronger publication rule.
Publication import uses file identity and location to select the requested
product. Transfer-integrity checks, such as verifying downloaded bytes against
a checksum, are separate from generation history.
### Recommendation
Generation fingerprints, historical inputs, prompts, models, settings, and
generation provenance are irrelevant to using these published products. Import
does not require reconstructing historical completion records or evaluating
whether the original producer would be reusable under today's configuration.
An imported artifact is a supplied input; it does not assert that its producer
executed in the receiving workspace.
Treat the selected remote publication as authoritative for the bytes restored.
Make those products usable through normal resolution with truthful origin
information. Assess producer reuse and dependent completion separately, using
the evidence actually available for those generations.
Published products may come from different generations. This direction adds no
requirement for a publication-wide coherent pipeline generation.
This means distinguishing "this published file is available" from "this producer
can be skipped under the current inputs and configuration." Where historical
generation evidence exists, reuse it. Where it does not, report that limitation
without fabricating completion evidence.
### Agreed direction: resumable execution checkpoints
Before choosing a representation, work through both a built-in transcript and
a configured analysis artifact, including a dependent generated from B. The
existing remote declarations must be examined to determine which historical
evidence can be recovered. The exact manifest projection or model change remains
an implementation-analysis question, not an approved redesign.
Checkpoint recovery restores a saved execution state for continuation. It
retains the manifest's progress, fingerprints, and provenance, together with the
corresponding files needed to resume. Restoring the manifest alone is insufficient
when its completed outputs are unavailable or belong to another generation.
### Viable alternative
Ordinary resume checks apply to the recovered execution state. Publication locks
govern published artifacts; they do not substitute older published files for
the outputs belonging to an execution checkpoint.
Use a conservative restore that retains the published bytes but explicitly marks
affected work unavailable for normal pipeline reuse until regeneration. This can
reduce the model change, but limits the usefulness of restore: an operator may
need to regenerate work before consuming an otherwise valid published file.
Such a restriction would need to be stated clearly and approved.
In the example above, publication import retrieves A as an input. A checkpoint
saved after generating B recovers the manifest describing B and the files needed
to resume that execution, including B. These are distinct recovery purposes.
### Consequences for remediation
Separate publication import from execution recovery rather than reconstructing
generation evidence for locked published products. The earlier proposal to
reconcile historical producer evidence for publication import is superseded by
this decision.
The two purposes can share a bucket and storage adapter. They need independent
logical records and selection rules. Physical layout, command syntax, and storage
formats remain implementation-planning matters.
Current remote-state loading, restore, status, and previous-session acquisition
depend on the uploaded session-manifest snapshot. The roadmap must examine those
consumers when separating the responsibilities. Previous-session artifact
selection already uses the publication inventory; it should consume published
products according to the import semantics above.
This decision preserves local execution checkpoints and normal resume behavior.
It does not approve automatic remote backup on each local checkpoint or select
a new checkpoint upload schedule.
### Open choice: checkpoint upload timing
The current publication-time manifest snapshot does not necessarily represent
the latest interrupted or failed local execution. "Most recent checkpoint"
must mean the most recent checkpoint saved under the chosen upload policy.
Possible policies for discussion:
- Explicit checkpoint upload: gives the operator control and avoids automatic
transfer overhead, but recovery reaches only the last explicitly saved state.
- Upload at invocation completion, including failed invocations: can preserve
partial progress automatically, but a process or host failure can occur before
that upload, and remote transfer failures need an explicit handling policy.
- Upload during execution at selected checkpoints: reduces potential lost work,
with additional transfer cost and checkpoint-publication lifecycle complexity.
No upload policy has been selected. Frequency, trigger, and transfer-failure
behavior remain open; the eventual roadmap should select them proportionately
to the recovery need.
### Question for discussion
Should a restored locked publication be immediately usable as an input, with
producer freshness evaluated separately, or is regeneration before pipeline use
acceptable? I recommend immediate input availability with truthful provenance.
When should Narratio upload resumable execution checkpoints, and what should
happen if that upload fails?
Operator response:
_Pending discussion._
_Separation approved. Checkpoint upload timing and failure behavior pending
discussion._
## 3. Inspect S3 when planning and preflighting