Preserve local prerequisite history during reference preparation

This commit is contained in:
2026-12-02 17:53:33 +00:00
parent 845738a665
commit d6df530312
6 changed files with 91 additions and 17 deletions

View File

@@ -182,9 +182,10 @@ Validation by content type:
- merges required and optional references (required wins);
- returns deterministic ordering and source locations.
`PreviousArtifactRequirementsForKeys` applies the same source collection to an
already planned set of generation keys. Bounded reference preparation uses it
after analysis planning has resolved supplied-product reuse boundaries.
`PreviousArtifactRequirementsForKeys` applies the same source collection to
planned generation and reused local checkpoint keys. Bounded reference
preparation uses it after analysis planning has resolved supplied-product reuse
boundaries.
## Current-State Helpers

View File

@@ -56,8 +56,8 @@ Materialize canonical current-session inputs before processing stages.
- collects `narratio.previous_session.artifact.*` requirements from the selected
targets and their full prerequisite closure, including disabled prerequisites;
see [previous requirement collection](artifacts.md#previous-requirement-collection).
Bounded reference preparation uses the actual projected generation keys,
preserving history needed by new work while excluding reused products' history.
Bounded reference preparation uses projected work and reused local checkpoint
keys, preserving their history while excluding supplied products' history.
- clears managed `inputs/previous/` state on every invocation, then, when requirements exist:
- resolves the pointer-selected previous source through the shared resolver;
- downloads declared previous artifacts;

View File

@@ -1,13 +1,16 @@
# 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 following gaps remain. This document records review findings, not additional
product requirements or an implementation plan.
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
@@ -55,11 +58,14 @@ 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.
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. Verified with
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.
@@ -150,8 +156,18 @@ and run `go test ./internal/doccheck`.
## Review Validation
The existing uncached full test suite, vet, and build passed with Go 1.27.4.
Separate temporary Go overlay tests reproduced findings 1–3 using real internal
collaborators and fake external boundaries. They were diagnostic review probes;
the repository test suite currently lacks these cases. The remediation should
add durable regressions at the relevant behavioral boundaries.
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`
Each behavior regression was observed failing before its corresponding fix.