Remove completed session restore planning documents
All checks were successful
ci/woodpecker/push/verify Pipeline was successful
All checks were successful
ci/woodpecker/push/verify Pipeline was successful
This commit is contained in:
@@ -248,8 +248,8 @@ CAT-08 are closed in the catalog). Build on those acquisition paths while
|
||||
changing discovery; preserve their identity, transfer bounds, and streaming
|
||||
behavior. This feature does not reopen the storage/resource remediation scope.
|
||||
|
||||
The [session-restore roadmap](session-restore.md) enables downstream work without
|
||||
The implemented [publication-import workflow](../operations.md#restore-workflow) enables downstream work without
|
||||
raw audio. This roadmap concerns workflows that actually select and transcribe
|
||||
audio. Neither roadmap requires completing the other first. Remote execution
|
||||
audio. These features have independent scopes. Remote execution
|
||||
checkpoints, new audio-size caps, additional format conversions, and live-stream
|
||||
input support are outside this scope.
|
||||
|
||||
@@ -33,10 +33,10 @@ shared change surfaces, not extra prerequisites.
|
||||
|
||||
## Remediation Ownership And Remaining Decisions
|
||||
|
||||
The [session-restore roadmap](../session-restore.md) owns the agreed redesign for
|
||||
importing published artifacts. The [audio-inputs roadmap](../audio-inputs.md) owns
|
||||
Published-artifact import is implemented; [Restore Internals](../../internal/command-restore.md)
|
||||
describes its behavior. The [audio-inputs roadmap](../audio-inputs.md) records
|
||||
shared audio discovery and the approved multi-format extension of CAT-12.
|
||||
Disposition notes below relate findings to those roadmaps without expanding
|
||||
Disposition notes below relate findings to these features without expanding
|
||||
their scope. Unless assigned otherwise, a finding remains independent audit
|
||||
remediation. Shared code does not make a refactoring a prerequisite or assign
|
||||
the whole finding to a roadmap.
|
||||
@@ -46,7 +46,7 @@ planning, prerequisite-history, publication-import, and associated documentation
|
||||
work; 26 remain open. **Planned** identifies
|
||||
an agreed remedy awaiting implementation. **Potentially eliminated** requires verification that the offending
|
||||
lifecycle is removed. **Coordinate** identifies shared changes, not a commitment
|
||||
that the roadmap implements the entire finding. Findings close only after their
|
||||
that a related feature implements the entire finding. Findings close only after their
|
||||
relevant behavior or code removal is verified. Original audit reports, finding
|
||||
identities, priorities, and source links remain unchanged.
|
||||
|
||||
@@ -103,8 +103,8 @@ Acquisition-path progress reporting and its command-level regression were
|
||||
completed in `89c8e5d`; the review follow-up is resolved.
|
||||
|
||||
**Disposition / owner.** Independent locking remediation — the [agreed direction](discussion.md#1-coordinate-destructive-cleanup-with-other-work)
|
||||
permits one workspace-wide lock. Restore will use that coordination, but the
|
||||
[restore roadmap](../session-restore.md) does not own this fix. Cancellation-aware
|
||||
permits one workspace-wide lock. [Restore](../../internal/command-restore.md) uses
|
||||
that coordination; locking remains a separate remediation. Cancellation-aware
|
||||
waiting is implemented and verified.
|
||||
|
||||
Original findings: [CN-01](04-concurrency.md#cn-01--p1-whole-session-cleaning-bypasses-and-can-dismantle-session-exclusion),
|
||||
@@ -133,8 +133,8 @@ without installing remote execution evidence. The publish–lock–generate–re
|
||||
round trip for a transcript and configured artifact, downstream source resolution,
|
||||
and republishing are covered by
|
||||
[`import_workflow_test.go`](../../../internal/app/import_workflow_test.go).
|
||||
The [restore roadmap](../session-restore.md#build-and-consume-restore-defined-completion)
|
||||
owns the implemented product-import model.
|
||||
[Restore Internals](../../internal/command-restore.md#installation-and-local-baseline)
|
||||
describes the implemented product-import model.
|
||||
|
||||
Original findings: [FC-02](01-correctness.md#fc-02--p2-carried-publication-bytes-conflict-with-restored-manifest-evidence),
|
||||
[TE-02](08-testing.md#te-02--p2-publication-and-restore-tests-do-not-prove-carried-output-authority-is-coherent).
|
||||
@@ -145,7 +145,7 @@ retains B's completion evidence. Restore can succeed with A's bytes and B's
|
||||
checksum/fingerprint authority; normal resolution then rejects the restored
|
||||
product. Separate publish/restore tests miss this interaction.
|
||||
|
||||
**Direction.** Implement the roadmap's publication import and locally synthesized
|
||||
**Direction.** Use publication import and locally synthesized
|
||||
completion instead of restoring historical execution evidence. Retain
|
||||
publish–lock–regenerate–republish–restore–resolve round trips for built-in and
|
||||
configured outputs, verifying usable restored products without reconstructing
|
||||
@@ -180,7 +180,7 @@ Status: Closed
|
||||
selects accepting the raw-audio generation actually downloaded; this is implemented
|
||||
and verified. This is separate from the
|
||||
[audio-inputs roadmap's discovery changes](../audio-inputs.md#relationship-to-other-work).
|
||||
The [restore roadmap](../session-restore.md)
|
||||
[Publication import](../../internal/command-restore.md)
|
||||
relaxes generation-history requirements for imported products, not source identity
|
||||
for local audio reuse.
|
||||
|
||||
@@ -232,8 +232,8 @@ Status: Closed
|
||||
|
||||
**Closure.** Bounded response streaming and consumer regressions are covered by `internal/adapters/storage/stream_test.go`, `internal/app/restore_commit_test.go`, and `internal/stage/prepare_previous_test.go`.
|
||||
|
||||
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#existing-restore-controls-remain-useful)
|
||||
touches verified downloads. Transfer-size enforcement remains a separate audit
|
||||
**Disposition / owner.** Coordinate — [restore](../../internal/command-restore.md#installation-and-local-baseline)
|
||||
uses verified downloads. Transfer-size enforcement remains a separate audit
|
||||
remediation across all listed callers. [Discussion topic 4](discussion.md#4-keep-downloaded-audio-and-its-source-identity-together)
|
||||
approves bounded known-size streaming with existing unknown-size behavior; this
|
||||
is implemented and verified.
|
||||
@@ -259,8 +259,8 @@ Status: Closed
|
||||
|
||||
**Closure.** Inspection-first regeneration and the mutating retry are corrected in `docs/troubleshooting.md`; documentation checks pass.
|
||||
|
||||
**Disposition / owner.** Coordinate documentation — the [restore roadmap](../session-restore.md#align-policies-and-canonical-documentation)
|
||||
changes recovery guidance. Explicitly verify the inspection-before-publication
|
||||
**Disposition / owner.** Coordinate documentation — [recovery guidance](../../troubleshooting.md)
|
||||
reflects publication import. Explicitly verify the inspection-before-publication
|
||||
sequence; a restore documentation rewrite alone does not close this finding.
|
||||
|
||||
Original findings: [DOC-01](13-documentation.md#doc-01--p2-recovery-examples-publish-before-the-stated-inspection-step).
|
||||
@@ -305,7 +305,7 @@ Status: Closed
|
||||
**Closure.** Sequential confined source transfers, same-handle uploads, and pointer preservation are covered by `internal/stage/publish_transfer.go` and `publish_lifetime_test.go`.
|
||||
|
||||
**Disposition / owner.** Independent publication-resource remediation — coordinate with the
|
||||
[roadmap's snapshot removal](../session-restore.md#decouple-remote-discovery-from-execution-snapshots).
|
||||
[publication's snapshot removal](../../internal/stage-publish.md#outputs).
|
||||
Removing one manifest source does not bound the remaining descriptors;
|
||||
[discussion topic 6](discussion.md#6-open-publication-sources-as-they-are-needed)
|
||||
selects sequential source opening, verification, upload, and closure, accepting
|
||||
@@ -339,8 +339,8 @@ Preparation-to-analysis and semantic resume regressions landed in
|
||||
[76f9918](https://forge.maximumdirect.net/eric/narratio/commit/76f9918), with
|
||||
restore, status, and preflight coverage in
|
||||
[663e02e](https://forge.maximumdirect.net/eric/narratio/commit/663e02e).
|
||||
The [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
|
||||
retains its separate acquisition and workflow changes.
|
||||
[Reference preparation](../../internal/stage-prepare.md)
|
||||
retains its separate acquisition and workflow boundaries.
|
||||
|
||||
Original findings: [FC-01](01-correctness.md#fc-01--p2-previous-session-hydration-omits-analysis-prerequisites),
|
||||
[TE-03](08-testing.md#te-03--p2-previous-session-hydration-coverage-stops-short-of-dependency-closure).
|
||||
@@ -510,7 +510,7 @@ Related: [CAT-25](#cat-25--p3-separate-inspectionreadiness-collection-assessment
|
||||
|
||||
Status: Open
|
||||
|
||||
**Disposition / owner.** Independent dependency-refactoring owner — the [restore roadmap](../session-restore.md#restore-synthesizes-a-local-completion-baseline)
|
||||
**Disposition / owner.** Independent dependency-refactoring owner — [restore coverage](../../internal/command-restore.md#installation-and-local-baseline)
|
||||
uses a fixed stage/output coverage mapping, not this configured-artifact graph.
|
||||
Do not make graph consolidation a prerequisite; coordinate only where existing
|
||||
artifact reconciliation is actually changed.
|
||||
@@ -557,9 +557,9 @@ Related: [CAT-17](#cat-17--p3-centralize-configured-artifact-dependency-queries)
|
||||
|
||||
Status: Open
|
||||
|
||||
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
|
||||
changes preparation and reuse. Review the shared stable-product description
|
||||
there to avoid another parallel inventory; the roadmap does not itself perform
|
||||
**Disposition / owner.** Coordinate — [reference preparation](../../internal/stage-prepare.md)
|
||||
supports imported products and reuse. Review the shared stable-product description
|
||||
there to avoid another parallel inventory; the import feature does not itself perform
|
||||
this consolidation or replace evidence for locally prepared products.
|
||||
|
||||
Original findings: [CX-02](03-complexity.md#cx-02--p3-prepared-stable-inputs-have-parallel-materialization-and-resume-definitions),
|
||||
@@ -583,8 +583,8 @@ Related: [CAT-34](#cat-34--p3-include-the-combined-glossary-in-prepared-input-do
|
||||
|
||||
Status: Open
|
||||
|
||||
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#decouple-remote-discovery-from-execution-snapshots)
|
||||
changes publication consumers and extraction availability. Typed local control
|
||||
**Disposition / owner.** Coordinate — [inventory-based import](../../internal/command-restore.md)
|
||||
changed publication consumers and extraction availability. Typed local control
|
||||
evidence remains a separate simplification; neither snapshot removal nor import
|
||||
completion automatically centralizes the remaining codecs.
|
||||
|
||||
@@ -608,7 +608,7 @@ Related: [CAT-02](#cat-02--p2-make-restored-carried-products-agree-with-manifest
|
||||
|
||||
Status: Open
|
||||
|
||||
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#existing-restore-controls-remain-useful)
|
||||
**Disposition / owner.** Coordinate — [restore](../../internal/command-restore.md#installation-and-local-baseline)
|
||||
retains staging and validation before installation. Reassess the common mechanics
|
||||
across the surviving download callers; helper extraction remains separate from
|
||||
both product import and CAT-06's transfer bounds.
|
||||
@@ -683,8 +683,8 @@ Related: [CAT-23](#cat-23--p3-move-notarius-native-output-mapping-and-executable
|
||||
|
||||
Status: Open
|
||||
|
||||
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
|
||||
changes inspection and readiness for restored inputs. The broader separation of
|
||||
**Disposition / owner.** Coordinate — [publication import](../../internal/command-restore.md)
|
||||
supports inspection and readiness for supplied inputs. The broader separation of
|
||||
collection, assessment, and presentation retains independent audit ownership;
|
||||
do not require it before adding coverage-aware decisions.
|
||||
|
||||
@@ -723,8 +723,8 @@ confinement coverage.
|
||||
|
||||
Status: Open
|
||||
|
||||
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#decouple-remote-discovery-from-execution-snapshots)
|
||||
changes previous-input discovery and prepared-record consumers. Reassess the
|
||||
**Disposition / owner.** Coordinate — [inventory-based import](../../internal/command-restore.md)
|
||||
changed previous-input discovery and prepared-record consumers. Reassess the
|
||||
surviving scans after those changes; inventory-only selection does not by itself
|
||||
remove repeated linear lookups.
|
||||
|
||||
@@ -743,8 +743,8 @@ verification. Index selection rather than caching payloads across invocations.
|
||||
|
||||
Status: Open
|
||||
|
||||
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
|
||||
touches restore reporting. Carry or index action identity if that path is changed;
|
||||
**Disposition / owner.** Coordinate — [restore reporting](../../internal/command-restore.md#reporting-and-ownership)
|
||||
remains implemented. Carry or index action identity if that path is changed;
|
||||
new manifest construction alone does not fix quadratic report updates.
|
||||
|
||||
Original findings: [EF-04](02-efficiency.md#ef-04--p3-restore-reporting-performs-a-full-search-after-each-install).
|
||||
|
||||
@@ -17,10 +17,9 @@ Problem descriptions below record the original audit baseline. The catalog owns
|
||||
current finding status and closure evidence; consult it for remaining work.
|
||||
|
||||
The operator has settled the direction for all seven topics, including
|
||||
cancellation-aware waiting for lock contention. The
|
||||
[session-restore](../session-restore.md) and [audio-inputs](../audio-inputs.md)
|
||||
roadmaps own their respective target behavior. Implementation details can be
|
||||
settled during planning against those roadmaps and the remaining catalog entries.
|
||||
cancellation-aware waiting for lock contention. [Publication import](../../internal/command-restore.md)
|
||||
and the [audio-inputs feature](../audio-inputs.md) are implemented. The catalog
|
||||
retains the remaining independent work and its closure evidence.
|
||||
|
||||
## 1. Coordinate destructive cleanup with other work
|
||||
|
||||
@@ -468,8 +467,7 @@ automatic cross-extension renaming or content-based deduplication.
|
||||
The roadmap extends CAT-12's shared-discovery remediation with the subsequently
|
||||
approved multi-format behavior. Audio generation identity and transfer bounds
|
||||
remain the separate corrections agreed under topic 4. Publication import is
|
||||
independent of raw-audio discovery; neither feature roadmap requires completing
|
||||
the other first.
|
||||
independent of raw-audio discovery; the implemented features have separate scopes.
|
||||
|
||||
Operator response:
|
||||
|
||||
@@ -480,9 +478,9 @@ and verification._
|
||||
|
||||
## After Discussion
|
||||
|
||||
Prepare remediation plans against the catalog, using the two feature roadmaps
|
||||
for their assigned work. Distinguish agreed behavior changes from internal
|
||||
refactoring, retain the audit evidence links, and include focused regression
|
||||
coverage. Build on the completed safety and transfer work. Recording an approved
|
||||
Prepare remediation plans for the catalog's remaining open entries. Distinguish
|
||||
agreed behavior changes from internal refactoring, retain the audit evidence
|
||||
links, and include focused regression coverage. Build on the completed safety,
|
||||
transfer, publication-import, and audio-input work. Recording an approved
|
||||
direction alone does not close its finding; pending work still requires
|
||||
implementation and verification.
|
||||
|
||||
@@ -1,466 +0,0 @@
|
||||
# Import Published Products: Implementation Plan
|
||||
|
||||
Status: Complete
|
||||
|
||||
## Scope and working rules
|
||||
|
||||
Implement [Session Restore from Published Artifacts](session-restore.md).
|
||||
That roadmap owns user intent, boundaries, and the three operator workflows.
|
||||
This plan replaces the completed CAT-10 plan. CAT-10 and CAT-13 remain implemented.
|
||||
|
||||
Read the roadmap completely, then [Development](../development.md) and the
|
||||
applicable agent, architecture, testing, and documentation policies. For the
|
||||
original defect, read only [CAT-02](audit/catalog.md#cat-02--p2-make-restored-carried-products-agree-with-manifest-authority)
|
||||
and its linked FC-02/TE-02 sections. Original audit reports remain historical
|
||||
evidence; their historical-contract remedy is superseded by the roadmap.
|
||||
|
||||
Complete stages in order. Each stage is a focused coding-agent prompt; split
|
||||
commits within a stage where independently reviewable. Keep the build and
|
||||
focused tests usable while introducing shared foundations. The inventory,
|
||||
publication, and restore stages form one coordinated cutover: record any expected
|
||||
cross-stage test failures against the named pending stage, and resolve them
|
||||
before declaring the cutover complete. Keep affected-owner tests meaningful;
|
||||
do not weaken assertions to conceal unfinished integration. Transitional private
|
||||
code may connect stages, but remove the old execution-snapshot workflow by
|
||||
completion. Intermediate commits are not a finished release. Update owned
|
||||
current-behavior documentation when each capability becomes implemented.
|
||||
|
||||
This document records the staged implementation. Implementation commits use
|
||||
plain-English messages under agent policy; pushing and releasing require separate
|
||||
authorization.
|
||||
|
||||
## Implementation decisions
|
||||
|
||||
### Durable supplied products and coverage
|
||||
|
||||
Add an optional, typed supplied-product collection to the local manifest, with
|
||||
a collection version and records keyed by canonical source ID. Each record
|
||||
contains its session-relative canonical path, checksum, size, and product
|
||||
contract information needed for content interpretation. This is local acceptance
|
||||
and availability evidence. Historical producer IDs, prompts, models, extraction
|
||||
provenance, and generation fingerprints are not required fields.
|
||||
|
||||
Keep existing executed-stage, speaker, and analysis checkpoint representations.
|
||||
The additive collection leaves existing local manifests usable without a
|
||||
migration. Maintain one authoritative accepted record per supplied source.
|
||||
A successful local replacement retires the supplied record for that source and
|
||||
uses ordinary local evidence thereafter. Stage transitions must not accidentally
|
||||
reactivate an older supplied record after an authorized replacement attempt.
|
||||
|
||||
Place supplied-product validation and the fixed stage/product coverage helper
|
||||
in `internal/artifacts`; serialization belongs in `internal/manifest`, and
|
||||
orchestration belongs in `internal/app`. Validate actual bytes with existing
|
||||
content and confinement rules. Coverage is derived from valid supplied records,
|
||||
not directory scanning or fabricated outputs.
|
||||
|
||||
| Supplied product | Transcript work satisfied |
|
||||
| --- | --- |
|
||||
| Base multi-speaker JSON | transcribe, merge |
|
||||
| Polished JSON | transcribe through polish |
|
||||
| Normalized/final JSON | transcribe through normalize |
|
||||
| Final trimmed JSON | transcribe through trim |
|
||||
|
||||
Prepare remains responsible for actual needed references; a supplied transcript
|
||||
satisfies the audio-generation prerequisite, not missing reference documents.
|
||||
Markdown satisfies only selected render outputs. Bounds, extraction products,
|
||||
configured artifacts, and previous inputs require their actual files.
|
||||
No supplied record creates publish, notify, or cleanup execution authority.
|
||||
|
||||
Use the same assessment for restore reports, bounded prerequisites, planning,
|
||||
resume, readiness, and execution. Supplied products are independent inputs;
|
||||
do not infer their historical relationships from co-publication. Ordinary local
|
||||
dependents still use current input identities and existing invalidation rules.
|
||||
Reference preparation preserves the supplied transcript baseline. Explicit
|
||||
pipeline force retains its existing stage/range and artifact-target meaning;
|
||||
it overrides relevant supplied completion and requires real generation inputs.
|
||||
|
||||
### Render selection
|
||||
|
||||
Add `render.variants`, a list containing `normalized` and/or `trimmed`.
|
||||
The absent-field default is both. Treat the list as a set; duplicate entries
|
||||
need not fail. An explicit empty/null selection requests no variants, and the
|
||||
existing `render.enabled` control remains available. Reject unknown variant
|
||||
names as unsupported. Use native ConfigKit schema/default handling and a single
|
||||
domain variant-to-input/output mapping.
|
||||
|
||||
### Publication and restore
|
||||
|
||||
Retain the current pointer and publication inventory format and transfer checks.
|
||||
Readers bind to the selected inventory; they do not fetch or decode execution
|
||||
snapshots. Existing inventories may contain obsolete snapshot declarations,
|
||||
which readers ignore as execution authority. New publication stops emitting
|
||||
those snapshots. Authored/standalone session configuration and needed reference
|
||||
documents retain their distinct input purpose.
|
||||
|
||||
Restore plans from source identities, the product registry, and current concrete
|
||||
artifact definitions. Keep local flat product placement independent of remote
|
||||
publish destinations. Retain current supported source/path handling; do not add
|
||||
historical-manifest or basename searches to discover products.
|
||||
|
||||
Restore merges into local state under the existing workspace lock. File
|
||||
replacement requires existing conflict/force rules. Identical content preserves
|
||||
existing valid local execution evidence; a fresh or otherwise unrecorded
|
||||
accepted product receives a supplied record. Changed replacements invalidate
|
||||
affected locally generated work through existing relations, preserve unrelated
|
||||
checkpoints, and then install the products supplied by this import as its
|
||||
baseline. There is no same-generation test between imported products.
|
||||
Restore's `--force` authorizes file replacement, independently of pipeline
|
||||
regeneration flags.
|
||||
|
||||
Install the merged local manifest after accepted imports and retain the
|
||||
incomplete-restore marker/retry mechanism. Dry runs report imports and resulting
|
||||
coverage without installing durable products or a manifest. No rollback,
|
||||
background checkpoint service, compatibility framework, or new safety limit is
|
||||
part of this work.
|
||||
|
||||
## Stage 1: Introduce durable supplied-product records and fixed coverage
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `internal/manifest/manifest.go`, manifest validation/store code,
|
||||
`internal/artifactmodel`, and transcript/product registries.
|
||||
|
||||
1. Revise the architecture policy's completion, resume, and restore constraints
|
||||
to permit satisfaction by supplied products and inventory-based import, as
|
||||
expressly selected in the roadmap. State the boundary positively and preserve
|
||||
ordinary local generation and safety rules. These constraints govern the
|
||||
following stages; implemented-behavior references advance with their code.
|
||||
2. Add the typed optional collection described above and extend strict manifest
|
||||
decoding/validation and cloning. Preserve existing local state contracts.
|
||||
3. Implement narrow helpers to validate a supplied record against the canonical
|
||||
path and actual bytes and to derive fixed transcript coverage. Reuse existing
|
||||
source registries and content checks.
|
||||
4. Represent actual products separately from satisfied producer stages. A
|
||||
trimmed transcript must not create pretend base, polished, normalized, or
|
||||
bounds artifact records.
|
||||
5. Test round-trip persistence, absent supplied collections on ordinary
|
||||
manifests, missing/tampered supplied products, and each coverage boundary.
|
||||
Cover Markdown and independent products not implying transcript coverage.
|
||||
|
||||
Validation: `go test ./internal/manifest ./internal/artifacts`.
|
||||
|
||||
## Stage 2: Implement variant-selectable rendering
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `internal/config` render schema/default/validation, `stage/render.go`,
|
||||
and render portions of `semantic_contracts_refinement.go`.
|
||||
|
||||
1. Implement the selected `render.variants` contract and central mapping. Update
|
||||
render to resolve and convert only selected JSON inputs, retaining canonical
|
||||
filenames and existing conversion/materialization behavior.
|
||||
2. Make semantic evidence describe selected variants and their input/output
|
||||
identities. Preserve the both-variant default and disablement behavior.
|
||||
Deliberately revise render's semantic contract version if its changed payload
|
||||
requires it; do not bump unrelated stage contracts.
|
||||
3. Test trimmed-only without normalized JSON, normalized-only without trimmed
|
||||
JSON, omitted selection, explicit empty selection, unknown names, and missing
|
||||
selected inputs. Verify changes in selection affect reuse and later coverage.
|
||||
4. Update configuration reference and a maintained example for the new field.
|
||||
|
||||
Validation: `go test ./internal/config ./internal/stage ./internal/doccheck`.
|
||||
|
||||
## Stage 3: Resolve supplied built-in and extraction products
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `artifact_resolver.go`, `prepared_input.go`, `extraction_evidence.go`,
|
||||
`extraction_input.go`, and catalog/bootstrap code under `internal/artifacts`.
|
||||
|
||||
1. Let normal source resolution and catalogs consume valid supplied built-ins,
|
||||
configured product records, and extraction products. Preserve ordinary
|
||||
generation-evidence validation for locally generated products.
|
||||
2. Supplied extraction products need their actual payload/content contract, not
|
||||
old Notarius metadata or an original transcript fingerprint. Partial imports
|
||||
remain individually available; extract completion requires its current
|
||||
required product set. Executing extraction retains the existing full-bundle
|
||||
behavior rather than adding per-lane generation checkpoints.
|
||||
3. Make supplied configured products available through their existing canonical
|
||||
source IDs without inventing analyze fingerprints or producer runs.
|
||||
4. Ensure coverage alone cannot resolve an absent intermediate file. Test
|
||||
supplied trimmed JSON, separately supplied bounds, partial extraction, and
|
||||
configured outputs after manifest reload.
|
||||
5. Cover publication's local-source resolver using supplied products. Remote
|
||||
publication locks and local content/path validation remain unchanged.
|
||||
|
||||
Validation: `go test ./internal/artifacts ./internal/stage`.
|
||||
|
||||
## Stage 4: Integrate supplied products into incremental analysis
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `analyze_reconciliation.go`, `analyze_fingerprint.go`,
|
||||
`analyze_plan.go`, and analysis execution/checkpoint handling.
|
||||
|
||||
1. Classify valid supplied configured artifacts before evaluating their
|
||||
historical generation inputs/fingerprints. Avoid the current eager
|
||||
fingerprint pass demanding absent old inputs for an accepted supplied result.
|
||||
2. Reuse supplied targets and prerequisites individually. Generate missing
|
||||
selected work in normal dependency order and compute its ordinary fingerprints
|
||||
using actual resolved input identities.
|
||||
3. Preserve explicit-target force versus prerequisite reuse. A local replacement
|
||||
transitions its source to local checkpoint evidence; failures retain the
|
||||
existing retry/retention policy without reviving superseded imported evidence.
|
||||
4. Permit mixed supplied and locally generated artifact collections. Keep the
|
||||
original target set separate from the prerequisite closure.
|
||||
5. Test partial import plus a new target, a supplied disabled prerequisite,
|
||||
changed historical model/prompt settings, forced target replacement, and an
|
||||
ordinary partial local failure/retry. No blanket bypass of local freshness.
|
||||
|
||||
Validation: `go test ./internal/stage ./internal/artifacts ./internal/manifest`.
|
||||
|
||||
## Stage 5: Share supplied completion across planning and execution
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `internal/app/semantic_resume.go`, `plan.go`,
|
||||
`runner_stage_execution.go`, `run_control.go`, bounded prerequisites, and
|
||||
stage resume validators.
|
||||
|
||||
1. Consult validated supplied coverage before requiring historical semantic or
|
||||
per-speaker evidence for covered transcript work. Recheck actual supplied
|
||||
files; invalid/missing products cannot sustain completion.
|
||||
2. Make full-run and bounded-run decisions agree. In a restored context, missing
|
||||
independent render/extract work does not block selected analysis unless its
|
||||
actual required sources need those products. Do not mark unrelated stages
|
||||
complete simply to satisfy the old all-prefix status check.
|
||||
3. Keep actual consumer input checks: a request for absent intermediate JSON
|
||||
still fails with actionable guidance. Use the fixed mapping and existing
|
||||
input declarations rather than a configurable stage DAG.
|
||||
4. Honor selected force and existing dependent invalidation. A supplied
|
||||
completion shortcut must not defeat an explicit regeneration request.
|
||||
5. Project decisions on cloned manifests without workspace writes, execution
|
||||
adapters, or readiness probes. Retain CAT-13's relevant read-only S3 checks
|
||||
for actual raw-audio preparation reuse.
|
||||
6. Test full and bounded plans against real execution with missing superseded
|
||||
transcripts, changed historical settings, and forced work.
|
||||
|
||||
Validation: `go test ./internal/app ./internal/stage`.
|
||||
|
||||
## Stage 6: Separate reference preparation from audio acquisition
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `config/validate_core.go`, `stage/prepare*.go`, and preparation semantic
|
||||
evidence. Preserve ConfigKit's completed-configuration boundary.
|
||||
|
||||
1. Allow absent audio selection in configuration; retain validation of any
|
||||
supplied audio mode and existing mutual-exclusion/path rules. Require audio
|
||||
when selected remaining work actually consumes it, including forced
|
||||
transcription or ordinary uncovered source-based execution.
|
||||
2. Separate stable-reference/history materialization from audio acquisition
|
||||
through narrow preparation helpers. Reuse existing renderers and CAT-10's
|
||||
prerequisite-inclusive history collector, not another input scheduler.
|
||||
3. Persist honest preparation evidence for the work actually performed. Reference
|
||||
preparation does not certify audio or manufacture missing documents. Retain
|
||||
ordinary prepared-copy/source checks and reuse for raw-audio sessions.
|
||||
4. Test reference-only preparation with supplied transcript coverage, absent or
|
||||
invalid required references, and source-based preparation without audio.
|
||||
Reference refresh preserves supplied transcript records and unrelated local
|
||||
checkpoints. Keep the current raw-audio workflow covered.
|
||||
|
||||
Validation: `go test ./internal/config ./internal/stage ./internal/artifacts`.
|
||||
|
||||
## Stage 7: Wire artifact-only preparation into commands and readiness
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read runner acquisition/composition, `session_readiness.go`, bounded
|
||||
prerequisites, `plan.go`, and downstream readiness request builders.
|
||||
|
||||
1. Determine supplied coverage before rejecting absent audio or missing old
|
||||
prefix statuses. Under the workspace lock, make required references/history
|
||||
available before downstream input checks, including bounded runs that start
|
||||
after prepare. Reference-only work preserves supplied transcript coverage.
|
||||
2. Compose adapters from remaining work. Standalone preflight keeps its enabled
|
||||
capability checks and provider probes, but uses artifact-only references
|
||||
without rebuilding covered transcript producers.
|
||||
3. Project this preparation honestly without writes in `session plan`. A missing
|
||||
real consumer input is still reported; coverage is not file reconstruction.
|
||||
4. Verify full and bounded artifact-only execution with real references, no
|
||||
audio, and no superseded transcripts. Check preflight, planning/execution
|
||||
agreement, missing-reference/history diagnostics, and forced transcription.
|
||||
Reuse CAT-10/CAT-13 checks for unchanged acquisition behavior.
|
||||
|
||||
Validation: `go test ./internal/app ./internal/stage ./internal/config`.
|
||||
|
||||
## Stage 8: Separate publication inventory reads from execution snapshots
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `artifacts/current_state*.go`, `remote_commit.go`, application remote
|
||||
discovery/status/configuration consumers, and their tests.
|
||||
|
||||
1. Extract the shared pointer/inventory reader so publication identity and
|
||||
declarations are available without requesting a session-manifest object.
|
||||
Retain pointer/commit identity, namespace, checksum, size, generation, and
|
||||
bounded-read checks.
|
||||
2. Expose campaign/session/run publication identity from the inventory. It is
|
||||
remote publication identity, not proof of local stage execution.
|
||||
3. Update remote status, published-artifact inspection, and distinct session
|
||||
configuration acquisition to use inventory evidence. Retain the authored
|
||||
session configuration's own acquisition/validation.
|
||||
4. Add tests for an inventory without a snapshot, and an existing inventory whose
|
||||
obsolete snapshot body is missing, malformed, or unsupported. These cases
|
||||
must not obstruct publication inspection or configuration acquisition.
|
||||
5. Keep any temporary old restore-reader wiring private until Stage 11's
|
||||
cutover. The completed workflow has one inventory reader and no ledger-fetch
|
||||
fallback.
|
||||
|
||||
Validation: `go test ./internal/artifacts ./internal/app`.
|
||||
|
||||
## Stage 9: Use inventory-only history and stop publishing execution ledgers
|
||||
|
||||
Status: Complete
|
||||
|
||||
Cutover note: the prepared-session round trip now uses inventory-based restore;
|
||||
the temporary snapshot-reader failure was resolved in Stage 11.
|
||||
|
||||
Read `internal/previouscache`, `stage/prepare_previous.go`,
|
||||
`publish*.go`, and consumers of remote manifest fields.
|
||||
|
||||
1. Resolve previous-session products from exact published-output declarations
|
||||
using the inventory reader. Remove the mandatory previous execution-manifest
|
||||
transfer and its prepared-input record; retain actual history products and
|
||||
required/optional handling.
|
||||
2. Remove snapshot production, declaration, upload, and snapshot-only archive
|
||||
paths from publication. Review run-file selection so diagnostic archives do
|
||||
not accidentally reintroduce a remote progress-backup feature.
|
||||
3. Preserve independently useful authored/prepared input publication, including
|
||||
the session configuration used for remote acquisition. Keep product inventory,
|
||||
immutable object transfer, lock carry-forward, pointer-last commit, and
|
||||
cleanup authorization intact.
|
||||
4. Keep old snapshot declaration recognition only as needed to read existing
|
||||
inventories; never download or interpret their contents as authority.
|
||||
5. Test previous history with no snapshot, locked carry-forward declarations,
|
||||
optional absence versus access/integrity errors, and new publication with
|
||||
no execution-ledger payload. Retain CAT-10 closure coverage.
|
||||
|
||||
Validation: `go test ./internal/previouscache ./internal/stage ./internal/artifacts`.
|
||||
|
||||
## Stage 10: Plan product imports and synthesized completion
|
||||
|
||||
Status: Complete
|
||||
|
||||
Cutover note: inventory planning now serves both dry-run and installation.
|
||||
|
||||
Read `internal/app/restore_plan.go`, product-path mapping, restore reports,
|
||||
and the source registries/current concrete artifact catalog.
|
||||
|
||||
1. Replace manifest-based product mapping with inventory source-to-canonical-path
|
||||
mapping. Published remote destination names do not dictate local product
|
||||
names. Preserve supported reference/audio import handling and `--include-audio`.
|
||||
2. Import publication products, not arbitrary execution diagnostics or historical
|
||||
output records. Resolve configured product locations through current concrete
|
||||
definitions and existing product rules; preserve flat products and collision
|
||||
detection. No remote producer paths or old configuration are required.
|
||||
3. Classify downloads, identical files, and conflicts using existing filesystem
|
||||
and force rules. Retain exact transfer declarations, including carried older
|
||||
immutable objects.
|
||||
4. Build a candidate local baseline from accepted products plus preserved local
|
||||
evidence. Use the shared coverage helper and render selection; no publish or
|
||||
cleanup success is synthesized.
|
||||
5. Extend dry-run reports with actual imports and resulting satisfied/remaining
|
||||
work. Do not fetch snapshots or write products/manifests to produce the report.
|
||||
6. Test source-based mapping, configured remote rename, partial product sets,
|
||||
collision/conflict behavior, and trimmed-only rendering coverage.
|
||||
|
||||
Validation: `go test ./internal/app ./internal/artifacts`.
|
||||
|
||||
## Stage 11: Install and merge local baselines under the existing lock
|
||||
|
||||
Status: Complete
|
||||
|
||||
Read `restore_execute.go`, restore recovery/marker code, manifest persistence,
|
||||
and the existing shared workspace-lock lifecycle.
|
||||
|
||||
1. Cut restore discovery/execution over to the inventory plan. Load existing
|
||||
local progress under lock or create a fresh local manifest; never install a
|
||||
downloaded execution ledger.
|
||||
2. Install and verify selected files through existing confined sibling-temp
|
||||
transfers. Update supplied records only for accepted installed/identical
|
||||
products. Merge per-source changes, preserving unrelated stage evidence,
|
||||
speaker records, analysis checkpoints, and local diagnostics.
|
||||
3. For changed products, apply existing local dependent invalidation, then
|
||||
register the supplied products in this import without checking historical
|
||||
cross-product generation consistency. Preserve valid local authority for
|
||||
identical files rather than gratuitously replacing it with supplied authority.
|
||||
4. Save the merged baseline last; retain the incomplete-restore marker until
|
||||
installation and save succeed. Retry after partial transfer or save failure
|
||||
must converge without whole-workspace rollback.
|
||||
5. Remove producer-path rebasing, downloaded-manifest install/classification,
|
||||
and temporary dual-reader wiring. Update restore reports to describe local
|
||||
import completion rather than restoration of a remote execution run.
|
||||
6. Test fresh restore, existing local progress, identical/conflicting/forced
|
||||
replacements, unrelated checkpoint preservation, cancellation, failed final
|
||||
save, and retry. Reuse existing path and transfer tests for unchanged risks.
|
||||
|
||||
Validation: `go test ./internal/app ./internal/manifest ./internal/artifacts`.
|
||||
|
||||
## Stage 12: Prove the three operator workflows end to end
|
||||
|
||||
Status: Complete
|
||||
|
||||
Use real internal collaborators, temporary files, and fake external storage,
|
||||
subprocess, and generation boundaries. Avoid post-restore manifest repairs.
|
||||
|
||||
1. Publish A, lock it, generate local B, republish, then import into a fresh
|
||||
workspace. Verify A resolves and supports downstream work. Cover a built-in
|
||||
transcript and configured artifact; make the old snapshot unavailable.
|
||||
2. Restore final trimmed JSON without audio or superseded transcripts. Reload
|
||||
the saved manifest, compare plan and execution for full and bounded runs,
|
||||
and generate extraction/analysis with required references. Covered transcript
|
||||
producers make no adapter calls.
|
||||
3. Cover trimmed-only rendering; default both-variant selection still reports
|
||||
a missing normalized JSON when that selected input is needed. Selecting
|
||||
another unavailable source reports absence rather than inventing a file.
|
||||
4. Import partial analysis/extraction products, consume their ordinary source
|
||||
IDs, add a new selected analysis artifact, and republish supplied products.
|
||||
Verify local replacements establish normal checkpoints and semantic evidence.
|
||||
5. Restore into local progress and demonstrate preservation, ordinary conflicts,
|
||||
authorized replacement, and local-dependent invalidation. Demonstrate failed
|
||||
local speaker/artifact work still resumes normally without remote restore.
|
||||
6. Verify forced transcription requires audio; reference-only preparation keeps
|
||||
the supplied baseline; standalone preflight retains its distinct probes.
|
||||
Missing selected inputs/references remain errors.
|
||||
7. Consolidate obsolete snapshot-based tests into these workflow and narrower
|
||||
boundary tests. Keep meaningful lock, transfer, conflict, and recovery coverage.
|
||||
|
||||
Validation: run focused workflow tests uncached, then `go test ./...`.
|
||||
|
||||
## Stage 13: Align policy, documentation, and audit disposition
|
||||
|
||||
Status: Complete
|
||||
|
||||
1. Finalize and check the Stage 1 architecture policy adaptations: completion
|
||||
can express executed work or satisfaction by supplied products; product
|
||||
acceptance uses actual local
|
||||
records; remote publication authority is the inventory. Remove requirements
|
||||
for downloaded execution ledgers and historical fingerprints on supplied
|
||||
products. Preserve ordinary generation evidence and safety boundaries.
|
||||
2. Update canonical CLI, configuration, operations, troubleshooting, and focused
|
||||
manifest/artifact/prepare/render/analyze/extract/publish/restore internals.
|
||||
Explain original-source runs, product imports, and local resume. Include
|
||||
render selection, local merge/conflicts, force distinctions, and deferred
|
||||
remote execution recovery. Keep upstream library documentation linked.
|
||||
3. Update maintained examples and affected example-loading tests. Remove
|
||||
obsolete snapshot terminology and dead snapshot/rebasing helpers or fields
|
||||
only where this cutover made them unused; preserve distinct session YAML.
|
||||
4. Run all checks with the maintained toolchain:
|
||||
|
||||
```sh
|
||||
GOTOOLCHAIN=go1.27.4 go test ./...
|
||||
GOTOOLCHAIN=go1.27.4 go test -race ./...
|
||||
GOTOOLCHAIN=go1.27.4 go vet ./...
|
||||
GOTOOLCHAIN=go1.27.4 go build ./...
|
||||
```
|
||||
|
||||
5. Check every validation outcome in the feature roadmap against tests/current
|
||||
behavior. Review for invented generation claims, new publication-wide
|
||||
consistency rules, blanket checkpoint resets, or new migration machinery.
|
||||
6. Close CAT-02 only after its round trips pass. Review other roadmap-assigned
|
||||
findings individually: close only those whose offending lifecycle was removed
|
||||
or remediation verified. Keep independent P3 work open and original audit
|
||||
reports unchanged. Update discussion/catalog links and counts accordingly.
|
||||
7. Mark implementation stages and feature status complete only after the entire
|
||||
supplied-product workflow, documentation, and validation are complete.
|
||||
@@ -1,174 +0,0 @@
|
||||
# Published Product Import Review
|
||||
|
||||
Status: Complete
|
||||
|
||||
Reviewed commit: `e5d91cb19be27ec25380a6b1306eee49ab9c0977`.
|
||||
|
||||
Scope: the thirteen completed stages in [implementation.md](implementation.md)
|
||||
against the [session-restore roadmap](session-restore.md). The inventory-only
|
||||
publication/import boundary, durable supplied records, transcript coverage,
|
||||
render selection, local merge, and ordinary local checkpoints are implemented.
|
||||
The findings below record the gaps identified and their completed remediations.
|
||||
This document records review outcomes, not additional product requirements or
|
||||
an implementation plan.
|
||||
|
||||
## 1. P2: Stop dependency work at accepted supplied analysis products
|
||||
|
||||
Status: Complete
|
||||
|
||||
Resolution: the analysis planner closes the active work graph at accepted
|
||||
supplied products, except explicit forced targets. Behavioral regressions cover
|
||||
preview and execution for a supplied target and a new child, with absent
|
||||
historical inputs, plus forced replacement. Verified with
|
||||
`go test ./internal/stage ./internal/artifacts ./internal/manifest`.
|
||||
|
||||
Affected stages: 4, 5, and 12.
|
||||
|
||||
Evidence: `internal/stage/analyze_plan.go:66` expands the entire target dependency
|
||||
closure before considering supplied products. Its scheduling loop skips a
|
||||
supplied target itself but still schedules missing historical prerequisites.
|
||||
`internal/stage/analyze_fingerprint.go:113` skips fingerprints for supplied
|
||||
products, while historical prerequisites remain candidates for generation.
|
||||
|
||||
A focused diagnostic supplied `session_recap`, selected only that artifact, and
|
||||
gave its current definition a missing `historical` prerequisite whose input was
|
||||
an unavailable base transcript. Analysis failed with
|
||||
`compute execution fingerprint for artifact "historical"` and
|
||||
`required built-in source "narratio.transcript.base" is unavailable`.
|
||||
If those old inputs exist, the prerequisite can instead cause unnecessary
|
||||
generation. The accepted target already satisfies the selected work.
|
||||
|
||||
Required remediation: derive actual work with accepted supplied products as
|
||||
reuse boundaries. Apply that boundary consistently to planning, input checking,
|
||||
and execution. Preserve prerequisites needed by genuinely executable targets,
|
||||
explicit-target force behavior, and ordinary local freshness checks. Keep the
|
||||
existing prerequisite-history collector's separate responsibilities explicit.
|
||||
|
||||
Regression coverage: selecting a supplied target with absent historical inputs
|
||||
reuses it without generation; generating a new child from a supplied prerequisite
|
||||
does not rebuild that prerequisite's own history; explicitly forcing replacement
|
||||
still requires the actual generation inputs.
|
||||
|
||||
Requirement assessment: the current traversal effectively requires historical
|
||||
inputs for independent supplied products, contrary to the agreed import model.
|
||||
|
||||
## 2. P2: Permit downstream continuation without a supplied transcript
|
||||
|
||||
Status: Complete
|
||||
|
||||
Resolution: bounded import continuation checks actual consumer inputs rather
|
||||
than requiring transcript-producer statuses. Reference-only acquisition and
|
||||
reuse exclude audio checks and collect history for projected generation work
|
||||
and reused local checkpoints, preserving their ordinary input evidence.
|
||||
The import context survives replacement of its last supplied product by a local
|
||||
checkpoint. Regressions cover configured and extraction inputs, required
|
||||
references, absent real inputs, historical-input exclusion, and local reuse
|
||||
after an actual import/replacement. A mixed-workflow regression also verifies
|
||||
that generating a child retains a current local prerequisite's history. Verified
|
||||
with
|
||||
`go test ./internal/app ./internal/stage ./internal/artifacts ./internal/config`.
|
||||
|
||||
Affected stages: 5, 7, and 12.
|
||||
|
||||
Evidence: `internal/app/bounded_prerequisites.go:17` relaxes missing prefix
|
||||
statuses only when supplied coverage includes transcription.
|
||||
`internal/app/reference_preparation.go:18` likewise gates reference-only
|
||||
preparation on a supplied transcript.
|
||||
|
||||
A focused diagnostic recorded a valid supplied configured parent artifact,
|
||||
selected a new child whose only input was that parent, and omitted audio and
|
||||
transcripts. Bounded analysis failed before execution with
|
||||
`prerequisite stage "prepare" has unusable status "absent"`.
|
||||
The selected work consumed no transcript. Partial extraction and configured
|
||||
product imports must be usable according to their actual consumer inputs.
|
||||
|
||||
Required remediation: determine bounded eligibility and necessary preparation
|
||||
from the selected work and available products. Make needed references available
|
||||
without requiring an unrelated transcript or producer-stage history. Preserve
|
||||
actual missing-input errors and normal raw-audio workflow checks. Keep planning
|
||||
and execution aligned without fabricating prefix execution records.
|
||||
|
||||
Regression coverage: import a configured product without any transcript/audio,
|
||||
generate a child that consumes only that product, and verify plan/execution
|
||||
agreement. Cover the equivalent extraction-input case and a missing actual
|
||||
required input. Retain the existing transcript-import workflow tests.
|
||||
|
||||
Requirement assessment: a supplied transcript has become an unintended mandatory
|
||||
entry ticket for otherwise valid artifact-only continuation.
|
||||
|
||||
## 3. P3: Include supplied built-ins in local artifact inspection
|
||||
|
||||
Status: Complete
|
||||
|
||||
Resolution: built-in inspection reports canonical supplied records as recorded
|
||||
with supplied-product provenance, retaining its payload-free evidence view.
|
||||
A command-level regression checks both status and artifact inspection after an
|
||||
actual import, alongside local rendering evidence and absent intermediate
|
||||
products, and verifies that inspection leaves the manifest unchanged. Verified
|
||||
with `go test ./internal/app ./internal/doccheck`.
|
||||
|
||||
Affected stages: 3, 5, and 13.
|
||||
|
||||
Evidence: `internal/app/session_state_command.go:154` replaces built-in catalog
|
||||
availability with `builtinArtifactInspectionState`, which checks only successful
|
||||
producer-stage output records (`:244`). Fresh imports deliberately have supplied
|
||||
records rather than fabricated producer executions.
|
||||
|
||||
A focused diagnostic resolved a valid supplied final-trimmed transcript through
|
||||
the normal resolver, then inspected the same saved manifest. Inspection reported
|
||||
`narratio.transcript.final_trimmed` as `unavailable`. Both `session artifacts` and
|
||||
`session status` use this path, so operators receive conflicting availability
|
||||
information after a successful import.
|
||||
|
||||
Required remediation: recognize supplied-product evidence in the local inspection
|
||||
view. Preserve its lightweight inspection contract and distinguish accepted
|
||||
products from locally executed producer evidence. Coverage must not make absent
|
||||
intermediate products appear available.
|
||||
|
||||
Regression coverage: inspect a fresh supplied transcript baseline and verify that
|
||||
the actual imported transcript is reported as recorded/available, while absent
|
||||
earlier transcript products remain unavailable. Preserve ordinary local-output
|
||||
inspection behavior.
|
||||
|
||||
## 4. P3: Remove retired execution-snapshot APIs from internal documentation
|
||||
|
||||
Status: Complete
|
||||
|
||||
Resolution: artifact internals now identify `LoadCurrentInventory`,
|
||||
`CurrentState`, and `CurrentStateValidation`, and describe publication
|
||||
pointer/inventory identity checks. Compared directly with `current_state.go`
|
||||
and `current_state_commit.go`; verified with `go test ./internal/doccheck`.
|
||||
|
||||
Affected stages: 8, 9, and 13.
|
||||
|
||||
Evidence: [Artifact Internals](../internal/artifacts.md), in its current-state
|
||||
helper list, still names deleted `LoadCurrentState` and
|
||||
`ValidateCurrentStateIdentity` APIs and describes pointer/manifest run-ID
|
||||
consistency. Current readers use `LoadCurrentInventory` and publication inventory
|
||||
identity without fetching a session execution snapshot.
|
||||
|
||||
Required remediation: update that focused API/identity description to the
|
||||
implemented inventory-only reader. Retain the existing publication identity and
|
||||
transfer checks; this is documentation cleanup, not a protocol change.
|
||||
|
||||
Validation: compare the revised names and behavior against current reader code
|
||||
and run `go test ./internal/doccheck`.
|
||||
|
||||
## Review Validation
|
||||
|
||||
At the review baseline, the uncached full test suite, vet, and build passed with
|
||||
Go 1.27.4. Temporary Go overlay tests reproduced findings 1–3 using real internal
|
||||
collaborators and fake external boundaries. The remediation adds durable
|
||||
behavioral regressions for these cases and the mixed local/imported workflows
|
||||
described above.
|
||||
|
||||
Final verification passed with Go 1.27.4:
|
||||
|
||||
- `go test -count=1 ./...`
|
||||
- `go test -race ./...`
|
||||
- `go vet ./...`
|
||||
- `go build ./...`
|
||||
- `go test ./internal/doccheck`
|
||||
|
||||
The original execution and inspection failures were reproduced before their
|
||||
fixes. Additional regressions cover replacement and mixed-workflow cases.
|
||||
@@ -1,397 +0,0 @@
|
||||
# Session Restore from Published Artifacts
|
||||
|
||||
Status: Implemented and verified
|
||||
|
||||
## Goal
|
||||
|
||||
Define `narratio session restore ID` as retrieving the identified session's
|
||||
published artifacts and making them usable as inputs to subsequent work.
|
||||
Restore constructs local manifest completion state from the products available
|
||||
after import. Completion means that a stage's work is satisfied by those
|
||||
products; it does not assert that the stage executed in this workspace.
|
||||
|
||||
The operator can start from original audio, start downstream work from published
|
||||
products, or continue interrupted work in an existing local workspace. Remote
|
||||
execution-checkpoint upload and recovery are deferred.
|
||||
|
||||
This is a feature roadmap, not a staged implementation plan. It incorporates
|
||||
the decisions in the [audit discussion](audit/discussion.md) and the subsequent
|
||||
agreement to synthesize stage completion using a small stage/output mapping.
|
||||
That agreement supersedes earlier suggestions that restore must reconstruct
|
||||
historical producer evidence or avoid marking covered upstream stages complete.
|
||||
|
||||
## Historical Baseline
|
||||
|
||||
Reviewed against `d8bc99b17efdddd0a728ef519b2e5a1d25f85fa9`.
|
||||
|
||||
- Publication writes immutable objects, a remote commit inventory, and a current
|
||||
pointer. The inventory already identifies sources, exact object keys, sizes,
|
||||
checksums, and storage generations. It also includes a session-manifest snapshot.
|
||||
- Remote-state discovery requires that snapshot and decodes its execution ledger.
|
||||
Restore uses it to map products, rebase producer-machine paths, and install a
|
||||
local manifest after downloading files.
|
||||
- Publication locks can retain output A while the local execution ledger describes
|
||||
replacement B. Current restore can install A alongside B's completion evidence,
|
||||
report success, and leave normal artifact resolution rejecting the result.
|
||||
- Built-in, extraction, and configured-artifact resolution depend on recorded
|
||||
producer success or generation evidence. Files copied into canonical locations
|
||||
alone are insufficient.
|
||||
- Bounded runs require preceding stage statuses. A full run additionally applies
|
||||
semantic and content resume checks, so merely writing `succeeded` would not
|
||||
establish a durable restored baseline under the current validators.
|
||||
- Prepare combines stable reference materialization, audio acquisition, and
|
||||
previous-session inputs. Session validation requires an audio source. These
|
||||
responsibilities currently obstruct a fresh artifact-only workflow.
|
||||
- Previous-session artifact selection already uses the publication inventory,
|
||||
but its shared discovery and local cache still require the execution snapshot.
|
||||
- Local speaker and analysis checkpoints already retain completed work after
|
||||
ordinary failures. They do not need remote backup to support local retry.
|
||||
|
||||
Implemented mechanics are documented in [restore](../internal/command-restore.md),
|
||||
[artifacts](../internal/artifacts.md), [manifests](../internal/manifest.md),
|
||||
[prepare](../internal/stage-prepare.md), and [publication](../internal/stage-publish.md).
|
||||
The original defect and test gap are linked from
|
||||
[CAT-02](audit/catalog.md#cat-02--p2-make-restored-carried-products-agree-with-manifest-authority).
|
||||
Their historical-evidence remediation direction is replaced by this roadmap's
|
||||
product-import model.
|
||||
|
||||
## Operator Workflows
|
||||
|
||||
### Start from original sources
|
||||
|
||||
Supply the authored campaign/session inputs and raw audio in a fresh workspace.
|
||||
Run Narratio normally. Processing stages generate their products and record
|
||||
ordinary local progress and reuse evidence.
|
||||
|
||||
### Start from published products
|
||||
|
||||
Run `narratio session restore ID` using the selected campaign and remote storage.
|
||||
Restore retrieves that session's published products, places them in the local
|
||||
workspace, and constructs the corresponding completion baseline.
|
||||
|
||||
Then select downstream stages, or run the ordinary full pipeline. Covered work
|
||||
is reused; remaining work proceeds in canonical order when its actual inputs
|
||||
are available. Required campaign/session configuration and references remain
|
||||
inputs to the new work. Restoring a transcript does not reconstruct all authored
|
||||
configuration or make unrelated inputs appear.
|
||||
|
||||
For example, a restored final trimmed JSON transcript should allow extraction
|
||||
and analysis without raw audio, per-speaker transcripts, or earlier combined
|
||||
transcripts. The selected work still needs its configured party, glossary, and
|
||||
other required inputs. Configure render for the transcript variants to produce;
|
||||
a trimmed-only selection needs no untrimmed JSON transcript.
|
||||
|
||||
### Continue local work
|
||||
|
||||
Rerun Narratio against the existing local workspace. Ordinary local checkpoints
|
||||
retain completed speakers/artifacts, and normal local resume decides what work
|
||||
remains. Restore is unnecessary for this workflow.
|
||||
|
||||
## Targeted End State
|
||||
|
||||
### Publication is the import authority
|
||||
|
||||
Restore selects published products through the current pointer and its publication
|
||||
inventory, including exact older declarations preserved by publication locks.
|
||||
It uses source identities and Narratio's local product-path definitions rather
|
||||
than a remote execution manifest to place and register products.
|
||||
|
||||
Imported products are accepted as supplied inputs. Their historical prompts,
|
||||
models, configuration, generation fingerprints, producer run IDs, and generation
|
||||
provenance are unnecessary for acceptance and use. Existing transfer-integrity,
|
||||
content, and destination checks remain distinct from generation history.
|
||||
|
||||
The product inventory remains useful for selecting and verifying files. A remote
|
||||
session-progress snapshot is not a prerequisite for publication consumption.
|
||||
Products from different generations can coexist in one publication.
|
||||
|
||||
### Restore synthesizes a local completion baseline
|
||||
|
||||
Use a small, centrally owned mapping of stages to products and the ultimate
|
||||
products that satisfy earlier transcript work. Use the existing artifact
|
||||
identities and fixed pipeline rather than a configurable workflow graph.
|
||||
|
||||
Illustrative coverage:
|
||||
|
||||
| Restored product | Work satisfied for continuation |
|
||||
| --- | --- |
|
||||
| Base JSON transcript | Transcription and merge |
|
||||
| Polished JSON transcript | The transcript chain through polish |
|
||||
| Final normalized JSON transcript | The transcript chain through normalize |
|
||||
| Final trimmed JSON transcript | The transcript chain through trim |
|
||||
| Rendered Markdown products | Their configured render output work; they do not substitute for JSON inputs |
|
||||
| Extraction products | Corresponding extraction output availability and aggregate coverage when its required products are present |
|
||||
| Configured analysis artifacts | Their individual artifact work; unrelated missing artifacts remain work |
|
||||
|
||||
This mapping is about satisfaction, not reconstruction. A final trimmed
|
||||
transcript can cover earlier stages even though their intermediate files are
|
||||
absent. The manifest records actual imported files; validated supplied records
|
||||
express covered work without inventing output records for files that do not exist.
|
||||
|
||||
Keep independent products independent. A transcript does not prove that
|
||||
extraction, analysis, or rendering completed. Render and extract remain sibling
|
||||
consumers. Bounds are separately available only when their actual product is
|
||||
present. Prepared campaign references and previous-session inputs also need
|
||||
their actual documents; transcript coverage does not supply them.
|
||||
|
||||
The baseline is durable across invocations. Its representation must be accepted
|
||||
by manifest loading, resolution, planning, and execution without fabricating
|
||||
historical fingerprints or satisfying irrelevant per-speaker records. Use only
|
||||
the local bookkeeping needed to express coverage and actual product availability.
|
||||
The manifest representation is an implementation choice.
|
||||
|
||||
Import does not authorize publish or cleanup by synthesizing their successful
|
||||
execution metadata. Those actions retain their own lifecycle and authorization.
|
||||
|
||||
### Resume respects the supplied baseline
|
||||
|
||||
A normal full run and a bounded downstream run honor restored completion.
|
||||
Absent audio, missing superseded intermediate transcripts, changed original
|
||||
model settings, and unavailable historical fingerprints do not by themselves
|
||||
regenerate covered work.
|
||||
|
||||
Preparing references for new downstream work must likewise preserve the supplied
|
||||
transcript baseline rather than invalidate it for lacking the new preparation's
|
||||
generation history. Locally generated dependents still follow their ordinary
|
||||
input-change and invalidation rules.
|
||||
|
||||
Existing checks on actual required inputs still apply. If a consumer requests an
|
||||
intermediate product that was not restored, completion coverage does not make
|
||||
that file available. Report the missing input through the normal command path;
|
||||
the operator can supply it, select different downstream work, or regenerate its
|
||||
producer with the needed inputs.
|
||||
|
||||
Force retains its existing stage/range and artifact-target meaning. Explicit
|
||||
regeneration requires the inputs actually consumed by that operation; restoring
|
||||
a final transcript does not supply audio for forced transcription. Newly executed
|
||||
work receives ordinary local checkpoints and semantic reuse evidence. The relaxed
|
||||
import rules do not disable normal local retry or freshness behavior for that work.
|
||||
|
||||
Partial analysis imports must remain usable individually. Additions to the current
|
||||
artifact selection can schedule missing work without requiring all published
|
||||
artifacts to have historical analyze fingerprints. Existing explicit-target versus
|
||||
prerequisite force behavior remains unchanged.
|
||||
|
||||
### Preparation and readiness support artifact-only execution
|
||||
|
||||
Make the stable references needed by remaining work available without requiring
|
||||
audio acquisition or execution of covered transcript producers. Relax unconditional
|
||||
audio-source requirements where necessary for this workflow, while validating
|
||||
audio configuration and availability when audio processing is actually needed.
|
||||
|
||||
Use ConfigKit's completed configuration and existing Narratio domain projections.
|
||||
Separate the needed preparation responsibilities narrowly; this is not a second
|
||||
configuration system or a general input scheduler.
|
||||
|
||||
Planning, automatic downstream readiness, and adapter composition must agree with
|
||||
the restored coverage. A covered producer is not projected to rerun merely to
|
||||
recover historical evidence. Standalone preflight retains its own documented
|
||||
capability checks; it must accommodate the artifact-only input context without
|
||||
rebuilding covered transcript work.
|
||||
|
||||
### Render selection is explicit
|
||||
|
||||
Configuration selects which transcript variants render produces: normalized
|
||||
(untrimmed) Markdown, trimmed Markdown, or both. Preserve the current both-variant
|
||||
behavior when the new selection is omitted. Existing render enablement remains
|
||||
available.
|
||||
|
||||
Render resolves the JSON inputs and produces the Markdown outputs for the selected
|
||||
variants. Selecting only trimmed Markdown requires only the final trimmed JSON;
|
||||
absence of the unselected normalized JSON does not block rendering. A selected
|
||||
variant's missing or invalid input remains an error rather than causing an
|
||||
automatic switch to whichever variants happen to be available.
|
||||
|
||||
Apply this selection consistently to generation, restore-derived completion,
|
||||
resume evidence, planning, and readiness. Restored Markdown products satisfy
|
||||
render according to the configured selection; selecting an additional missing
|
||||
output leaves that render work to perform. Semantic evidence covers the selected
|
||||
variants and their inputs rather than requiring an unselected JSON variant.
|
||||
|
||||
An operator restoring only the final trimmed JSON can select trimmed-only render
|
||||
and run the remaining pipeline. A downstream artifact or publication rule that
|
||||
requires an unselected Markdown product still needs that actual product. This
|
||||
does not add per-output checkpointing or a general partial-stage framework.
|
||||
|
||||
### Existing restore controls remain useful
|
||||
|
||||
Retain dry-run reporting, ordinary file conflicts, explicit forced replacement,
|
||||
workspace path handling, transfer verification, and retry after partial restore.
|
||||
Dry run reports planned imports and resulting stage coverage without installing
|
||||
files or a manifest. Existing optional published-audio handling can remain an
|
||||
input import; it is not execution-checkpoint recovery.
|
||||
|
||||
Install or update the local baseline after the corresponding imports have been
|
||||
accepted. Preserve the existing partial-restore recovery mechanism rather than
|
||||
adding whole-workspace rollback or stronger crash/power-loss guarantees.
|
||||
|
||||
### Restore preserves existing local progress
|
||||
|
||||
Restore can import into a fresh workspace or a workspace with local execution
|
||||
progress. Merge imported product records and derived completion into the local
|
||||
manifest, preserving unrelated local progress and speaker/artifact checkpoints.
|
||||
This combines local progress with supplied products, not two historical execution
|
||||
ledgers.
|
||||
|
||||
Retain ordinary file conflicts: download missing products, retain identical files,
|
||||
and require `restore --force` for eligible conflicting replacements. That flag
|
||||
authorizes file replacement, not forced pipeline regeneration.
|
||||
|
||||
If an imported replacement changes an input of locally generated work, apply the
|
||||
existing local dependent-invalidation rules. Products imported in the same restore
|
||||
form the selected supplied baseline; their historical generation consistency is
|
||||
not examined. Do not copy remote execution history or discard unrelated local
|
||||
completions as a shortcut to constructing the baseline.
|
||||
|
||||
## Required Changes
|
||||
|
||||
### Decouple remote discovery from execution snapshots
|
||||
|
||||
Change the shared current-state reader to expose publication identity and
|
||||
declared products without requiring, decoding, or validating a historical session
|
||||
manifest. Update restore, remote status, artifact inspection, configuration
|
||||
fallback consumers, and previous-session acquisition accordingly.
|
||||
|
||||
Stop emitting execution-ledger snapshots solely for the deferred checkpoint
|
||||
purpose. Remove execution-snapshot rebasing and recovery code that no longer
|
||||
serves the chosen workflow. Preserve the authored or standalone prepared session
|
||||
configuration used for remote configuration acquisition: that document is distinct
|
||||
from the session progress manifest. Keep required reference/input material under
|
||||
its existing purpose rather than preserving a backup feature implicitly.
|
||||
|
||||
Reuse the current publication inventory and storage primitives where they fit.
|
||||
Existing inventories can contain historical execution-snapshot declarations;
|
||||
product import should not interpret those declarations as execution authority.
|
||||
This scope does not require a new remote checkpoint protocol or historical
|
||||
generation reconstruction.
|
||||
|
||||
Primary areas: `internal/artifacts/current_state*.go`,
|
||||
`internal/artifacts/remote_commit.go`, `internal/previouscache`,
|
||||
`internal/stage/publish*.go`, and application remote/configuration consumers.
|
||||
|
||||
### Build and consume restore-defined completion
|
||||
|
||||
Replace downloaded-ledger installation with local baseline construction from
|
||||
the product mapping, merging it with existing local progress where present.
|
||||
Reconcile affected local completion records after eligible replacements while
|
||||
preserving unrelated records. Extend manifest handling and artifact availability
|
||||
so built-ins, extraction lanes, and configured artifacts can be supplied by
|
||||
restore without historical producer evidence.
|
||||
|
||||
Apply the same coverage interpretation to full-run decisions, bounded
|
||||
prerequisites, stage resume validators, and analysis reconciliation. Merely
|
||||
writing existing success statuses while leaving current validators unchanged
|
||||
would not implement the feature. Source resolution must continue distinguishing
|
||||
actual products from earlier stages satisfied only by an ultimate output.
|
||||
|
||||
Update publication's local-source resolution as well: an imported product should
|
||||
not become unusable merely because the operator later selects publication.
|
||||
Existing remote publication locks remain authoritative.
|
||||
|
||||
Primary areas: `internal/app/restore*.go`, bounded prerequisites and runner
|
||||
decisions, `internal/manifest`, `internal/artifacts` resolution/catalog/evidence,
|
||||
and stage-owned resume/checkpoint handling.
|
||||
|
||||
### Adapt preparation and operator reporting
|
||||
|
||||
The current prerequisite-inclusive previous-input collector is shared by
|
||||
preparation, restore, status, and storage composition; retain it while changing
|
||||
previous-session acquisition.
|
||||
|
||||
Review unconditional session audio validation, prepare materialization and reuse,
|
||||
and readiness/composition for actual remaining work. Preserve local per-speaker
|
||||
and per-artifact retry behavior while allowing restored completion to bypass
|
||||
irrelevant generation checks.
|
||||
|
||||
Status, plan, restore reports, and command help should explain which work is
|
||||
satisfied by restored products and which actual inputs or products are missing.
|
||||
Reporting local restored completion is administrative state, not a requirement
|
||||
to recover generation provenance.
|
||||
|
||||
Primary areas: `internal/config/validate_core.go`, `internal/stage/prepare*`,
|
||||
`internal/app/plan.go`, runner/readiness composition, and report projections.
|
||||
|
||||
### Make transcript rendering variant-selectable
|
||||
|
||||
Add a narrow variant selection to render configuration using native configuration
|
||||
defaults and validation. Keep the existing both-variant default. Configuration
|
||||
field spelling and representation can be settled in the implementation plan.
|
||||
|
||||
Update render invocation, source requirements, output declarations, semantic
|
||||
evidence, and restore coverage to use the selected variants. Use the same rules
|
||||
for ordinary and restored sessions. Retain existing content validation and failure
|
||||
handling for selected inputs and attempted conversions.
|
||||
|
||||
Primary areas: `internal/config`, `internal/stage/render.go`,
|
||||
`internal/stage/semantic_contracts_refinement.go`, restore's product mapping,
|
||||
and related planning/readiness tests.
|
||||
|
||||
### Align policies and canonical documentation
|
||||
|
||||
Update [architecture policy](../policy/architecture.md) provisions that currently
|
||||
equate stage completion and product availability exclusively with recorded local
|
||||
generation, require remote manifest installation, or imply historical resume
|
||||
evidence for every restored product. Define restore-created completion positively
|
||||
as satisfaction by supplied products, alongside ordinary executed completion.
|
||||
|
||||
Update [CLI](../cli.md), [operations](../operations.md), troubleshooting, and the
|
||||
focused restore, artifact, manifest, prepare, publication, and affected stage
|
||||
documents when implementation lands. Include the three operator workflows and
|
||||
explain that remote execution-checkpoint recovery is deferred. Keep upstream
|
||||
library behavior linked to its canonical documentation.
|
||||
|
||||
Audit records remain evidence of the baseline; they are not policy constraints
|
||||
requiring the old restore semantics. Workspace-wide locking and the scoped
|
||||
safety/transfer fixes are implemented. Reuse those boundaries during the restore
|
||||
redesign. Remaining audit remediations retain separate ownership; shared change
|
||||
surfaces do not make them prerequisites for a publication-import framework.
|
||||
|
||||
## Validation Outcomes
|
||||
|
||||
Use focused offline behavioral tests and representative assembled workflows:
|
||||
|
||||
- Publish A, lock it, generate B locally, republish, and restore into a fresh
|
||||
workspace. A resolves and supports downstream work without importing B's
|
||||
fingerprints or requiring the execution snapshot's contents to be readable.
|
||||
Cover a transcript and a configured artifact.
|
||||
- Restore an ultimate transcript with no audio and no superseded intermediate
|
||||
transcript files. Persist and reload the synthesized manifest, then compare
|
||||
planning and actual downstream execution. Covered producers make no adapter
|
||||
calls; required references are prepared or supplied normally.
|
||||
- Re-run the full pipeline after restore and demonstrate coverage reuse plus
|
||||
execution of genuinely remaining work with the configured render selection.
|
||||
No restored publish/cleanup success is fabricated.
|
||||
- Restore into a workspace with local progress. Exercise identical files,
|
||||
ordinary conflicts, and forced replacement; preserve unrelated checkpoints and
|
||||
apply local invalidation to affected locally generated work without inspecting
|
||||
the generation history of imported products.
|
||||
- Render trimmed-only with no untrimmed JSON, render untrimmed-only, and retain
|
||||
both-variant behavior when selection is omitted. Confirm missing selected
|
||||
inputs fail, unselected inputs are unnecessary, and selection changes affect
|
||||
render completion and reuse consistently.
|
||||
- Import extraction and partial analysis products, consume them through normal
|
||||
source IDs, and generate additional selected artifacts without reconstructing
|
||||
historical tool settings. Preserve meaningful force behavior.
|
||||
- Continue a locally failed transcription or analysis invocation and retain its
|
||||
previously checkpointed completions. This remains independent of restore.
|
||||
- Read previous-session products and remote status from publication inventory
|
||||
alone. Preserve configuration acquisition from the distinct session document.
|
||||
- Retain representative dry-run, conflicting-target, invalid-transfer, failed
|
||||
baseline-save, and partial-restore retry coverage. Choose tests for observable
|
||||
risks, not exact helper structure or incidental wording.
|
||||
|
||||
The implementation and its focused and assembled tests follow the
|
||||
[testing policy](../policy/testing.md).
|
||||
|
||||
## Scope Boundaries
|
||||
|
||||
Keep the fixed pipeline and existing command name. New command families, arbitrary
|
||||
workflow graphs, continuous remote backup, checkpoint upload timing/failure
|
||||
machinery, and historical generation reconciliation are outside this scope.
|
||||
Local resume remains a supported feature.
|
||||
|
||||
Preserve selected transfer, path, conflict, and publication behavior without
|
||||
turning incidental implementation choices into additional guarantees. This
|
||||
roadmap introduces no publication-wide same-generation requirement, new data-size
|
||||
cap, requirement to publish every intermediate file, or compatibility/migration
|
||||
framework. New restrictions or stronger guarantees need an explicit decision.
|
||||
Reference in New Issue
Block a user