Document shared glossaries and downstream preflight
This commit is contained in:
12
docs/cli.md
12
docs/cli.md
@@ -94,9 +94,9 @@ reruns selected work; dependent invalidation can extend beyond that range.
|
||||
Bounded starts require valid preceding manifest state. Ordinary execution uses
|
||||
semantic resume checks rather than rerunning all selected work.
|
||||
|
||||
Before stage attempts, `run` inspects requirements for projected Scriptorium
|
||||
work. Missing required bindings or variables and inspection failures stop the
|
||||
invocation; warnings alone do not. `artifacts regenerate` uses the same check.
|
||||
After preparation, `run` checks projected Audita and Scriptorium work before
|
||||
processing continues. Failed checks stop the invocation; prompt warnings alone
|
||||
do not. `artifacts regenerate` uses the same check.
|
||||
See [operations](operations.md#prompt-requirements-preflight) for recovery.
|
||||
|
||||
Analysis-only rebuilding uses `run SESSION --stage analyze --force`; it does
|
||||
@@ -149,8 +149,10 @@ predict unknown output identities.
|
||||
narratio session validate SESSION --session-file ./session.yml
|
||||
```
|
||||
|
||||
Read-only validation checks configuration and required input, audio,
|
||||
previous-session, publication, and lock readiness. It also inspects enabled trim
|
||||
Validation checks configuration and required input, audio, previous-session,
|
||||
publication, and lock readiness. Audita preflight uses existing prepared inputs,
|
||||
probes temporary destinations under `runs/.validation`, and may contact configured
|
||||
providers. It also inspects enabled trim
|
||||
and analysis definitions and their configured prerequisites, regardless of
|
||||
output reuse. Missing prompt requirements or unsuccessful inspection invalidate
|
||||
the report; incomplete or conditional discovery alone is a warning. Material
|
||||
|
||||
@@ -124,10 +124,10 @@ remote state with an unsafe legacy identity must be migrated before use.
|
||||
Explicit null optional stage sections stay absent, while required sections
|
||||
fail validation.
|
||||
- Campaign and session identities must agree.
|
||||
- Required stable files (`speakers_file`, `autocorrect_file`, `glossary_file`,
|
||||
`party_file`) are campaign-owned; the first three may be overridden by the
|
||||
session. The optional `spell_catalog_file` also inherits a campaign value
|
||||
when omitted by the session.
|
||||
- The campaign supplies required speakers, autocorrect, and canonical party
|
||||
files. Sessions may independently override speakers and autocorrect.
|
||||
Optional glossary selections and the separate spell overlay inherit as
|
||||
described under [glossary inputs](#glossary-inputs).
|
||||
- The selected party is parsed when domain context or party inspection needs
|
||||
it. It must be a versioned [canonical party](integrations/party.md). The
|
||||
campaign supplies its default file; an explicit CLI selection replaces it
|
||||
@@ -279,6 +279,8 @@ Rules:
|
||||
| Field | Type | Required | Default / Rule |
|
||||
| --- | --- | --- | --- |
|
||||
| `config.imports` | list | No | native source-root import selections; see [imports and overlays](#pipeline-imports-and-overlays) |
|
||||
| `pipeline.reference_catalog.settings` | map[string]string | No | setting IDs to source-relative vocabulary files |
|
||||
| `pipeline.reference_catalog.systems` | map[string]string | No | system IDs to source-relative vocabulary files |
|
||||
| `pipeline.workspace.root` | string | No | `/var/lib/narratio` |
|
||||
| `pipeline.workspace.cleanup_after_publish` | bool | No | `false`; selects the published run's workspace target for final cleanup and requires effective `pipeline.publish.enabled=true` and `pipeline.publish.upload_run=true` |
|
||||
| `pipeline.campaigns.root` | string | No | `/usr/local/share/narratio/campaigns` |
|
||||
@@ -319,7 +321,6 @@ Rules:
|
||||
| `pipeline.audita.binary` | string | No | `audita` |
|
||||
| `pipeline.audita.timeout` | duration | No | `3h` |
|
||||
| `pipeline.audita.credentials[]` | list[secret reference] | No | empty; exact environment-variable names forwarded to Audita |
|
||||
| `pipeline.audita.modules[]` | list[string] | No | unset; omit to use Audita defaults, set `[]` for no modules |
|
||||
| `pipeline.audita.overlay` | string | No | empty; no downstream overlay override |
|
||||
| `pipeline.audita.proposal_profile` | string | No | empty; no downstream proposal-profile override |
|
||||
| `pipeline.audita.validation_profile` | string | No | empty; no downstream validation-profile override |
|
||||
@@ -368,29 +369,20 @@ Rules:
|
||||
|
||||
### Audita Selection and Credentials
|
||||
|
||||
`pipeline.audita.config_path` optionally passes an Audita v2 configuration file;
|
||||
when empty, Audita uses its own native config discovery. `overlay`,
|
||||
`proposal_profile`, and `validation_profile` are independent, optional Audita
|
||||
selectors. Empty or omitted strings add no command-line override. Narratio's
|
||||
selected pipeline overlay is never inferred as an Audita overlay, and Narratio
|
||||
does not create or validate Audita's backend or PromptKit profile files. Prepare
|
||||
them with [Audita's v2 migration guide](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/docs/migrations/v2.md).
|
||||
`pipeline.audita.config_path` optionally selects an Audita v4.2 configuration;
|
||||
otherwise Audita uses native discovery. `overlay`, `proposal_profile`, and
|
||||
`validation_profile` independently select downstream settings. Empty values
|
||||
add no override. Narratio does not create Audita configuration or infer its
|
||||
selectors from a Narratio overlay. Configure the ordered Audita pipeline in
|
||||
Audita itself; the retired `pipeline.audita.modules` field is rejected. See
|
||||
[Audita's configuration guide](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/config.md)
|
||||
and the [integration contract](integrations/audita.md).
|
||||
|
||||
Omit `modules` or set it to `null` to use Audita's configured default sequence.
|
||||
Set `modules: []` to run no correction modules. A nonempty list is passed in
|
||||
order, including repetitions. Narratio does not add a reporting or debug flag;
|
||||
Audita's external configuration controls those settings.
|
||||
|
||||
`pipeline.audita.credentials` lists secret-reference names, not values. Narratio
|
||||
resolves every listed name during pipeline loading and forwards the captured
|
||||
nonempty value under that exact name to Audita. It does not inspect Audita's
|
||||
configuration to discover names or map them to aliases. Audita v2 resolves
|
||||
credentials for **all configured backends**, even ones not selected by the
|
||||
current profiles: list every named backend credential in the selected Audita
|
||||
configuration. An unauthenticated backend needs no reference. Omission, `null`,
|
||||
or `[]` forwards nothing. A Narratio overlay replaces the entire list, and
|
||||
`[]` clears it. See the [Audita integration contract](./integrations/audita.md)
|
||||
for the subprocess and redaction boundary.
|
||||
`pipeline.audita.credentials` contains exact environment-variable references,
|
||||
not values. Narratio resolves each name at pipeline load and forwards its value
|
||||
under the same name. Supply every credential required by the selected Audita
|
||||
configuration. Omission, `null`, or `[]` forwards nothing; a Narratio overlay
|
||||
replaces the list. Captured diagnostics redact those values.
|
||||
|
||||
<a id="notarius-configuration-profile"></a>
|
||||
|
||||
@@ -479,14 +471,17 @@ Narratio source, not to a filesystem path:
|
||||
```yaml
|
||||
notarius:
|
||||
references:
|
||||
glossary: narratio.input.glossary
|
||||
glossary: narratio.input.glossary.campaign
|
||||
party: narratio.input.party
|
||||
players: narratio.input.players
|
||||
spell_catalog: narratio.input.spell_catalog
|
||||
```
|
||||
|
||||
Supported sources are `narratio.input.party`, `narratio.input.players`,
|
||||
`narratio.input.glossary`, and `narratio.input.spell_catalog`. Each map entry is
|
||||
`narratio.input.glossary.party`, `narratio.input.glossary.campaign`,
|
||||
`narratio.input.glossary.setting`, `narratio.input.glossary.spells`, and
|
||||
`narratio.input.spell_catalog`. The retired `narratio.input.glossary` is not an
|
||||
alias; update each binding explicitly. Each map entry is
|
||||
required by its presence: omit a binding when the selected Notarius pipeline
|
||||
does not need it. A spell-catalog binding additionally requires an effective
|
||||
campaign or session `spell_catalog_file`.
|
||||
@@ -665,10 +660,42 @@ integration.
|
||||
| `session_template_file` | string | No | used by `session init` when set |
|
||||
| `inputs.speakers_file` | string | Yes | stable input default |
|
||||
| `inputs.autocorrect_file` | string | Yes | stable input default |
|
||||
| `inputs.glossary_file` | string | Yes | stable input default |
|
||||
| `inputs.setting` | string | No | selected setting ID in `reference_catalog.settings` |
|
||||
| `inputs.system` | string | No | selected system ID in `reference_catalog.systems` |
|
||||
| `inputs.glossary_file` | string | No | campaign vocabulary file |
|
||||
| `inputs.glossary` | mapping | No | inline campaign collection contribution |
|
||||
| `inputs.party_file` | string | Yes | stable campaign party source; relative paths resolve from their defining source |
|
||||
| `inputs.spell_catalog_file` | string | No | optional spell-catalog overlay default; required when a Notarius reference selects `narratio.input.spell_catalog` |
|
||||
|
||||
### Glossary Inputs
|
||||
|
||||
Install an independently selected catalog locally and import its `catalog.yml`
|
||||
into the pipeline; [the example](../examples/pipeline.catalog.yml) uses a small
|
||||
synthetic bundle. Catalog IDs map to file paths relative to their defining
|
||||
configuration sources. Only selected files are read; an unknown selected ID is
|
||||
an error. Catalog files and their native imports are resolved with ConfigKit.
|
||||
|
||||
Campaigns can select `setting`, `system`, `glossary_file`, and inline `glossary`
|
||||
independently. Session omissions inherit each campaign value independently;
|
||||
null or empty optional selectors clear that selection. Session inline data
|
||||
replaces the campaign inline contribution as a whole, and explicit null removes
|
||||
it. The selected campaign file is composed below the effective inline
|
||||
contribution using native ConfigKit entry identity and list controls.
|
||||
|
||||
Files contain named collections: campaign files provide `campaign`, selected
|
||||
setting files provide `setting`, and system files provide `spells`. Preparation
|
||||
derives `party` from the canonical roster and writes all four collections, even
|
||||
when empty. The [catalog format](https://forge.maximumdirect.net/eric/narratio-reference-catalog/src/branch/main/FORMAT.md)
|
||||
owns the shared schema; [examples](../examples/README.md#campaign-and-session-configuration)
|
||||
show file-only, inline-only, and combined authoring. The former standalone
|
||||
glossary format is not converted automatically.
|
||||
|
||||
All four prepared entry lists are supplied to Audita and replace the matching
|
||||
Audita-configured lists, including when empty. Other collections and omitted
|
||||
instruction fields follow Audita's native composition. The canonical roster,
|
||||
players projection, and optional Notarius spell-catalog overlay remain separate
|
||||
inputs. Configuration inspection preserves authored selections and inline data.
|
||||
|
||||
### Session
|
||||
|
||||
| Field | Type | Required in session file | Notes |
|
||||
@@ -680,7 +707,10 @@ integration.
|
||||
| `title` | string | No | metadata |
|
||||
| `inputs.speakers_file` | string | No | overrides campaign stable input |
|
||||
| `inputs.autocorrect_file` | string | No | overrides campaign stable input |
|
||||
| `inputs.glossary_file` | string | No | overrides campaign stable input |
|
||||
| `inputs.setting` | string | No | independently overrides the campaign setting selection |
|
||||
| `inputs.system` | string | No | independently overrides the campaign system selection |
|
||||
| `inputs.glossary_file` | string | No | independently overrides the campaign vocabulary file |
|
||||
| `inputs.glossary` | mapping | No | replaces the campaign's inline contribution |
|
||||
| `inputs.spell_catalog_file` | string | No | omission inherits the campaign spell catalog; an explicit empty string clears this optional input |
|
||||
| `inputs.audio_dir` | string | Conditional | local audio mode |
|
||||
| `inputs.audio_files[]` | list[string] | Conditional | local audio mode |
|
||||
|
||||
@@ -1,54 +1,43 @@
|
||||
# Integration: Audita
|
||||
|
||||
Narratio invokes Audita v2's `process INPUT --glossary PATH --output PATH`
|
||||
subprocess for `polish`. The configured timeout and parent cancellation bound
|
||||
execution. Narratio passes explicit `--config`, `--overlay`,
|
||||
`--proposal-profile`, `--validation-profile`, `--transcript-description`,
|
||||
`--output-schema`, and `--modules` only when selected. An omitted module list
|
||||
leaves Audita's default sequence in place; `modules: []` passes an explicit
|
||||
empty argument and runs no correction modules. Order and repetitions are kept.
|
||||
Narratio passes no debug, work-directory, or reporting flags, leaving those
|
||||
choices to Audita's own configuration.
|
||||
Narratio invokes Audita v4.2 for polishing. Its adapter supplies the prepared
|
||||
party, campaign, setting, and spells documents as repeated `--glossary-file`
|
||||
arguments, the merged transcript and requested output, and run-local report and
|
||||
work destinations. Optional config, overlay, profile, transcript-description,
|
||||
and output-schema selectors are forwarded only when set. Audita owns its
|
||||
configuration, ordered pipeline, profiles, and native discovery. Narratio does
|
||||
not generate a downstream configuration. See [Audita configuration](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/config.md)
|
||||
and its [runtime glossary input contract](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/integrations/transcript-glossary-files.md).
|
||||
|
||||
Audita owns its ConfigKit file, backend and profile definitions, native config
|
||||
discovery, and their validation. Narratio does not create an Audita
|
||||
configuration or infer downstream overlay/profile names from its own selected
|
||||
pipeline overlay. An empty Narratio Audita selector adds no CLI override.
|
||||
The [configuration reference](../config.md#audita-selection-and-credentials)
|
||||
owns Narratio's fields and defaults. Audita's
|
||||
[v2 migration guide](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/docs/migrations/v2.md)
|
||||
owns its downstream file format.
|
||||
All four entry lists are supplied, including empty ones, and replace same-named
|
||||
Audita-configured lists. Other collections and omitted instruction fields retain
|
||||
native downstream composition. The [configuration reference](../config.md#glossary-inputs)
|
||||
explains selection and migration of the prepared inputs.
|
||||
|
||||
Each name in `pipeline.audita.credentials` is a ConfigKit secret reference
|
||||
resolved when Narratio loads the pipeline. Narratio forwards only the selected
|
||||
names and their captured, nonempty values under those exact names, in the
|
||||
minimal child environment; it never maps them to a fixed alias or rereads the
|
||||
parent environment. Every name is registered for captured stdout/stderr and
|
||||
failure-diagnostic redaction. Audita resolves credentials for all configured
|
||||
backends, including unselected ones, so operators must list every backend
|
||||
credential that its selected configuration needs. The downstream files and
|
||||
provider output remain Audita's responsibility, outside Narratio's
|
||||
captured-stream redaction boundary.
|
||||
After preparation, Narratio runs native Audita preflight when projected polish
|
||||
work needs execution. The adapter supplies the same selections and prepared
|
||||
files with a synthetic transcript. Audita's provider smoke checks remain enabled;
|
||||
they can contact providers and destination probes can create directories.
|
||||
`session validate` uses existing prepared records and a validation probe
|
||||
namespace. A successful check is not a guarantee about later real-transcript
|
||||
processing or editorial quality. See [operations](../operations.md#prompt-requirements-preflight)
|
||||
and [Audita preflight](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/cli.md#preflight).
|
||||
|
||||
The corrected transcript is the only canonical polish output. A successful
|
||||
invocation must produce a valid JSON transcript with a top-level `segments`
|
||||
array within Narratio's 64 MiB bound. Exit zero is accepted even if Audita's
|
||||
ordinary reports describe recoverable model errors or no corrections. Narratio
|
||||
does not parse report status, counts, or Markdown. It discovers only
|
||||
`errors.yml`, `recoveries.yml`, and `report.md` next to the requested output,
|
||||
each subject to a 16 MiB read bound. Missing reports are allowed, for example
|
||||
when Audita reporting is disabled externally. Available reports are diagnostic
|
||||
references, not canonical artifact outputs. See Audita's
|
||||
[ordinary output contract](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/docs/integrations/output-files.md)
|
||||
for their schemas, and [operations](../operations.md) for placement and
|
||||
publication.
|
||||
Each `pipeline.audita.credentials` value is an exact ConfigKit secret reference.
|
||||
Narratio forwards selected names and captured values in the child environment
|
||||
and registers them for captured-stream redaction. It does not discover backend
|
||||
credentials or scrub files created by Audita. The configured timeout and parent
|
||||
cancellation bound subprocess execution.
|
||||
|
||||
On nonzero exit, Narratio preserves the original subprocess error and
|
||||
available run-local evidence; it never promotes a transcript merely because
|
||||
the file exists. The adapter returns safe paths, exit details, and selection
|
||||
metadata on failure. Narratio's `audita.generated.v2` YAML records the
|
||||
invocation, including arguments, paths, and credential names but never values;
|
||||
it is a diagnostic record, not a generated Audita config file.
|
||||
The corrected transcript is the only canonical polish output. It must be valid
|
||||
JSON with a top-level `segments` array within Narratio's 64 MiB limit. Exit zero
|
||||
is accepted even when ordinary reports describe recoverable errors or no
|
||||
corrections. Narratio records available `errors.yml`, `recoveries.yml`, and
|
||||
`report.md` from the requested report directory as diagnostics, each subject
|
||||
to a 16 MiB bound. Reports may be absent when disabled. See Audita's
|
||||
[output contract](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/integrations/output-files.md).
|
||||
|
||||
Maintained Narratio examples: [full annotated pipeline](../../examples/pipeline.full.annotated.yml)
|
||||
and [production-shaped pipeline](../../examples/pipeline.production.yml).
|
||||
On nonzero exit, Narratio preserves the subprocess error and available run-local
|
||||
evidence and does not promote an incidental transcript. The generated invocation
|
||||
record contains arguments, paths, and credential names, never values; it is a
|
||||
diagnostic record, not an Audita configuration file.
|
||||
|
||||
@@ -66,6 +66,10 @@ projection. Both retain their established `narratio.input.party` and
|
||||
`narratio.input.players` source IDs, and both are resolved from the prepared
|
||||
manifest rather than from campaign configuration at extraction time.
|
||||
|
||||
The `glossary` slot may bind `narratio.input.glossary.campaign`; the four
|
||||
prepared glossary sources are explicit and the retired monolithic source is
|
||||
not an alias. The separate Notarius spell-catalog overlay remains unchanged.
|
||||
|
||||
The maintained D&D boundary binds only the four campaign-owned external slots:
|
||||
|
||||
```text
|
||||
|
||||
@@ -11,6 +11,10 @@ prompt, profile, backend, and private configuration resolution. The
|
||||
and [subprocess contract](https://forge.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/integrations/subprocess.md)
|
||||
own the native interface and deployment migration.
|
||||
|
||||
Configured glossary inputs use explicit prepared `narratio.input.glossary.*`
|
||||
source IDs while prompt input names remain independently configured bindings.
|
||||
See [glossary inputs](../config.md#glossary-inputs).
|
||||
|
||||
Generation selects artifact-only text output. Preview and requirements use
|
||||
native JSON. Narratio forwards selected configuration and profile identifiers,
|
||||
sorted repeated `--input-file NAME=PATH` bindings where files are needed, and
|
||||
|
||||
@@ -61,10 +61,10 @@ state without constructing or invoking stage-execution adapters. The shared
|
||||
command configuration loader may still use object storage to retrieve a missing
|
||||
remote session file before planning begins.
|
||||
|
||||
Before a run starts stage attempts, the application projects selected work and
|
||||
uses the invocation's Scriptorium runner for any needed requirements checks.
|
||||
The same runner is then available to generation. Explicit session validation
|
||||
uses an invocation-owned factory and the shared checker. See
|
||||
After preparation, the application projects remaining selected work and uses
|
||||
invocation-owned Audita and Scriptorium runners for applicable readiness checks.
|
||||
The same runners are available to processing. Explicit session validation uses
|
||||
existing prepared inputs and invocation-owned factories. See
|
||||
[preflight internals](preflight.md).
|
||||
|
||||
Notarius is composed only when extraction is enabled; the extract stage owns
|
||||
|
||||
@@ -37,8 +37,9 @@ from `pipeline.notarius.outputs`; the Notarius index has no selectable source
|
||||
ID.
|
||||
|
||||
Prepared stable source IDs are `narratio.input.players`,
|
||||
`narratio.input.party`, `narratio.input.glossary`, and
|
||||
`narratio.input.spell_catalog`. Artifact policy owns their canonical manifest
|
||||
`narratio.input.party`, `narratio.input.glossary.party`,
|
||||
`narratio.input.glossary.campaign`, `narratio.input.glossary.setting`,
|
||||
`narratio.input.glossary.spells`, and `narratio.input.spell_catalog`. Artifact policy owns their canonical manifest
|
||||
kind and prepared filename vocabulary. Canonical party mode preserves the
|
||||
party source bytes in the party record and supplies the players record from the
|
||||
deterministic `derived_from_party` projection; both remain ordinary prepared
|
||||
|
||||
@@ -37,8 +37,8 @@ Restore planner action kinds:
|
||||
|
||||
Planner behavior:
|
||||
|
||||
- prepared campaign, session, and party inputs are restored from their declared
|
||||
immutable run objects to their canonical local input paths;
|
||||
- prepared campaign, session, party, and all four glossary inputs are restored
|
||||
from declared immutable run objects to their canonical local input paths;
|
||||
- a new-protocol restore uses only the selected commit's declared artifact set;
|
||||
each action carries that artifact's immutable key, checksum, size, and
|
||||
generation;
|
||||
|
||||
@@ -61,6 +61,15 @@ redaction and credential reference metadata. Load failures retain native errors
|
||||
and source evidence; domain commands use `ckconfig.AdaptDiagnostics` for their
|
||||
presentation without rewriting diagnostic records.
|
||||
|
||||
## Glossary Derivation
|
||||
|
||||
`internal/config` adapts resolved selections and canonical party context to
|
||||
`internal/glossary`. That owner loads native vocabulary, validates the pinned
|
||||
schema, projects the roster, and serializes four deterministic documents.
|
||||
Preparation and resume comparison share this resolver. Derived vocabulary does
|
||||
not replace the authored ConfigKit results used by native inspection. Catalog
|
||||
entry imports use the source file's native relative context.
|
||||
|
||||
## Canonical Party And Derived Catalog
|
||||
|
||||
File-backed party loading supports imports; contextless `ParseParty` accepts
|
||||
@@ -86,7 +95,7 @@ External roster shape belongs in the [party contract](../integrations/party.md).
|
||||
|
||||
## Safe Persistence And Semantic Resume
|
||||
|
||||
Preparation materializes standalone campaign/session/party/players inputs and
|
||||
Preparation materializes standalone campaign/session/party/players and four glossary inputs and
|
||||
a secret-safe pipeline projection. The projection preserves credential names,
|
||||
family declarations, numeric values, and null/empty distinctions. It is a
|
||||
persistence service, not a fabricated native result. An effective digest is
|
||||
|
||||
@@ -374,3 +374,12 @@ where the last session transition can require operator interpretation.
|
||||
- Package tests: `internal/manifest/*_test.go`
|
||||
- Assembled execution behavior: `internal/app/runner_test.go`,
|
||||
`internal/app/run_selection_test.go`
|
||||
|
||||
## Prepared Glossary Evidence
|
||||
|
||||
Preparation records four distinct glossary input kinds with canonical paths,
|
||||
checksums, sizes, and provenance. Polish records the resolved glossary identity
|
||||
evidence used for its result; preflight itself records no stage success. Publish
|
||||
and restore carry the prepared inputs using their declared manifest identities.
|
||||
See [prepare](stage-prepare.md), [polish](stage-polish.md), and
|
||||
[artifact internals](artifacts.md).
|
||||
|
||||
@@ -28,10 +28,9 @@ progress and artifact services resolve durable inputs and outputs.
|
||||
|
||||
The pipeline runner follows one explicit invocation lifecycle: inspect bounded
|
||||
prerequisites without mutation, prepare the workspace layout, acquire one
|
||||
session lock, load or create the authoritative session manifest, check projected
|
||||
Scriptorium work, compose only
|
||||
the collaborators needed by the selected range, execute each selected stage in
|
||||
order, finalize terminal state, release resources, and return a possibly partial
|
||||
session lock, load or create the authoritative session manifest, complete or
|
||||
reuse selected preparation, check projected downstream work, compose only the
|
||||
collaborators needed by selected work, execute each selected stage in order, finalize terminal state, release resources, and return a possibly partial
|
||||
summary with preserved failure causes. Narrow terminal local persistence detaches
|
||||
cancellation; active work retains the canceled operation context. Cleanup, when
|
||||
selected, is the ordinary final stage rather than runner finalization work.
|
||||
@@ -46,7 +45,8 @@ failed stage or required manifest save prevents later stages from starting.
|
||||
| Application orchestration | `internal/app` | Native CommandKit declarations/reporting, lazy configuration selection, secret-file environment loading, production composition, session locking, planning, execution, restore, and user-facing reporting. |
|
||||
| Configuration | [`internal/config`](configuration.md) | Typed ConfigKit results and lifecycle defaults, imports/overlays, canonical party loading, separate catalog/player/publication derivation, session templating, and validation. |
|
||||
| Pipeline stages | `internal/stage` | Canonical stage registry, shared stage contract, execution dependencies, and implemented stage behavior. |
|
||||
| Prompt preflight | [`internal/preflight`](preflight.md) | Assess native prompt requirements against intended bindings for execution and validation. |
|
||||
| Glossaries | `internal/glossary` | Native vocabulary resolution, schema validation, party projection, and deterministic documents. |
|
||||
| Downstream preflight | [`internal/preflight`](preflight.md) | Assess Audita readiness and native prompt requirements for execution and validation. |
|
||||
| External boundaries | `internal/adapters`, `internal/audio` | WhisperX HTTP, downstream subprocesses, notification, object storage, and S3 audio materialization behind Narratio contracts. |
|
||||
| Manifests | `internal/manifest` | Durable session progress, stage transitions, validation, and atomic persistence. |
|
||||
| Artifacts and paths | `internal/artifacts`, `internal/pathsafe` | Artifact identities and resolution, local and remote path/key models, current-state discovery, and confined relative destinations. |
|
||||
|
||||
@@ -1,37 +1,33 @@
|
||||
# Internal: Prompt Requirements Preflight
|
||||
# Internal: Downstream Preflight
|
||||
|
||||
The application selects intended Scriptorium requests after acquiring final
|
||||
domain configuration. For execution, it projects the bounded plan against a
|
||||
clone of the locked manifest using the same stage decisions and analysis work
|
||||
planner as `session plan`. Enabled trim is inspected when projected to run;
|
||||
analysis targets come from the projected execution order, including scheduled
|
||||
disabled prerequisites and excluding reusable work. The projection is not an
|
||||
execution commitment: earlier outputs can change later decisions.
|
||||
The application performs downstream checks after selected preparation completes
|
||||
or is reused and before remaining selected processing. It projects remaining
|
||||
work against a clone of the locked manifest using the same stage decisions and
|
||||
analysis planner as `session plan`. Projected polish selects Audita; projected
|
||||
enabled trim and analysis select Scriptorium requirements. A projection is not
|
||||
an execution commitment. Empty target sets invoke no checker.
|
||||
|
||||
For `session validate`, the application selects enabled definitions and their
|
||||
configured prerequisite closure independently of output reuse. Both entry
|
||||
points construct effective contexts through stage-owned helpers and call
|
||||
`internal/preflight`. Input-map keys remain prompt binding names, distinct from
|
||||
Narratio source IDs. No artifact is materialized or fetched for this check.
|
||||
Audita receives the verified four prepared glossary files and the same
|
||||
processing selectors and destinations, with an embedded synthetic transcript.
|
||||
The adapter runs native preflight with provider smoke enabled, captures its
|
||||
transient diagnostics, and preserves exit classification. No preflight result
|
||||
is cached as a stage. A failure stops later processing without presenting it as
|
||||
complete.
|
||||
|
||||
The checker invokes the adapter sequentially and assesses native structured
|
||||
findings. Definite missing required bindings and unsupplied required variables
|
||||
are errors. An optional source for a required prompt input, conditional
|
||||
requirements, incomplete discovery, and discovery issues produce warnings.
|
||||
It retains earlier findings and underlying inspection errors, and stops on
|
||||
cancellation. The application formats findings for its invocation reporter or
|
||||
validation report; the checker does not mutate manifests or acquire config.
|
||||
For `session validate`, the application selects enabled downstream definitions
|
||||
independently of reuse and checks the existing prepared manifest. It does not
|
||||
resolve live files into candidate glossary projections or run prepare. The
|
||||
Audita probe under `runs/.validation` can create or probe directories and contact
|
||||
providers; it does not update the session manifest. Discovery and provider
|
||||
checks do not establish real-transcript feasibility or editorial quality.
|
||||
|
||||
The run hook executes before stage attempts or live pre-execution invalidation.
|
||||
It reuses an injected Scriptorium runner or creates the invocation-owned runner
|
||||
that generation later uses. Empty target sets invoke no inspector. Validation
|
||||
uses its own invocation-owned factory and creates no execution workspace,
|
||||
run directory, lock, report file, or manifest update. Discovery can read
|
||||
Scriptorium configuration and resources, but does not call a model or establish
|
||||
future input contents. Actual execution and input resolution remain authoritative.
|
||||
Scriptorium input-map keys remain binding names distinct from Narratio source
|
||||
IDs. Missing required bindings or variables and inspection failures are errors;
|
||||
optional sources for required inputs, conditional requirements, incomplete
|
||||
discovery, and discovery issues produce warnings. The checker preserves earlier
|
||||
findings and stops on cancellation. Actual input resolution remains authoritative.
|
||||
|
||||
See the [Scriptorium contract](../integrations/scriptorium.md),
|
||||
See [Audita](../integrations/audita.md), [Scriptorium](../integrations/scriptorium.md),
|
||||
[CLI](../cli.md#session-validate), and [operations](../operations.md#prompt-requirements-preflight).
|
||||
Implementation and focused tests are in `internal/preflight`,
|
||||
`internal/app/preflight_targets.go`, `internal/app/runner_preflight.go`,
|
||||
`internal/app/session_inspection_command.go`, and `internal/stage/scriptorium_vars.go`.
|
||||
Implementation and tests are in `internal/preflight`, `internal/app/runner_preflight.go`,
|
||||
`internal/app/session_inspection_command.go`, and `internal/adapters/audita/preflight.go`.
|
||||
|
||||
@@ -20,7 +20,7 @@ dependency order, and safely materialize validated outputs.
|
||||
Supported source families:
|
||||
- built-ins: `narratio.transcript.*`, `narratio.bounds.session`
|
||||
- prepared stable inputs: `narratio.input.players`, `narratio.input.party`,
|
||||
`narratio.input.glossary`, `narratio.input.spell_catalog`
|
||||
`narratio.input.glossary.{party,campaign,setting,spells}`, `narratio.input.spell_catalog`
|
||||
- configured artifacts: `narratio.artifact.<key>`
|
||||
- extraction lanes: `narratio.extraction.<key>`
|
||||
- previous-session cache: `narratio.previous_session.artifact.<key>`
|
||||
|
||||
@@ -1,58 +1,23 @@
|
||||
# Stage: polish
|
||||
|
||||
## Purpose
|
||||
Polish resolves the base transcript from verified merge evidence and all four
|
||||
prepared glossary documents from manifest-backed input records. It invokes the
|
||||
Audita adapter with those paths and configured downstream selectors, then
|
||||
validates the returned transcript before promoting `transcripts/polished.json`.
|
||||
The transcript is the only canonical output. Available ordinary reports,
|
||||
stdout/stderr, and the generated invocation record are run-local diagnostics;
|
||||
Audita's work directory is separately selected. The [Audita contract](../integrations/audita.md)
|
||||
owns invocation and diagnostic behavior.
|
||||
|
||||
Run Audita polishing on base transcript and produce polished transcript.
|
||||
Polish records the prepared glossary identities as resume evidence alongside
|
||||
semantic configuration. Changes to effective glossary content require new
|
||||
polish work through ordinary prepare invalidation. Credentials, executable,
|
||||
timeout, and diagnostics are operational. Narratio does not fingerprint the
|
||||
contents of Audita-owned configuration or profiles: force polish after changing
|
||||
those files behind unchanged selectors. Older evidence is reconsidered when
|
||||
polish is selected; a downstream-only invocation does not eagerly run it.
|
||||
|
||||
## Inputs
|
||||
|
||||
- `transcripts/base.json`
|
||||
- `inputs/glossary.yml`
|
||||
|
||||
## Outputs
|
||||
|
||||
- `transcripts/polished.json`
|
||||
|
||||
The transcript is the only canonical output. Available `errors.yml`,
|
||||
`recoveries.yml`, and `report.md` remain beside the run-local transcript and
|
||||
are recorded as diagnostics, not artifact outputs.
|
||||
|
||||
## Key Behavior
|
||||
|
||||
- resolves base transcript only from verified merge manifest output evidence.
|
||||
- invokes an Audita v2 runner with external configuration selectors and
|
||||
explicitly forwarded provider credentials; the invocation supplies paths.
|
||||
- validates processed transcript structure (`segments` array required).
|
||||
- validates reported diagnostic paths against the three fixed adjacent names.
|
||||
- materializes only the canonical transcript; records available reports with
|
||||
stdout/stderr logs, generated invocation, and safe adapter metadata.
|
||||
|
||||
## Invariants
|
||||
|
||||
- polished transcript schema validation is mandatory.
|
||||
- reports are optional diagnostics; Audita's external configuration may disable
|
||||
them. A failed invocation never promotes an incidental transcript.
|
||||
|
||||
## Resume Semantics
|
||||
|
||||
Version 2 semantic evidence covers Audita's config path, downstream overlay,
|
||||
proposal and validation profile selectors, ordered module selection (including
|
||||
the distinction between omission and an explicit empty list), transcript
|
||||
description, output schema, and canonical polished-transcript identity.
|
||||
Credentials, executable path, timeout, and diagnostics are operational and do
|
||||
not invalidate a successful result. Public credential reference names may
|
||||
participate in configuration provenance but never expose resolved values.
|
||||
|
||||
Narratio fingerprints selections, not the contents of Audita-owned config or
|
||||
profiles. Force `polish` after changing those files behind unchanged selections.
|
||||
When polish is selected, older semantic evidence is reconsidered and the stage
|
||||
reruns; a downstream-only invocation does not eagerly run polish.
|
||||
|
||||
## Related Contracts And Tests
|
||||
|
||||
- [Audita](../integrations/audita.md) owns subprocess, validation, and failure
|
||||
semantics.
|
||||
- [Configuration](../config.md#pipeline) owns operator-selected Audita values.
|
||||
- Implementation and tests: `internal/stage/polish.go`,
|
||||
`internal/stage/polish_test.go`,
|
||||
`internal/stage/semantic_contracts_refinement.go`
|
||||
A failed invocation does not promote an incidental output. Preflight is an
|
||||
invocation check after preparation, not a successful polish record. See
|
||||
[preflight internals](preflight.md), `internal/stage/polish.go`,
|
||||
`internal/stage/polish_resume.go`, and their focused tests.
|
||||
|
||||
@@ -7,7 +7,7 @@ Materialize canonical current-session inputs before processing stages.
|
||||
## Inputs
|
||||
|
||||
- resolved campaign, session, and pipeline configuration
|
||||
- stable input files (`speakers`, `autocorrect`, `glossary`, `players`, `party`)
|
||||
- stable speakers and autocorrect inputs, the canonical party, and optional glossary selections
|
||||
- optional spell-catalog overlay
|
||||
- one resolved local or S3 audio source
|
||||
- enabled configured artifact input requirements for previous-session sources
|
||||
@@ -19,7 +19,7 @@ Materialize canonical current-session inputs before processing stages.
|
||||
- `inputs/pipeline.resolved.yml`
|
||||
- `inputs/speakers.yml`
|
||||
- `inputs/autocorrect.yml`
|
||||
- `inputs/glossary.yml`
|
||||
- `inputs/glossaries/{party,campaign,setting,spells}.yml`
|
||||
- `inputs/players.yml`
|
||||
- `inputs/party.yml`
|
||||
- optional `inputs/spell_catalog.json`
|
||||
@@ -30,7 +30,9 @@ Materialize canonical current-session inputs before processing stages.
|
||||
|
||||
## Key Behavior
|
||||
|
||||
- validates required config/store state.
|
||||
- validates required config/store state and resolves selected vocabulary before audio work.
|
||||
- derives the party glossary and resolves the remaining named collections through
|
||||
`internal/glossary`; writes all four with checksum, size, and provenance.
|
||||
- enforces local audio vs S3 audio mutual exclusivity.
|
||||
- rejects duplicate explicit local audio sources after resolution.
|
||||
- gives distinct local source paths with the same basename deterministic unique
|
||||
@@ -76,8 +78,8 @@ canonical names, and effective bytes are equivalent.
|
||||
The fingerprint deliberately does not read or rehash large audio. Prepared
|
||||
input checksums remain the content provenance. Before reusing success, prepare
|
||||
validates every durable prepared copy and compares current stable-input bytes,
|
||||
effective campaign/session, canonical party and derived-player bytes, local audio
|
||||
membership/checksums, or S3 key/size/entity-tag identity with that provenance.
|
||||
effective campaign/session, canonical party, derived-player and resolved glossary
|
||||
bytes, local audio membership/checksums, or S3 key/size/entity-tag identity with that provenance.
|
||||
Source relocation with equivalent effective documents, names, and bytes remains
|
||||
reusable; changed or unavailable evidence causes a normal prepare rerun.
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ supports remote loading when no authored session override is available. The
|
||||
canonical file, aggregate output, stale/failed/unselected record, or
|
||||
mismatched path, size, or checksum remains unavailable. Built-in and
|
||||
extraction sources likewise require their own current manifest evidence.
|
||||
- includes the four manifest-backed prepared glossary documents with their
|
||||
declared input identities for restore;
|
||||
- publishes extraction lanes only through explicit configured output rules;
|
||||
neither run-local nor durable Notarius bundles are scanned or uploaded wholesale.
|
||||
- selected artifact filter applies to configured artifact sources only.
|
||||
|
||||
@@ -32,6 +32,9 @@ materialized into canonical session paths before stage success. Managed
|
||||
previous-session cache paths remain session-durable and are never redirected
|
||||
into run-local output space.
|
||||
|
||||
Polish uses run-local transcript, report/log, and debug destinations; validation
|
||||
probes use `runs/.validation`. These are not latest-attempt views.
|
||||
|
||||
Extraction uses run-local receipt, stderr, and output-root helpers, then
|
||||
validates and renames the external bundle to the unique immutable Notarius
|
||||
bundle path supplied by `internal/artifacts`. Exact physical paths belong in
|
||||
|
||||
@@ -32,19 +32,19 @@ narratio session init 2026-04-04 --remote --force
|
||||
|
||||
If `campaign.yml` sets `session_template_file`, `session init` renders it. Template variables must resolve to concrete values.
|
||||
|
||||
Campaigns must provide stable input files for speakers, autocorrect, glossary,
|
||||
players, and party, and may provide an optional spell-catalog overlay. Session
|
||||
files may override those paths for one session. The `prepare` stage
|
||||
materializes them under `inputs/`; configured consumers use the prepared files,
|
||||
never the original campaign or session source paths. Field definitions and
|
||||
source IDs are in [Configuration](./config.md#notarius-reference-bindings).
|
||||
Campaigns provide speakers, autocorrect, and a canonical party; players are
|
||||
derived from that roster. Glossary selections and the separate spell-catalog
|
||||
overlay are optional. Preparation writes the shared glossary documents and
|
||||
other stable inputs under `inputs/`; consumers use verified prepared files.
|
||||
See [glossary inputs](config.md#glossary-inputs) for selections and sources.
|
||||
|
||||
## Standard Session Workflow
|
||||
|
||||
1. Select pipeline/campaign/session config.
|
||||
2. Validate session readiness:
|
||||
2. Prepare inputs, then validate session readiness:
|
||||
|
||||
```bash
|
||||
narratio run 2026-04-04 --stage prepare
|
||||
narratio session validate 2026-04-04
|
||||
```
|
||||
|
||||
@@ -82,22 +82,21 @@ comparison details.
|
||||
|
||||
### Prompt requirements preflight
|
||||
|
||||
Install Scriptorium v0.16.0 and migrate its configuration and prompt definitions
|
||||
using the [upstream migration guide](https://forge.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/consumers/upgrading-cli.md).
|
||||
It must be available before a run whose projected work needs trim or analysis,
|
||||
and for validation of enabled definitions. Narratio checks requirements before
|
||||
stage attempts, even when generated transcripts do not yet exist. The check
|
||||
makes no model call and cannot certify later file contents or generation.
|
||||
After selected preparation completes or is reused, Narratio checks downstream
|
||||
work projected to run before processing continues. Audita preflight uses the
|
||||
prepared glossary files, a synthetic transcript, and the selected Audita
|
||||
configuration; its native provider smoke checks are enabled. Scriptorium
|
||||
requirements discovery checks projected trim and analysis bindings. A missing
|
||||
required binding or failed check stops the invocation; incomplete or conditional
|
||||
prompt discovery can produce warnings. Already completed work remains recorded.
|
||||
`session plan` does not invoke these downstream checks.
|
||||
|
||||
A missing required prompt binding or variable, or a failed inspection, stops
|
||||
the invocation. Correct the configuration or downstream installation and retry.
|
||||
An optional source for a required prompt input and incomplete or conditional
|
||||
discovery are warnings; later input resolution remains authoritative. Early
|
||||
preflight failure leaves completed stage records and artifact outputs intact,
|
||||
including during a forced run. `session plan` reports projected work without
|
||||
invoking Scriptorium. See the [integration contract](integrations/scriptorium.md)
|
||||
for stream handling and [configuration](config.md#scriptorium-artifact-entries)
|
||||
for binding names and sources.
|
||||
`session validate` checks enabled downstream definitions against existing
|
||||
prepared glossary records. It does not prepare inputs. Its Audita probe uses a
|
||||
`runs/.validation` destination namespace, may create or probe directories and
|
||||
may contact configured providers. The synthetic check establishes readiness for
|
||||
that probe, not feasibility for a real transcript or editorial quality. See
|
||||
[Audita](integrations/audita.md) and [Scriptorium](integrations/scriptorium.md).
|
||||
|
||||
## Stage Execution and Continuation Behavior
|
||||
|
||||
@@ -138,8 +137,8 @@ its fixed descendants without requiring `--force`. Changing prepare selection
|
||||
semantics likewise reruns all fixed descendants; changing
|
||||
WhisperX language/service identity reuses prepare; changing a Seriatim merge
|
||||
transformation reuses prepare and transcribe; and changing a selected Audita
|
||||
overlay, profile, or module sequence reuses prepare, transcribe, and merge while
|
||||
rebuilding transcript refinement. A trim change invalidates both render and
|
||||
overlay or profile reuses prepare, transcribe, and merge while rebuilding
|
||||
transcript refinement. A trim change invalidates both render and
|
||||
extract through the fixed dependency relation, while a render-only change
|
||||
preserves the extract sibling.
|
||||
|
||||
@@ -317,26 +316,12 @@ Select the Narratio file with `--overlay testing` on the desired command. Each
|
||||
downstream selector is used only when its stage actually executes: `polish` for
|
||||
Audita and `extract` for Notarius. Production can omit both selectors.
|
||||
|
||||
For Audita debug inspection, its testing overlay can include:
|
||||
|
||||
```yaml
|
||||
diagnostics:
|
||||
debug: true
|
||||
work_dir: /path/to/audita-debug
|
||||
```
|
||||
|
||||
Audita retains detailed artifacts under that directory. Inspect them there;
|
||||
Narratio does not collect or manage them. Ordinary Audita reports remain a
|
||||
separate existing integration. Leave debug disabled in Audita's production
|
||||
configuration unless deliberately needed.
|
||||
|
||||
Notarius's debug controls are different: `debug.directory` selects a location
|
||||
but does not enable capture. Capture requires its `--debug` flag, which Narratio
|
||||
does not currently forward. Selecting a Notarius testing overlay therefore does
|
||||
not by itself enable a debug bundle. See the upstream
|
||||
[Audita configuration](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.1/docs/config.md)
|
||||
and [Notarius CLI](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/cli.md)
|
||||
for their respective controls.
|
||||
Audita's selected configuration controls whether detailed debug capture is
|
||||
requested. Narratio supplies the run-local `polish/debug` work destination and
|
||||
the separate `polish/logs` report destination. Notarius's debug directory does
|
||||
not enable capture; its `--debug` flag is not currently forwarded by Narratio.
|
||||
See the upstream [Audita configuration](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/config.md)
|
||||
and [Notarius CLI](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/cli.md).
|
||||
|
||||
Edits inside downstream configuration behind an unchanged selector are not
|
||||
automatically detected by Narratio. To inspect a fresh Audita debug run, explicitly
|
||||
@@ -413,8 +398,8 @@ are not selectable or published implicitly.
|
||||
|
||||
Configured Notarius references resolve only from the current manifest-backed
|
||||
prepared inputs. Their canonical locations are `inputs/party.yml`,
|
||||
`inputs/players.yml`, `inputs/glossary.yml`, and, when configured,
|
||||
`inputs/spell_catalog.json`. Extraction supplies Notarius with verified,
|
||||
`inputs/players.yml`, the four `inputs/glossaries/{party,campaign,setting,spells}.yml`
|
||||
files, and, when configured, `inputs/spell_catalog.json`. Extraction supplies Notarius with verified,
|
||||
content-addressed copies under
|
||||
`cache/notarius/references/<sha256>/<prepared-basename>`. The full lowercase
|
||||
SHA-256 digest identifies the reference bytes, so retries and later invocations
|
||||
@@ -504,55 +489,30 @@ by migration of the restored local manifest before using the new version.
|
||||
|
||||
## Migrating Audita and Provider Credentials
|
||||
|
||||
This is a breaking clean cutover to Audita v2. Narratio does not translate an
|
||||
Audita v1 configuration, retain old field aliases, or generate a downstream
|
||||
configuration. Update both the deployed Audita executable/configuration and
|
||||
the Narratio pipeline before running polish. Retired Narratio fields are
|
||||
rejected by strict configuration loading; account for this break when choosing
|
||||
a release version.
|
||||
Install Audita v4.2 and its own configuration and selected pipeline before
|
||||
running polish. Move ordered processing configuration into Audita; remove the
|
||||
retired Narratio `pipeline.audita.modules` field. Update every old
|
||||
`narratio.input.glossary` binding to the intended explicit glossary source and
|
||||
rewrite legacy glossary files into the named-collection format. Narratio does
|
||||
not translate these settings or files. Install a catalog separately when using
|
||||
setting or system selections; see [glossary inputs](config.md#glossary-inputs).
|
||||
|
||||
| Previous Narratio setting | New ownership and selection |
|
||||
| --- | --- |
|
||||
| `audita.base_url` | Audita v2 `backends.<id>.endpoint` |
|
||||
| `audita.total_llm_concurrency`, `proposal_llm_concurrency`, `validation_llm_concurrency` | Audita v2 `backends.<id>.concurrency` and optional `queue_capacity`; backend capacity is shared across roles |
|
||||
| `audita.model`, `validation_model` | Audita PromptKit profile files; optionally select them from Narratio with `audita.proposal_profile` and `validation_profile` |
|
||||
| `audita.llm_api_key` | `audita.credentials: [PROVIDER_KEY_NAME]`, matching each Audita backend's `credential` name |
|
||||
| `notarius.llm_api_key` | `notarius.credentials: [PROVIDER_KEY_NAME]`, matching references in Notarius-owned profiles |
|
||||
| `audita.work_dir_retention`, `report` | Remove; Audita's external configuration owns diagnostics and reporting |
|
||||
List each downstream provider's exact environment-variable name in
|
||||
`audita.credentials`; Narratio passes resolved values to Audita and does not
|
||||
infer names or generate the downstream configuration. `audita.config_path`
|
||||
and `audita.overlay` select Audita's configuration independently of Narratio's
|
||||
overlay. Consult [Audita's configuration guide](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/config.md).
|
||||
Operators can install the independently maintained [D&D recipes](https://forge.maximumdirect.net/eric/audita-pipelines-dnd/src/commit/6d5e66dcfca4bb5971a8423332a19ce884b846c0/README.md)
|
||||
and select their production or testing overlays explicitly; Narratio does not
|
||||
bundle those recipes or infer a downstream selection.
|
||||
|
||||
An Audita configuration can also be selected through `audita.config_path`,
|
||||
and `audita.overlay` selects an Audita overlay independently of Narratio's
|
||||
`--overlay`. Narratio forwards no implicit provider key: a single provider-named
|
||||
secret source may be listed for both adapters, and an Audita-only backend key
|
||||
may be listed only for Audita. Audita resolves credentials for all configured
|
||||
backends, including those not currently selected. Notarius looks up its own
|
||||
profiles; Narratio does not discover their credential names. Credential lists
|
||||
may be cleared with `[]` in a Narratio overlay.
|
||||
|
||||
Prepare the external file from Audita's maintained
|
||||
[local example](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/examples/minimal-config.yml),
|
||||
[service example](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/examples/production-config.yml),
|
||||
and [v2 migration guide](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/docs/migrations/v2.md).
|
||||
Before switching the executable, validate the file offline:
|
||||
|
||||
```bash
|
||||
audita config validate --config /usr/local/etc/audita/config.yml
|
||||
```
|
||||
|
||||
Use `audita config print-effective --config /usr/local/etc/audita/config.yml --view profiles`
|
||||
to inspect downstream profile selection without contacting a provider. For a
|
||||
production Audita configuration, leave ordinary reports enabled
|
||||
and debug disabled unless an operator deliberately chooses otherwise; Narratio
|
||||
does not override those settings. Audita writes `errors.yml`, `recoveries.yml`,
|
||||
and `report.md` beside the polished output when reporting is enabled. An
|
||||
exit-zero run with a valid transcript succeeds even if those reports describe
|
||||
recoverable errors or no applied corrections. See the [Audita integration
|
||||
contract](./integrations/audita.md) for report placement and limits.
|
||||
|
||||
Narratio's polish resume evidence tracks selected config path, Audita overlay,
|
||||
profiles, ordered modules, description, schema, and output identity. Editing
|
||||
Audita-owned files behind unchanged selectors is invisible to Narratio; force
|
||||
polish with `narratio run <session-id> --stage polish --force` after such edits.
|
||||
Preparation compares effective vocabulary and prepared evidence when deciding
|
||||
reuse. If it changes, normal preparation invalidation applies; use
|
||||
`narratio run <session-id> --stage prepare --force` when regeneration is needed.
|
||||
Polish tracks its selected configuration and prepared glossary evidence, but
|
||||
does not inspect the contents of Audita-owned files. Force polish after changing
|
||||
those files behind unchanged selectors. Reports and debug destinations are
|
||||
run-local; see the [Audita integration contract](integrations/audita.md).
|
||||
|
||||
## External Command Lifecycle
|
||||
|
||||
@@ -572,9 +532,8 @@ separately without redaction; see its [integration contract](integrations/script
|
||||
|
||||
Run-local diagnostics are:
|
||||
|
||||
- `runs/{run_id}/polish/outputs/transcripts/errors.yml`,
|
||||
`recoveries.yml`, and `report.md` when Audita writes them beside its
|
||||
run-local polished transcript
|
||||
- `runs/{run_id}/polish/logs/{errors.yml,recoveries.yml,report.md}` when
|
||||
Audita reporting is enabled, alongside captured streams and invocation records
|
||||
- `runs/{run_id}/extract/notarius.receipt.json`
|
||||
- `runs/{run_id}/extract/notarius.stderr.log`
|
||||
- `runs/{run_id}/extract/notarius-output/` before durable promotion
|
||||
@@ -589,7 +548,7 @@ current-run diagnostics uploads no run-local files. No distinguished diagnostic
|
||||
file is uploaded. The durable bundle is never scanned for implicit publication;
|
||||
only lanes named by explicit `pipeline.publish.outputs` rules are uploaded.
|
||||
To inspect a published polish report remotely, read its declared object under
|
||||
the run archive's `polish/outputs/transcripts/` prefix. Session restore does
|
||||
the run archive's `polish/logs/` prefix. Session restore does
|
||||
not restore run-archive diagnostics as canonical session files; it restores only
|
||||
the committed manifest and declared transcript/artifact objects.
|
||||
|
||||
@@ -796,6 +755,8 @@ Run-local layout:
|
||||
- `runs/{run_id}/{stage}/reports`
|
||||
- `runs/{run_id}/{stage}/config`
|
||||
- `runs/{run_id}/{stage}/scratch`
|
||||
- `runs/{run_id}/polish/debug` for Audita's selected work destination
|
||||
- `runs/.validation/polish` for validation probes
|
||||
|
||||
Spool layout (runtime/transient):
|
||||
|
||||
|
||||
@@ -127,6 +127,11 @@ according to a fixed application-owned relation that is separate from canonical
|
||||
execution order. The relation is validated against the stage inventory and is
|
||||
not configurable.
|
||||
|
||||
Downstream readiness is an invocation check after selected preparation and
|
||||
before the selected processing work. It does not create a stage success.
|
||||
Session validation uses existing prepared inputs; its downstream checks may
|
||||
probe destinations and contact configured providers.
|
||||
|
||||
A stage may explicitly self-skip with a stable reason and no outputs. That
|
||||
outcome is persisted, clears older outputs owned by the stage, and is
|
||||
reconsidered on a later invocation. A stage may also validate whether an
|
||||
|
||||
@@ -643,7 +643,14 @@ the catalog README. Do not make real paid smoke calls a routine test gate.
|
||||
|
||||
## Stage 18. Update canonical documentation and migration guidance
|
||||
|
||||
Status: Pending
|
||||
Status: Complete
|
||||
|
||||
Updated public, integration, internal, and architecture guidance for the
|
||||
glossary cutover, downstream checks, diagnostics, migration, and restore.
|
||||
Updated the independent workspace roadmap's Audita capability baseline; the
|
||||
D&D README follow-up remains recorded in the feature roadmap. Documentation
|
||||
and maintained-example checks pass with `go test ./internal/doccheck
|
||||
./internal/config`.
|
||||
|
||||
Update `docs/config.md`, `cli.md`, `operations.md`, `troubleshooting.md`,
|
||||
`integrations/audita.md`, `integrations/notarius.md`, applicable Scriptorium/input
|
||||
|
||||
@@ -61,13 +61,14 @@ physical layout. Relevant differences from the target are:
|
||||
- Standard combined transcript paths already match the target. Layout creation
|
||||
also creates an unused `transcripts/trimmed/` directory.
|
||||
- Most subprocess diagnostics live under individual run directories. Root-level
|
||||
log paths lack a consistent latest-attempt view. Audita reports sit beside
|
||||
its staged transcript, and restore writes a separate top-level report.
|
||||
log paths lack a consistent latest-attempt view. Audita reports use the
|
||||
run-local polish log directory, and restore writes a separate top-level report.
|
||||
- Prepared previous-session inputs occupy `previous/`. Narratio-owned reference
|
||||
snapshots supplied to Notarius occupy session `cache/notarius/references/`.
|
||||
These snapshots are distinct from Notarius's own execution caches.
|
||||
- Audita debug placement follows downstream configuration. Narratio does not
|
||||
expose Notarius debug capture, and Scriptorium render-debug placement varies.
|
||||
- Audita's work destination is run-local; capture enablement remains downstream
|
||||
configuration. Narratio does not expose Notarius debug capture, and Scriptorium
|
||||
render-debug placement varies.
|
||||
- Narratio maintains separate S3 audio cache and spool paths in addition to the
|
||||
prepared session audio copy.
|
||||
|
||||
@@ -229,11 +230,9 @@ boundary of Narratio's captured-stream redaction.
|
||||
|
||||
### Audita destination support
|
||||
|
||||
Request upstream support for independently selecting the transcript output,
|
||||
ordinary report/log directory, and debug/retained working directory, then adopt
|
||||
a supporting release. Audita currently ignores `--report-dir` when transcript
|
||||
output is a file; honoring that destination is the principal missing capability.
|
||||
Narratio continues to capture subprocess stdout and stderr itself.
|
||||
Audita v4.2 supports independent transcript, report, and work destinations, and
|
||||
Narratio already selects run-local paths. Narratio captures subprocess stdout
|
||||
and stderr itself. This roadmap still owns latest-attempt views and retention.
|
||||
|
||||
Direct ordinary reports, including failure reports, to the actual polish log
|
||||
directory, the transcript to its staged product destination, and retained debug
|
||||
|
||||
@@ -346,7 +346,16 @@ for the command to proceed.
|
||||
Relevant references: [Secrets](./config.md#secrets-handling) and
|
||||
[Notarius credentials](./config.md#notarius-credentials).
|
||||
|
||||
## Audita v2 configuration or credential failure
|
||||
## Prepared glossary is unavailable or invalid
|
||||
|
||||
If validation or downstream work reports missing, changed, or invalid prepared
|
||||
glossary evidence, check the selected catalog IDs, source-relative files, and
|
||||
campaign inline contribution. Re-run `prepare` after correcting the source;
|
||||
use `--force` when an explicit refresh is needed. Update old monolithic source
|
||||
bindings and glossary files using the [glossary input guidance](config.md#glossary-inputs).
|
||||
Validation uses existing prepared inputs and does not regenerate them.
|
||||
|
||||
## Audita configuration or credential failure
|
||||
|
||||
Symptom:
|
||||
|
||||
@@ -360,15 +369,15 @@ Likely causes:
|
||||
report, or retention settings;
|
||||
- the named key is missing or empty, including a present but empty process
|
||||
environment variable preserved by the selected bootstrap policy;
|
||||
- Audita's external v2 file references a backend credential name not forwarded
|
||||
- Audita's external configuration references a backend credential name not forwarded
|
||||
by `pipeline.audita.credentials`, including a backend not selected by the
|
||||
current profile; or
|
||||
- an Audita overlay or profile selector names a missing downstream definition.
|
||||
|
||||
Safe fix:
|
||||
|
||||
- follow the [migration table](./operations.md#migrating-audita-and-provider-credentials)
|
||||
and use a supported Audita v2 executable and configuration;
|
||||
- follow the [migration guidance](./operations.md#migrating-audita-and-provider-credentials)
|
||||
and use an Audita v4.2 executable and configuration;
|
||||
- provide each needed provider-named variable through the environment or
|
||||
secrets directory, and list that same name in `pipeline.audita.credentials`;
|
||||
- validate the external file offline with
|
||||
@@ -744,7 +753,7 @@ manifest-owned.
|
||||
Relevant references: [Operations: Stage Execution and Continuation Behavior](./operations.md#stage-execution-and-continuation-behavior)
|
||||
and [Manifest Internals](./internal/manifest.md#transcribe-owned-speaker-state).
|
||||
|
||||
## Prompt requirements fail before pipeline work starts
|
||||
## Prompt requirements fail during preflight
|
||||
|
||||
If a run or `session validate` reports a missing prompt input, compare the exact
|
||||
input name in the finding with the configured binding key, not just the source
|
||||
|
||||
Reference in New Issue
Block a user