Updated the analyze stage to accept --artifacts as a CLI flag

This commit is contained in:
2026-05-22 18:01:05 -05:00
parent 7324c5a686
commit 591c529a09
18 changed files with 399 additions and 92 deletions

View File

@@ -44,7 +44,7 @@ For config semantics, see [docs/config.md](./config.md). For operator lifecycle
- `--session-id <value>`: expected session identifier and remote session lookup value.
- `--previous-session-id <value>`: expected previous session identifier.
- `--force`: force stage execution.
- `--artifacts <names>`: analyze artifact keys to execute (repeatable or comma-separated).
- `--artifacts <names>`: configured artifact keys to execute and publish (repeatable or comma-separated).
### `plan`
@@ -63,7 +63,7 @@ For config semantics, see [docs/config.md](./config.md). For operator lifecycle
- `--session-id <value>`
- `--previous-session-id <value>`
- `--force`
- `--artifacts <names>`: analyze artifact keys to execute (repeatable or comma-separated).
- `--artifacts <names>`: configured artifact keys to execute and publish (repeatable or comma-separated).
### `run-stage`
@@ -73,7 +73,7 @@ For config semantics, see [docs/config.md](./config.md). For operator lifecycle
- `--session-id <value>`
- `--previous-session-id <value>`
- `--force`
- `--artifacts <names>`: analyze artifact keys to execute (repeatable or comma-separated).
- `--artifacts <names>`: configured artifact keys to execute or publish (repeatable or comma-separated).
- positional `<stage>`: required stage name.
### `analyze`
@@ -83,7 +83,7 @@ For config semantics, see [docs/config.md](./config.md). For operator lifecycle
- `--session <path>`
- `--session-id <value>`
- `--previous-session-id <value>`
- `--artifacts <names>`: analyze artifact keys to execute (repeatable or comma-separated).
- `--artifacts <names>`: configured artifact keys to execute (repeatable or comma-separated).
`analyze` is force-by-design and does not accept `--force`.
@@ -94,8 +94,9 @@ For config semantics, see [docs/config.md](./config.md). For operator lifecycle
- `--session <path>`
- `--session-id <value>`
- `--previous-session-id <value>`
- `--artifacts <names>`: configured artifact keys to publish (repeatable or comma-separated).
`publish` is force-by-design and does not accept `--force`, `--artifacts`, or a stage positional argument.
`publish` is force-by-design and does not accept `--force` or a stage positional argument.
Valid stage names:
@@ -379,14 +380,15 @@ Success output:
- `narratio run-stage: stage=<name> executed=<n> skipped=<n> force=<true|false>; manifest=<path>`
`--artifacts` behavior:
- accepted only when `<stage>` is `analyze`.
- accepted only when `<stage>` is `analyze` or `archive`.
- names are normalized (trimmed, deduplicated, sorted).
- unknown configured artifact keys fail.
- for `archive`, unselected configured artifact promotions are skipped; built-in transcript and bounds promotions still run.
Common failure cases:
- missing stage positional arg.
- unknown stage name.
- using `--artifacts` with any non-`analyze` stage.
- using `--artifacts` with any stage other than `analyze` or `archive`.
### `analyze`
@@ -417,7 +419,7 @@ Purpose:
Syntax:
```bash
narratio publish [--config <pipeline.yml>] [--campaign <campaign.yml>] [--session <session.yml>] [--session-id <id>] [--previous-session-id <id>]
narratio publish [--config <pipeline.yml>] [--campaign <campaign.yml>] [--session <session.yml>] [--session-id <id>] [--previous-session-id <id>] [--artifacts <name[,name...]>]
```
Success output:
@@ -426,7 +428,7 @@ Success output:
Common failure cases:
- positional arguments.
- `--force`, because force is implicit.
- `--artifacts`, because artifact selection only applies to analyze.
- unknown configured artifact keys.
- archive-stage failures such as missing required promotion sources or locked storage errors.
### `restore`
@@ -580,6 +582,7 @@ Get manifest path from previous output:
## `--artifacts` and `--force`
- `--artifacts` filters which configured artifacts are executable when analyze runs.
- `--artifacts` filters which configured artifacts are executable when analyze runs and which configured artifact promotions archive publishes.
- `--artifacts` does not imply `--force`.
- if analyze is already `succeeded` and `--force` is not set, runner-level skip still applies.
- `--artifacts` does not suppress built-in transcript or bounds promotions.

View File

@@ -52,10 +52,12 @@ Does not own:
- Resolves bucket/prefix from manifest identity first, then config fallback.
- Uploads session `previous/**` files as durable session state when the local `previous/` directory exists.
- Skips top-level promotion uploads for effective locked sources; run-local uploads still publish.
- When selected configured artifact keys are supplied, skips promotion rules for unselected `narratio.artifact.<key>` sources; built-in transcript and bounds promotions still publish.
- Effective locks are the union of `pipeline.archive.locks` and remote `{session_prefix}/locks.yml`; static pipeline locks win on duplicate sources.
- Writes metadata including:
- upload counts/paths
- `previous_files_uploaded` and `previous_uploaded_paths`
- `skipped_unselected_promotions`
- `locked_promotion_count` and `locked_promotions`
- `current_manifest_key`
- `current_run_id_key`

View File

@@ -126,10 +126,11 @@ Configured artifact source reuse:
- reused configured artifact provenance is `filesystem.disabled_artifact_output`.
`--artifacts` behavior:
- accepted on `run`, `resume`, `run-stage analyze`, and `analyze`.
- filters analyze execution only.
- accepted on `run`, `resume`, `run-stage analyze`, `run-stage archive`, `analyze`, and `publish`.
- filters analyze execution and configured artifact promotions.
- built-in transcript and bounds promotions are not filtered.
- does not imply force on `run`, `resume`, or `run-stage`; `narratio analyze` is force-by-design.
- `publish` does not accept `--artifacts`; it is a force-by-design archive rerun.
- `publish` is force-by-design and accepts `--artifacts` for configured artifact promotions.
Canonical previous-session input behavior:
- canonical sources use `narratio.previous_session.artifact.<artifact_key>`.
@@ -287,5 +288,5 @@ Dry-run does not write restore report files.
- `status --session-id <id>` includes the same promoted remote output availability view as `artifacts list --remote` when storage is configured.
- local and S3 audio input modes are mutually exclusive.
- archive publish requires upstream stages through `analyze` to be `succeeded`.
- required promotion rules can fail when selected analyze artifacts did not generate a required file path.
- required configured artifact promotions for unselected `--artifacts` keys are skipped intentionally; selected required promotions still fail if their files are missing.
- restore requires configured remote object storage and committed remote current state.