diff --git a/docs/releases/README.md b/docs/releases/README.md index c553357..90afb1f 100644 --- a/docs/releases/README.md +++ b/docs/releases/README.md @@ -11,6 +11,7 @@ See the [release procedure](../release.md) for creating a candidate and tag. When asynchronous publication succeeds, the corresponding Gitea release is the canonical source for downloadable binaries and checksums. +- [v4.0.0](v4.0.0.md) - [v3.1.0](v3.1.0.md) - [v3.0.0](v3.0.0.md) - [v2.2.1](v2.2.1.md) diff --git a/docs/releases/v4.0.0.md b/docs/releases/v4.0.0.md new file mode 100644 index 0000000..b1c447e --- /dev/null +++ b/docs/releases/v4.0.0.md @@ -0,0 +1,222 @@ +# Narratio v4.0.0 + +Narratio v4.0.0 adopts a native CommandKit CLI, shared campaign and glossary +schemas, and current Audita, Notarius, and Scriptorium interfaces. A standalone +preflight command prepares real inputs and checks readiness before processing. +Published products can be imported for further work without restoring the +execution history that produced them. + +This is a breaking upgrade from v3.1.0. Update authored configuration, input +documents, command invocations, and scripts that consume command reports. Older +local session state is not converted in place. + +## Compatibility and deployment + +- Building from source now requires Go 1.27.0 or later, up from 1.26.0. + Maintained builds use Go 1.27.4. Release targets remain Linux amd64 and arm64, + plus best-effort macOS arm64. +- The integration baselines are Audita v4.3.0, Notarius v0.10.0, and Scriptorium + v0.16.0. Install the applicable tools separately and migrate their own + configuration using the guides linked from the + [integration contracts](../integrations/README.md). Audita uses its version 3 + configuration and Notarius its version 6 configuration. +- Narratio embeds the shared glossary, RPG party, and RPG campaign schemas at + version 0.2.0 from schemas distribution `2026.11.1`. Validation is offline; + the schema markers remain `maximumdirect.glossary.v1`, + `maximumdirect.rpg.party.v1`, and `maximumdirect.rpg.campaign.v1`. +- The configuration and CLI integrations now use ConfigKit v1.4.0, + CommandKit v0.8.0, and ckconfig v0.11.0. ReleaseKit v0.10.0 owns version + reporting and the maintainer release workflow. + +## CLI and reporting changes + +CommandKit now owns parsing, configuration inspection, reporting, diagnostics, +and completion. Removed command paths have no compatibility aliases. + +| Previous invocation | Replacement | +| --- | --- | +| `session validate SESSION` | `preflight SESSION` | +| `run-stage STAGE SESSION` | `run SESSION --stage STAGE` | +| `analyze SESSION` | `run SESSION --stage analyze --force` | +| `publish SESSION` | `run SESSION --stage publish --force` | +| `regenerate-artifacts SESSION` | `artifacts regenerate SESSION` | +| `clean SESSION` / `clean --all` | `session clean SESSION` / `session clean --all` | +| `config artifacts` | `artifacts list` | +| `session locks SESSION` | `session locks list SESSION` | +| `--session FILE` | `--session-file FILE` | +| `--session-id ID` | Positional `SESSION` on domain commands | +| `config diff LEFT RIGHT` | `config diff --overlay LEFT --against-overlay RIGHT` | + +Place flags after the complete command path. Configuration inspection uses +`--session` to assert an identity, not to select a file. Campaign identity and +file selectors may now be used together; `--party-file` selects a roster without +editing the campaign. See the [CLI reference](../cli.md). + +Native inspection exposes `app`, `campaign`, `session`, and `party` scopes, +including source explanations and independent comparisons. It preserves authored +artifact-family declarations. Use `artifacts list` for expanded domain +definitions, `session plan` for execution and reuse decisions, and +`session artifacts` for product availability. App inspection supports native +field overrides; execution and planning continue to use files and overlays. + +Reports go to stdout through native text, YAML, or JSON rendering; automatic +structured output uses YAML. Diagnostics and progress go to stderr. +`--progress` reports work such as transfers and speaker/artifact completion; +`--verbose` adds informational context. Quiet mode suppresses reports while +retaining failure diagnostics. Console debug does not enable downstream debug +capture. Scripts must adapt to the new report shapes and +[exit classifications](../cli.md#cancellation-and-exit-status), including status +2 for identifiable invalid configuration input and status 1 for operational +failures. + +`artifacts regenerate` forces the whole configured extraction before rebuilding +selected analysis targets and prerequisites. `--artifacts` narrows analysis, +not extraction lanes; this command stops before publication and cleanup. + +## Configuration and shared inputs + +Configuration policy is delegated to ConfigKit. The main migration steps are: + +- Rename source-root `configkit:` controls to `config:`. Review native import, + inheritance, and sequence-composition rules; mark required imports explicitly. +- Update pipeline discovery filenames, or pass an existing custom filename such + as `pipeline.yml` with `--config`. The former implicit search for + `/etc/narratio/pipeline.yml` and `/usr/local/etc/narratio/pipeline.yml` has been + replaced by [native discovery](../config.md#discovery-and-selection). +- Remove `--secrets-dir`. Declare `config.secrets_dir` in the pipeline main file + or provide credentials through the process environment. There is no automatic + conventional secrets-directory probe. Retain exact credential-reference names + in the applicable downstream `credentials` lists. +- Review relative resource paths: imported and inherited values resolve from + their defining source. Defaults apply to absent fields; explicit empty, null, + zero, and false values retain their native meaning and undergo domain checks. + +Campaigns now use the shared campaign envelope: `schema_version` and `id`, +`references.party` for the roster, and the `narratio` extension for speakers, +inline autocorrection, campaign vocabulary, and session templates. Replace +file-based autocorrection and private spell-catalog inputs with the maintained +shared-input model. Party rosters use the shared party schema and plural +`aliases`; Narratio derives the players document and party glossary from that +single roster. + +Glossaries use shared named-collection envelopes. Preparation writes `party`, +`campaign`, `setting`, and `spells` glossaries plus a combined document. Campaign +vocabulary may come from a file, inline entries, or native composition of both. +Optional setting and system selections use a separately installed reference +catalog. Replace old `narratio.input.glossary` and private spell-catalog bindings +with the applicable `narratio.input.glossary.*` sources. No legacy document +conversion is performed. + +Audita receives the four individual glossaries. Its ordered processing pipeline +belongs in Audita configuration; remove Narratio's retired `audita.modules`. +Notarius can consume the prepared roster and combined glossary through explicit +reference bindings. Rename `notarius.config_profile` to `config_overlay`, replace +`resume` and `chunk_cache` with native cache selection as needed, and remove old +output descriptor fields. Output entries now select a `lane_id` and optional +flat JSON `filename`. Forced extraction requests native cache refresh. + +Use the [production/testing bundle](../../examples/production-testing/pipeline.yml) +and [three-file campaign example](../../examples/campaigns/lantern-coast/campaign.yml) +as migration references. The [configuration reference](../config.md) owns the +complete field, clearing, and source-resolution rules. + +## Preflight and processing + +`narratio preflight SESSION` prepares or reuses inputs, then checks configured +readiness, including native Audita and Notarius preflight and Scriptorium prompt +requirements. Unlike the former validation command, it can create a workspace, +download inputs, and update preparation state. It may contact providers. +Changed inputs use ordinary dependent invalidation; a later readiness failure +does not discard successful preparation. + +Standalone preflight checks enabled capabilities even when processing outputs +are reusable. Automatic preflight checks projected work after preparation and +before processing. Required failures stop execution; advisory prompt-discovery +findings retain warning treatment. Audita uses a synthetic transcript; Notarius +uses a suitable verified transcript or its synthetic fallback. These checks do +not guarantee future provider availability or real-transcript processing quality. + +Scriptorium generation now uses its native CLI and captures result stdout +separately from diagnostic stderr. Prepared previews and requirements inspection +use native structured output. Missing required bindings and failed inspection +are caught before the affected processing begins. + +Audio discovery now accepts common formats beyond FLAC, including WAV, MP3, +M4A, and Opus, with the same case-insensitive suffix selection for local directory +and S3 prefix scans. Explicit files can have any suffix. Narratio does not +transcode or certify the encoding; WhisperX must be able to decode the bytes. +Prepared names and speaker identities are checked for collisions before audio +materialization. See [audio selection](../config.md#session). + +## Workspace, publication, and restore + +The local workspace now separates prepared `inputs/` and `audio/`, combined +`transcripts/` with `raw/` speaker transcripts, flat `artifacts/`, and run-local +attempt material. Logs and debug views point to the latest actual attempt, +including failures. Selected Notarius lane products are promoted into canonical +artifact locations and can be reused without the original bundle. Retired +spool and audio-cache configuration is no longer accepted; prepared audio has +one verified copy. Subprocess state and caches remain under each tool's control. + +Only `narratio.session-manifest.v2` is accepted locally. Preserve older workspaces +separately, then regenerate or import compatible published products into a new +local baseline. Do not change old schema markers or edit immutable remote +snapshots to bypass validation. + +Publication now transfers products and prepared inputs without uploading the +local execution ledger. `session restore` imports recognized products from the +selected publication inventory and merges them with valid local progress. It +does not restore remote execution checkpoints or claim that remote stages ran +locally. Identical products preserve valid local evidence; changed products +invalidate dependent work while unrelated checkpoints remain. + +Imported transcripts and artifacts can satisfy downstream work without their +original producer history. Bounded downstream runs prepare required references +without demanding audio for unrelated transcription. Uncovered or forced +transcription still requires audio. `render.variants` can select normalized, +trimmed, both, or neither transcript variant. Restore dry runs report planned +imports, conflicts, and projected work; `restore --force` permits eligible file +replacement rather than forcing processing. See the +[restore workflow](../operations.md#restore-workflow). + +When `workspace.cleanup_after_publish` is enabled and publication evidence +authorizes cleanup, the final cleanup stage removes the **entire session run +history**: earlier failures, logs, debug captures, restore/probe attempts, and +original Notarius bundles. Managed diagnostic links are removed too. Prepared +inputs, canonical products, and the local manifest remain reusable; remote +published objects and subprocess caches are unaffected. Set the +option to `false` to retain execution evidence. `session clean` is different: +it removes the entire local session. See [cleanup](../operations.md#cleanup). + +## Reliability improvements + +- Workspace coordination now covers active processing, restore, initialization, + and manual cleanup; lock waiting is cancellation-aware and reported as progress. +- Subprocess completion waits for owned process output before releasing resources. +- Audio and publication transfers stream data and verify available size and + object-identity evidence; publication sources are handled one at a time. +- Planning checks current S3 source evidence before predicting preparation reuse. +- Previous-session hydration includes configured artifact prerequisites, including + disabled prerequisites needed by selected work. +- Shared dependency and input indexes reduce repeated scans during analysis, + inspection, publication, and restore. + +## Upgrade sequence + +1. Preserve authored sources, old local workspaces, and any execution evidence + you want to retain. Published products are not execution-checkpoint backups. +2. Install the applicable downstream versions and migrate their configuration. +3. Update Narratio configuration and shared input documents using the maintained + examples. Remove retired keys and update CLI scripts and report consumers. +4. Validate and inspect configuration with native `config` commands, then review + expanded inputs and outputs with `artifacts list`. Use a new local baseline + for unsupported state; preview any product import with + `session restore SESSION --dry-run` before applying it. +5. Run `preflight SESSION`, inspect `session plan SESSION`, and execute the desired + full or bounded `run`. Review cleanup retention before a full published run. + +Maintainers now use the module-selected ReleaseKit launcher for candidate +validation, tagging, and asynchronous binary delivery; the old release scripts +have been removed. See the [release procedure](../release.md). + +[COPYRIGHT](https://forge.maximumdirect.net/eric/narratio/src/tag/v4.0.0/COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/eric/narratio/src/tag/v4.0.0/LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/eric/narratio/src/tag/v4.0.0/docs/oss/attribution.md)