Add artifact-aware analyze resume planning
This commit is contained in:
@@ -190,8 +190,13 @@ narratio session plan <session_id> [--from <stage>] [--through <stage>] [--force
|
||||
```
|
||||
|
||||
Uses the same inclusive bounds, endpoint validation, force scope, and artifact
|
||||
selection contract as `run`. It validates config, prepares local workdir layout,
|
||||
and prints run/skip decisions for selected stages only.
|
||||
selection contract as `run`. It validates config and prints run/skip decisions
|
||||
for selected stages only without creating the local workdir or changing the
|
||||
manifest. Resume-capable selected stages are checked against durable evidence.
|
||||
For `analyze`, the preview also lists explicit targets, prerequisite-only work,
|
||||
execution order, and reusable current artifacts with concise reasons. These
|
||||
artifact decisions come from the same reconciliation and work planner used by
|
||||
execution; the preview does not predict output identities.
|
||||
|
||||
### `session validate`
|
||||
|
||||
|
||||
@@ -83,6 +83,13 @@ it stale. A partial analyze invocation can therefore succeed while unrelated
|
||||
configured records remain stale. Existing canonical files never create current
|
||||
records without validated execution and projection.
|
||||
|
||||
Aggregate analyze status is deliberately coarser than this collection. Resume
|
||||
validation may skip a succeeded aggregate record when the selected artifact
|
||||
closure is current even if unrelated records are stale. Conversely, a stale
|
||||
aggregate record may cross the ordinary runner boundary and perform zero
|
||||
Scriptorium calls when reconciliation proves every selected artifact current;
|
||||
the successful projection then restores the aggregate status.
|
||||
|
||||
Analyze may return a projection together with an error. That restricted result
|
||||
cannot carry ordinary outputs, skip state, aggregate logs, generated configs,
|
||||
or metadata. The runner persists only the validated per-artifact collections,
|
||||
|
||||
@@ -88,6 +88,14 @@ Supported source families:
|
||||
projected record collection. Valid unrelated configured records survive the
|
||||
projection, removed records are omitted, and legacy files never become
|
||||
current without regeneration.
|
||||
- implements aggregate resume validation by running the same read-only catalog,
|
||||
fingerprint reconciliation, and work planner used by execution. A succeeded
|
||||
aggregate record is reusable exactly when the selected closure schedules no
|
||||
artifact work; stale unrelated records do not block a partial selection.
|
||||
- exposes the typed artifact decision to `session plan`. Planning applies it to
|
||||
a cloned manifest after modeling earlier selected stage transitions, so
|
||||
aggregate run/skip and artifact execute/reuse decisions match the ordinary
|
||||
runner without creating durable state or invoking Scriptorium.
|
||||
- executes only the work plan's scheduled entries. Manifest-validated current
|
||||
prerequisites remain available through the runtime catalog without invoking
|
||||
Scriptorium; newly produced prerequisites enter that catalog with the same
|
||||
@@ -168,4 +176,5 @@ Supported source families:
|
||||
`internal/stage/analyze_reconciliation_test.go`,
|
||||
`internal/stage/analyze_plan.go`, `internal/stage/analyze_plan_test.go`, and
|
||||
`internal/stage/analyze_incremental_execution_test.go`, and
|
||||
`internal/stage/analyze_failure_test.go`
|
||||
`internal/stage/analyze_failure_test.go`,
|
||||
`internal/stage/analyze_resume.go`, and `internal/stage/analyze_resume_test.go`
|
||||
|
||||
@@ -122,7 +122,13 @@ Omitting `--from` selects from `prepare`; omitting `--through` selects through
|
||||
`notify`. Force applies only within the selected range. Repeating `--from`,
|
||||
`--through`, or `--force` is rejected instead of resolving by argument order.
|
||||
The plan command uses the same selection contract and prints only the selected
|
||||
range.
|
||||
range. Planning is read-only: it clones the loaded manifest, models selected
|
||||
stage transitions and invalidation in memory, and invokes resume validation
|
||||
without writing the manifest, creating run directories, materializing files,
|
||||
or invoking pipeline adapters. Analyze detail separates explicit targets,
|
||||
prerequisite rebuilds, scheduled execution, and current reuse. This lets a
|
||||
coarsely stale aggregate analyze stage show zero artifact executions when its
|
||||
selected artifact evidence is still semantically current.
|
||||
|
||||
Before a bounded run or plan whose range starts after `prepare`, every excluded
|
||||
prefix stage must already have a session-manifest status of `succeeded` or
|
||||
|
||||
@@ -668,6 +668,8 @@ partial adapter, validation, materialization, and persistence failures.
|
||||
|
||||
## Stage 14 — Analyze Resume Validation And Plan/Run Parity
|
||||
|
||||
**Status: Completed**
|
||||
|
||||
### Goal
|
||||
|
||||
Make aggregate analyze skipping and `session plan` reflect artifact-level
|
||||
|
||||
Reference in New Issue
Block a user