Compare commits
9 Commits
b3bc0457ef
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 155e05a17d | |||
| aa3673f902 | |||
| dd3746ea3b | |||
| afa8be3ee6 | |||
| c53076c12a | |||
| 73efbebb37 | |||
| 002e86c9de | |||
| d5563c5736 | |||
| 4d7609cd6f |
81
README.md
81
README.md
@@ -4,26 +4,57 @@ An Ansible collection for installing and configuring the D&D
|
|||||||
transcript-processing pipeline on Ubuntu 26.04. The assembled pipeline role is
|
transcript-processing pipeline on Ubuntu 26.04. The assembled pipeline role is
|
||||||
available as `rakestraw.dnd.pipeline` and supports Ansible Core 2.18 or newer.
|
available as `rakestraw.dnd.pipeline` and supports Ansible Core 2.18 or newer.
|
||||||
|
|
||||||
Release `0.1.0` contains the reviewed `rakestraw.dnd_pipeline` `v0.1.0`
|
Release `0.2.0` imports pipeline role `v0.2.0` at
|
||||||
snapshot and pins the Seriatim, Audita, Notarius, Scriptorium, and Narratio
|
`773b1fa80e0713bce94359143e35fec95303dfa6`, containing the reviewed native
|
||||||
roles to their respective `v0.1.0` releases.
|
suite and its immutable application-role tags. See the
|
||||||
|
[release notes](docs/releases/v0.2.0.md) for the compatibility set and migration
|
||||||
|
summary. The older `0.1.0` tag and artifact remain unchanged.
|
||||||
|
|
||||||
The current development snapshot integrates Narratio v3.0.0, Notarius v0.8.1,
|
| Application | Version |
|
||||||
Audita v2.0.1, and Scriptorium v0.15.0 through public standalone role pins.
|
| --- | --- |
|
||||||
It includes the suite's Audita backend/profile configuration and Narratio and
|
| Narratio | v4.0.0 |
|
||||||
Notarius testing overlays. This does not replace or modify the published
|
| Notarius | v0.10.0 |
|
||||||
`0.1.0` release artifact. Review the [pipeline role migration notes](roles/pipeline/README.md)
|
| Audita | v4.3.0 |
|
||||||
before upgrading inventory or application-owned manifests; this collection
|
| Scriptorium | v0.16.0 |
|
||||||
does not convert existing manifests. Seriatim remains v1.5.0.
|
| Seriatim | v1.5.0 |
|
||||||
|
|
||||||
## Install release 0.1.0
|
It uses native configuration imports and shared campaign/party/glossary formats,
|
||||||
|
with immutable compatible asset commits. Recap and character analysis default
|
||||||
|
to current-session-only prompts; previous-aware variants are explicit opt-ins.
|
||||||
|
Automatic cleanup defaults to false. Review the [pipeline migration and
|
||||||
|
configuration guidance](roles/pipeline/README.md) before upgrading inventory or
|
||||||
|
application-owned state, including credential delivery, testing overlays,
|
||||||
|
config-local prompt/catalog paths and the Narratio v4 manifest boundary.
|
||||||
|
|
||||||
|
The deployment consumer is updated separately; publishing this release does
|
||||||
|
not change its selected collection version or deploy an operational host.
|
||||||
|
|
||||||
|
## Install the current source snapshot
|
||||||
|
|
||||||
|
Use the same collection commit for both its compatibility manifest and source
|
||||||
|
installation. Replace `COLLECTION_COMMIT` with the selected published Git commit:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
collection_revision=COLLECTION_COMMIT
|
||||||
|
curl -fL -o requirements.yml \
|
||||||
|
"https://gitea.maximumdirect.net/eric/ansible-collection-dnd/raw/commit/$collection_revision/requirements.yml"
|
||||||
|
ansible-galaxy install -r requirements.yml
|
||||||
|
ansible-galaxy collection install \
|
||||||
|
"git+https://gitea.maximumdirect.net/eric/ansible-collection-dnd.git,$collection_revision" \
|
||||||
|
--no-deps --force
|
||||||
|
```
|
||||||
|
|
||||||
|
`--force` replaces an installed collection carrying the same development metadata
|
||||||
|
version. This installation selects a source commit; it does not create a release.
|
||||||
|
|
||||||
|
## Install release 0.2.0
|
||||||
|
|
||||||
Download the tagged compatibility manifest and install its exact standalone
|
Download the tagged compatibility manifest and install its exact standalone
|
||||||
role and collection dependencies:
|
role and collection dependencies:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fLO \
|
curl -fLO \
|
||||||
https://gitea.maximumdirect.net/eric/ansible-collection-dnd/raw/tag/v0.1.0/requirements.yml
|
https://gitea.maximumdirect.net/eric/ansible-collection-dnd/raw/tag/v0.2.0/requirements.yml
|
||||||
ansible-galaxy install -r requirements.yml
|
ansible-galaxy install -r requirements.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -32,7 +63,7 @@ a second time:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
ansible-galaxy collection install \
|
ansible-galaxy collection install \
|
||||||
https://gitea.maximumdirect.net/eric/ansible-collection-dnd/releases/download/v0.1.0/rakestraw-dnd-0.1.0.tar.gz \
|
https://gitea.maximumdirect.net/eric/ansible-collection-dnd/releases/download/v0.2.0/rakestraw-dnd-0.2.0.tar.gz \
|
||||||
--no-deps
|
--no-deps
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -45,7 +76,7 @@ installing `requirements.yml`:
|
|||||||
build_dir=$(mktemp -d)
|
build_dir=$(mktemp -d)
|
||||||
ansible-galaxy collection build --output-path "$build_dir"
|
ansible-galaxy collection build --output-path "$build_dir"
|
||||||
ansible-galaxy collection install \
|
ansible-galaxy collection install \
|
||||||
"$build_dir/rakestraw-dnd-0.1.0.tar.gz" --no-deps
|
"$build_dir/rakestraw-dnd-0.2.0.tar.gz" --no-deps
|
||||||
```
|
```
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
@@ -57,10 +88,11 @@ ansible-galaxy collection install \
|
|||||||
gather_facts: true
|
gather_facts: true
|
||||||
roles:
|
roles:
|
||||||
- role: rakestraw.dnd.pipeline
|
- role: rakestraw.dnd.pipeline
|
||||||
vars:
|
|
||||||
dnd_pipeline_whisperx_transcribe_url: https://whisperx.example/transcribe
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Set `dnd_pipeline_whisperx_transcribe_url` and any configuration overrides in
|
||||||
|
inventory `host_vars` or `group_vars`, following the pipeline role's guidance.
|
||||||
|
|
||||||
## Maintain the pipeline snapshot
|
## Maintain the pipeline snapshot
|
||||||
|
|
||||||
[`ansible-role-dnd-pipeline`](https://gitea.maximumdirect.net/eric/ansible-role-dnd-pipeline)
|
[`ansible-role-dnd-pipeline`](https://gitea.maximumdirect.net/eric/ansible-role-dnd-pipeline)
|
||||||
@@ -86,3 +118,20 @@ git subtree pull --prefix=roles/pipeline \
|
|||||||
https://gitea.maximumdirect.net/eric/ansible-role-dnd-pipeline.git \
|
https://gitea.maximumdirect.net/eric/ansible-role-dnd-pipeline.git \
|
||||||
"$pipeline_revision" --squash
|
"$pipeline_revision" --squash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Validate the assembled collection
|
||||||
|
|
||||||
|
`tests/integration` installs the public compatibility dependencies, builds and
|
||||||
|
installs the artifact in temporary controller paths, and applies
|
||||||
|
`rakestraw.dnd.pipeline` twice to the local Ubuntu test host. It requires a clean
|
||||||
|
repeat, checks package exclusions and production lint, and validates native
|
||||||
|
configuration, overlays, domain inspection and recap preparation without a
|
||||||
|
previous recap. It uses synthetic credentials and the selected public asset
|
||||||
|
origins; it does not perform live inference, storage operations or deployment to
|
||||||
|
an operational host. Application source-role coverage owns the broader scenario
|
||||||
|
matrix.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
bash -n tests/integration
|
||||||
|
tests/integration
|
||||||
|
```
|
||||||
|
|||||||
54
docs/releases/v0.2.0.md
Normal file
54
docs/releases/v0.2.0.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# rakestraw.dnd 0.2.0
|
||||||
|
|
||||||
|
This release packages the reviewed native D&D suite and explicit current-only
|
||||||
|
and previous-aware analysis prompts. It is an incompatible configuration and
|
||||||
|
session-state upgrade from the original 0.1.0 suite.
|
||||||
|
|
||||||
|
| Component | Ansible role tag | Application version |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Pipeline | v0.2.0 | Suite composition |
|
||||||
|
| Narratio | v0.2.0 | v4.0.0 |
|
||||||
|
| Audita | v0.2.0 | v4.3.0 |
|
||||||
|
| Notarius | v0.2.0 | v0.10.0 |
|
||||||
|
| Scriptorium | v0.2.0 | v0.16.0 |
|
||||||
|
| Seriatim | v0.1.0 | v1.5.0 |
|
||||||
|
|
||||||
|
Native collection dependencies remain ansible.posix 2.2.0 and
|
||||||
|
community.general 13.3.0. The public tagged requirements manifest owns the exact
|
||||||
|
installation selections. Pipeline v0.2.0 contains the reviewed 63f1dd4 behavior
|
||||||
|
with tag-pinned dependencies; application-role tags point to the previously
|
||||||
|
reviewed commits without application-code changes.
|
||||||
|
|
||||||
|
Campaign assets select native-v4 commit
|
||||||
|
`488c2eb97b5c62efe51aa7af35a5ec9cb8b7a747`; prompt assets select
|
||||||
|
`d15a630ddfec18ab505df3ea5b076f6a0a5fd4b3`. Legacy asset main branches remain
|
||||||
|
available for old consumers.
|
||||||
|
|
||||||
|
## Migration highlights
|
||||||
|
|
||||||
|
- Native application configuration imports replace retired interfaces. Prompts
|
||||||
|
live under `/usr/local/etc/scriptorium/prompt-library`; optional catalogs live
|
||||||
|
under `/usr/local/etc/narratio/reference-catalog` for native import containment.
|
||||||
|
- Narratio uses `/usr/local/etc/narratio/narratio.yml` and explicit credential
|
||||||
|
bootstrap. Keep real credentials in the operator's managed secret source.
|
||||||
|
- Shared campaign, party and glossary formats replace the earlier private forms.
|
||||||
|
- Recap and character analysis default to current-session-only prompts. Explicit
|
||||||
|
`_with_previous` variants require a previous recap. Testing overlays remain
|
||||||
|
independent of prompt selection.
|
||||||
|
- Automatic cleanup defaults to false. Narratio v4 requires session-manifest v2;
|
||||||
|
existing state is not converted by this collection. Preserve old work separately
|
||||||
|
and follow the upstream guidance linked by the pipeline role.
|
||||||
|
|
||||||
|
See [pipeline migration guidance](../../roles/pipeline/README.md) and
|
||||||
|
[release installation instructions](../../README.md#install-release-020).
|
||||||
|
The archive `rakestraw-dnd-0.2.0.tar.gz` is attached to the matching Gitea release.
|
||||||
|
Install the tagged requirements before the collection artifact: Galaxy collection
|
||||||
|
installation alone does not install the external Git-hosted Ansible roles.
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
|
||||||
|
The installed-artifact integration harness validates public dependencies, package
|
||||||
|
exclusions, FQCN loading, syntax and production lint, native base/testing
|
||||||
|
configuration, campaign/party inputs and recap preparation, and a clean repeat.
|
||||||
|
It uses synthetic credentials on the local Ubuntu test host, with no live
|
||||||
|
provider, S3 operation, operational deployment or old-session migration.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
namespace: rakestraw
|
namespace: rakestraw
|
||||||
name: dnd
|
name: dnd
|
||||||
version: 0.1.0
|
version: 0.2.0
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- Eric Rakestraw
|
- Eric Rakestraw
|
||||||
|
|||||||
@@ -7,19 +7,19 @@ roles:
|
|||||||
- name: rakestraw.audita
|
- name: rakestraw.audita
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-audita.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-audita.git
|
||||||
scm: git
|
scm: git
|
||||||
version: c3dd59f5ac9b942306ffe540ae9e71d493998137
|
version: v0.2.0
|
||||||
- name: rakestraw.notarius
|
- name: rakestraw.notarius
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-notarius.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-notarius.git
|
||||||
scm: git
|
scm: git
|
||||||
version: 6aef48b7e12e3651971444b8c224d96ff1879e6c
|
version: v0.2.0
|
||||||
- name: rakestraw.scriptorium
|
- name: rakestraw.scriptorium
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-scriptorium.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-scriptorium.git
|
||||||
scm: git
|
scm: git
|
||||||
version: b174c8c2990bb79f8149d8f288c5e06ccb42bd73
|
version: v0.2.0
|
||||||
- name: rakestraw.narratio
|
- name: rakestraw.narratio
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-narratio.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-narratio.git
|
||||||
scm: git
|
scm: git
|
||||||
version: 3c0700b5323293d44e3b1e67a50074d82d7a3bff
|
version: v0.2.0
|
||||||
collections:
|
collections:
|
||||||
- name: ansible.posix
|
- name: ansible.posix
|
||||||
version: 2.2.0
|
version: 2.2.0
|
||||||
|
|||||||
@@ -1,469 +1,145 @@
|
|||||||
# rakestraw.dnd_pipeline
|
# D&D pipeline Ansible role
|
||||||
|
|
||||||
Installs the D&D transcript-processing application suite by composing the
|
This standalone role composes Narratio v4.0.0, Audita v4.3.0, Notarius
|
||||||
standalone Seriatim, Audita, Notarius, Scriptorium, and Narratio roles. It
|
v0.10.0, Scriptorium v0.16.0 and Seriatim v1.5.0 for the D&D workflow. It
|
||||||
supports Ubuntu 26.04 and Ansible Core 2.18 or newer. Downstream roles perform
|
installs the applications from selected source revisions, configures their
|
||||||
their own task-level privilege escalation, so a play does not need `become`.
|
native interfaces, and deploys campaign and prompt assets. Gather facts and
|
||||||
Supported host architectures are `amd64` and `arm64`.
|
supply `dnd_pipeline_whisperx_transcribe_url` when invoking it. The collection
|
||||||
|
and deployment consumer are distributed separately.
|
||||||
|
|
||||||
## Installation
|
Role release `v0.2.0` records this native suite compatibility set. Its
|
||||||
|
`requirements.yml` pins the four updated application roles to `v0.2.0` and
|
||||||
|
retains Seriatim's `v0.1.0` role tag; these tags select the reviewed role content
|
||||||
|
without changing application versions or configuration.
|
||||||
|
|
||||||
Install the role dependencies and their collection before applying this role:
|
## Inventory and native inputs
|
||||||
|
|
||||||
```sh
|
See [defaults/main.yml](defaults/main.yml) and
|
||||||
ansible-galaxy role install -r requirements.yml
|
[meta/argument_specs.yml](meta/argument_specs.yml) for the complete interface.
|
||||||
ansible-galaxy collection install -r collections/requirements.yml
|
Application versions, Git origins, revisions, and toolchain are configurable.
|
||||||
```
|
The role selects immutable commits on the assets' `native-v4` compatibility
|
||||||
|
branches; their legacy `main` branches remain available to older consumers.
|
||||||
|
The native prompt checkout defaults to `/usr/local/etc/scriptorium/prompt-library`.
|
||||||
|
A custom prompt root must be inside `/usr/local/etc/scriptorium` so that the
|
||||||
|
native relative import remains contained by the main configuration directory.
|
||||||
|
The former shared prompt checkout is left untouched.
|
||||||
|
|
||||||
The dependency manifest installs the roles under their canonical names:
|
Audita stages and PromptKit backends/profiles are complete inventory-composable
|
||||||
`rakestraw.seriatim`, `rakestraw.audita`, `rakestraw.notarius`,
|
lists, and glossary collections are a map. The selected four empty collections
|
||||||
`rakestraw.scriptorium`, and `rakestraw.narratio`. It selects the compatible
|
are replaced by Narratio's prepared shared glossaries at runtime. Notarius
|
||||||
`v0.1.0` releases where compatible and public commit pins for Narratio and
|
pipelines are a complete inventory-composable map. Scriptorium and Notarius
|
||||||
Notarius when the suite needs newer interfaces. This standalone role is named
|
PromptKit backends, profiles and collections are optional native resources;
|
||||||
`rakestraw.dnd_pipeline`.
|
null delegates to the applications. Their role defaults do not merge caller
|
||||||
|
records. Audita repair and supported retry/timeout settings are nullable.
|
||||||
|
|
||||||
|
The suite manages `/usr/local/etc/narratio/narratio.yml` with required native
|
||||||
|
imports and `config.secrets_dir: secrets`. The `dnd_pipeline_secrets` map can
|
||||||
|
manage credential files; inventory must provide encrypted values as appropriate.
|
||||||
|
Credential lists and the S3 fields contain environment/secret reference names,
|
||||||
|
not raw keys. Environment delivery remains available. Existing configuration
|
||||||
|
fragments, legacy profiles, spool and cache roots are not removed.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
- hosts: pipeline_hosts
|
||||||
- name: Install the D&D pipeline foundation
|
|
||||||
hosts: pipeline_hosts
|
|
||||||
gather_facts: true
|
|
||||||
roles:
|
roles:
|
||||||
- role: rakestraw.dnd_pipeline
|
- role: rakestraw.dnd_pipeline
|
||||||
vars:
|
vars:
|
||||||
dnd_pipeline_whisperx_transcribe_url: https://whisperx.example/transcribe
|
dnd_pipeline_whisperx_transcribe_url: https://whisperx.example.test/transcribe
|
||||||
|
dnd_pipeline_secrets: "{{ vault_pipeline_secrets }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
The collection source exposes a reviewed snapshot of this role as
|
The runtime account owns managed configuration and the shared workspace;
|
||||||
`rakestraw.dnd.pipeline`:
|
`dnd_pipeline_operator_users` enrolls existing users in its group. Shared
|
||||||
|
workspace and Notarius cache access use group permissions and default ACLs.
|
||||||
|
Campaign, party and glossary documents use the shared v4 formats. Source paths
|
||||||
|
resolve relative to the file that declares them; the optional character family
|
||||||
|
uses flat artifact paths. No sample reference catalog is selected for the default campaigns.
|
||||||
|
|
||||||
|
A caller can opt in to a managed catalog by setting
|
||||||
|
`dnd_pipeline_reference_catalog_repository_url` and a nonempty
|
||||||
|
`dnd_pipeline_reference_catalog_revision`. The default checkout is
|
||||||
|
`/usr/local/etc/narratio/reference-catalog`; a custom root must remain inside
|
||||||
|
`/usr/local/etc/narratio` for the required source-relative `catalog.yml` import.
|
||||||
|
Alternatively or additionally, supply disjoint caller-owned vocabulary paths
|
||||||
|
through `dnd_pipeline_narratio_reference_catalog_settings` and
|
||||||
|
`dnd_pipeline_narratio_reference_catalog_systems`. Native composition resolves
|
||||||
|
these maps and reports conflicts. Campaigns select a setting or system by ID;
|
||||||
|
the supplied campaigns select neither. Catalog content is authored and updated
|
||||||
|
independently, with no runtime fetch service.
|
||||||
|
|
||||||
|
## Migration and operation
|
||||||
|
|
||||||
|
Session recap and character analysis default to `dnd.session_recap` and
|
||||||
|
`dnd.character_meta_analysis`, using current-session inputs only. Their default
|
||||||
|
bindings do not request a previous recap, so a first session needs no predecessor.
|
||||||
|
Player and party context comes from Narratio's prepared campaign roster.
|
||||||
|
|
||||||
|
To include a previous recap, explicitly select `dnd.session_recap_with_previous`
|
||||||
|
in `dnd_pipeline_narratio_session_recap_artifact`, or
|
||||||
|
`dnd.character_meta_analysis_with_previous` in
|
||||||
|
`dnd_pipeline_narratio_character_analysis_family`. Also add this binding to that
|
||||||
|
mapping's `inputs`, retaining its other fields and inputs from
|
||||||
|
[defaults/main.yml](defaults/main.yml):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
recap:
|
||||||
- name: Install the D&D pipeline from the collection
|
source: narratio.previous_session.artifact.session_recap
|
||||||
hosts: pipeline_hosts
|
required: true
|
||||||
gather_facts: true
|
|
||||||
roles:
|
|
||||||
- role: rakestraw.dnd.pipeline
|
|
||||||
vars:
|
|
||||||
dnd_pipeline_whisperx_transcribe_url: https://whisperx.example/transcribe
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Collection consumers should follow the unified bootstrap instructions in the
|
Keep the existing artifact key and output path. Previous-aware selections need
|
||||||
[`rakestraw.dnd` collection repository](https://gitea.maximumdirect.net/eric/ansible-collection-dnd).
|
an available published previous recap; there is no automatic fallback. The
|
||||||
This standalone repository remains authoritative for role changes; collection
|
testing overlay still changes the selected model without changing the prompt
|
||||||
maintainers import a reviewed, pushed commit or immutable tag as a snapshot.
|
variant. This is a configuration-only workaround pending upstream optional-input
|
||||||
Collection releases are published independently and are listed in the
|
support, and does not require application changes.
|
||||||
collection repository.
|
|
||||||
|
|
||||||
## Variables
|
| Retired suite inputs | Native replacement |
|
||||||
|
|
||||||
`dnd_pipeline_whisperx_transcribe_url` is required and is passed to Narratio.
|
|
||||||
The compatible application versions are selected through these variables:
|
|
||||||
|
|
||||||
| Variable | Default |
|
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `dnd_pipeline_audita_version` | `v2.0.1` |
|
| `dnd_pipeline_audita_pipeline_modules` | `dnd_pipeline_audita_pipeline_stages` |
|
||||||
| `dnd_pipeline_narratio_version` | `v3.0.0` |
|
| `dnd_pipeline_audita_backends`, `dnd_pipeline_audita_profiles` | `dnd_pipeline_audita_promptkit_backends`, `dnd_pipeline_audita_promptkit_profiles` |
|
||||||
| `dnd_pipeline_notarius_version` | `v0.8.1` |
|
| Audita confidence thresholds and `dnd_pipeline_audita_llm_repair_attempts` | Native glossary selection and nullable correction-repair inputs; no automatic conversion |
|
||||||
| `dnd_pipeline_seriatim_version` | `v1.5.0` |
|
| Notarius chunk-plan/checkpoint cache controls and PromptKit retry wrapper | Native pipeline cache and producer controls; `dnd_pipeline_notarius_cache_root` remains the cache location |
|
||||||
| `dnd_pipeline_scriptorium_version` | `v0.15.0` |
|
| `dnd_pipeline_narratio_notarius_resume`, `dnd_pipeline_narratio_cache_s3_audio` | Optional `dnd_pipeline_narratio_notarius_cache`; no Narratio audio cache |
|
||||||
| `dnd_pipeline_manage_build_dependencies` | `true` |
|
|
||||||
| `dnd_pipeline_go_snap_channel` | `1.26/stable` |
|
|
||||||
| `dnd_pipeline_go_binary` | `/snap/bin/go` |
|
|
||||||
| `dnd_pipeline_campaigns_repository_url` | `https://gitea.maximumdirect.net/eric/campaigns.git` |
|
|
||||||
| `dnd_pipeline_campaigns_revision` | `main` |
|
|
||||||
| `dnd_pipeline_campaigns_root` | `/usr/local/share/narratio/campaigns` |
|
|
||||||
| `dnd_pipeline_prompt_library_repository_url` | `https://gitea.maximumdirect.net/eric/narratio-prompts.git` |
|
|
||||||
| `dnd_pipeline_prompt_library_revision` | `main` |
|
|
||||||
| `dnd_pipeline_prompt_library_root` | `/usr/local/share/narratio/prompt-library` |
|
|
||||||
|
|
||||||
The common dependency-management switch controls whether every application
|
The testing Narratio overlay selects an independent Notarius testing overlay
|
||||||
role installs Git and Go. Callers that disable it must provide both Git and Go.
|
and Scriptorium test profile for bounds, artifacts and family. A model or overlay
|
||||||
The Go channel and executable are likewise passed to all five roles. Advanced
|
change does not itself invalidate completed Narratio products or accepted
|
||||||
callers may supply unmapped standalone-role variables directly through normal
|
Notarius results; explicitly force extraction or select refresh/bypass for a
|
||||||
Ansible variable precedence.
|
fresh experiment. The production pipeline uses native cache `auto`.
|
||||||
|
|
||||||
The following values are deliberate D&D suite policy passed through the
|
Narratio accepts only `narratio.session-manifest.v2` local state. Preserve old
|
||||||
standalone roles' generic configuration interfaces; they are not standalone
|
authored sources and workspaces separately; regenerate or import compatible
|
||||||
defaults. Narratio runs first and establishes the selected runtime user and
|
published products into a new baseline. Publication and restore transfer
|
||||||
group before the remaining configuration-bearing dependencies run.
|
products, not the old execution ledger. Automatic cleanup defaults to false;
|
||||||
|
if explicitly enabled, it removes the entire session run history, including
|
||||||
|
logs and debug captures. The role does not run cleanup or migrate old state.
|
||||||
|
|
||||||
| Variable | Default policy |
|
Use explicit configuration paths and flags after the complete command path:
|
||||||
| --- | --- |
|
|
||||||
| `dnd_pipeline_runtime_user` | `narratio` |
|
|
||||||
| `dnd_pipeline_runtime_group` | `narratio` |
|
|
||||||
| `dnd_pipeline_operator_users` | `[]` |
|
|
||||||
| `dnd_pipeline_config_directory_mode` | `0755` |
|
|
||||||
| `dnd_pipeline_config_file_mode` | `0644` |
|
|
||||||
|
|
||||||
All application configuration, including pipeline-owned Narratio fragments,
|
|
||||||
is therefore `narratio:narratio`, world-readable, and Ansible-managed. It is
|
|
||||||
not an operator-editable configuration surface.
|
|
||||||
|
|
||||||
Narratio receives the standard Seriatim, Audita, Notarius, and Scriptorium
|
|
||||||
binary and configuration paths managed by the composed roles. Notarius is
|
|
||||||
enabled with the suite-owned `dnd-session` extraction pipeline.
|
|
||||||
|
|
||||||
The role deploys the campaign repository directly at the campaign root and
|
|
||||||
the prompt library directly at the prompt-library root. By default both follow
|
|
||||||
their `main` branches; callers can select an immutable commit, tag, or another
|
|
||||||
branch through the revision variables. Narratio receives the deployed campaign
|
|
||||||
root, while Scriptorium receives its `prompts/` and `schemas/` children.
|
|
||||||
|
|
||||||
### D&D processing policy
|
|
||||||
|
|
||||||
The variables below are deliberate D&D suite policy, not a copy of application
|
|
||||||
defaults. They remain ordinary inventory variables, so callers can replace a
|
|
||||||
chosen policy value when their deployment requires it.
|
|
||||||
|
|
||||||
| Variable group | Default policy |
|
|
||||||
| --- | --- |
|
|
||||||
| `dnd_pipeline_audita_pipeline_modules` | `glossary`, `homophones`, `glossary`, `spoken_word`, `grammar` |
|
|
||||||
| `dnd_pipeline_audita_output_schema` | `audita-v1` |
|
|
||||||
| `dnd_pipeline_audita_backends` | Native `dnd` backend at `https://inference.ai.rakestrawhome.com/v1`, credential `AUDITA_LLM_API_KEY`, shared concurrency `4` |
|
|
||||||
| `dnd_pipeline_audita_profiles` | Complete native `dnd-proposal` and `dnd-validation` mappings using `google/gemma-4-31b-it` and 900-second attempt timeouts |
|
|
||||||
| `dnd_pipeline_audita_llm_proposal_profile` | `dnd-proposal` |
|
|
||||||
| `dnd_pipeline_audita_llm_validation_profile` | `dnd-validation` |
|
|
||||||
| `dnd_pipeline_audita_llm_transient_retries`, `dnd_pipeline_audita_llm_repair_attempts`, `dnd_pipeline_audita_llm_operation_timeout` | `null`; omit overrides and use native defaults |
|
|
||||||
| `dnd_pipeline_audita_chunking_*` | `8` target sections, `6144` maximum and `2048` minimum section tokens |
|
|
||||||
| `dnd_pipeline_audita_normalization_*` | `3.0` maximum and ellipsis gaps, `240.0` maximum duration, `2048` maximum tokens |
|
|
||||||
| `dnd_pipeline_audita_thresholds_*` | `0.8` for glossary, homophones, spoken word, and grammar |
|
|
||||||
| `dnd_pipeline_audita_context_description` | D&D-game transcript context, including possible pre- and post-session banter |
|
|
||||||
| `dnd_pipeline_audita_diagnostics_work_dir` | `/tmp/audita` |
|
|
||||||
|
|
||||||
Audita owns its backend and LLM policy. The suite writes each complete profile
|
|
||||||
mapping to `/usr/local/etc/audita/profiles/<key>.yml`; keys must be filename-safe
|
|
||||||
IDs matching each mapping's `id`. Inventory may replace the mappings and selected
|
|
||||||
IDs. Narratio forwards the configured credential names, while Audita's native
|
|
||||||
configuration resolves them. The role does not remove old profile files.
|
|
||||||
|
|
||||||
For inventories upgrading from the prior suite, replace the separate Audita
|
|
||||||
proposal/validation endpoint, model, key, timeout, and concurrency variables
|
|
||||||
with `dnd_pipeline_audita_backends` and `dnd_pipeline_audita_profiles`, then
|
|
||||||
select profile IDs with the two `dnd_pipeline_audita_llm_*_profile` variables.
|
|
||||||
Replace `dnd_pipeline_narratio_notarius_llm_api_key` with
|
|
||||||
`dnd_pipeline_narratio_notarius_credentials`, and use
|
|
||||||
`dnd_pipeline_narratio_audita_credentials` for Audita's backend credential
|
|
||||||
names. The old diagnostics retention variable is no longer forwarded.
|
|
||||||
|
|
||||||
The old per-purpose Audita endpoint and API-key names now belong to the
|
|
||||||
backend map; both default profiles share the `dnd` backend and its one
|
|
||||||
concurrency limit. Old proposal and validation models and per-attempt timeouts
|
|
||||||
belong in complete profile mappings. The default 900-second value is retained
|
|
||||||
per attempt; `dnd_pipeline_audita_llm_operation_timeout` is an independent
|
|
||||||
whole-operation deadline and defaults to `null`, leaving Audita's native
|
|
||||||
policy in charge. The former `*_max_retries` variables do not have a direct
|
|
||||||
one-to-one replacement: use the optional Audita transient retry and repair
|
|
||||||
attempt settings according to the desired native behavior. Optional retry
|
|
||||||
pass-throughs for Notarius PromptKit and Scriptorium likewise default to
|
|
||||||
`null`; an explicit `0` is forwarded, not treated as omission.
|
|
||||||
|
|
||||||
Include each backend credential name in
|
|
||||||
`dnd_pipeline_narratio_audita_credentials` and make its value available to
|
|
||||||
Narratio through its process environment or supported secret files.
|
|
||||||
`dnd_pipeline_secrets` is the suite's optional file-provisioning interface,
|
|
||||||
not a requirement to store credentials on disk. Narratio forwards only names in
|
|
||||||
that list and does not discover them from Audita's configuration. The
|
|
||||||
Notarius list is independent. For profile overrides, use filename-safe map
|
|
||||||
keys equal to each profile's native `id`; the suite writes each map value
|
|
||||||
unchanged and does not merge individual fields. See [Audita's v2 configuration
|
|
||||||
migration](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.1/docs/migrations/v2.md)
|
|
||||||
for backend and profile migration; this role does not convert caller-owned
|
|
||||||
configuration.
|
|
||||||
|
|
||||||
Existing Narratio session manifests need a separate migration before opening
|
|
||||||
affected sessions with v3. Stop activity for the session and back up its local
|
|
||||||
manifest. Follow [Narratio's manifest overlay-provenance migration](https://gitea.maximumdirect.net/eric/narratio/src/tag/v3.0.0/docs/operations.md#migrating-manifest-overlay-provenance)
|
|
||||||
to rename `effective_config.selected_profile` to `selected_overlay`, or remove
|
|
||||||
the retired informational member as upstream permits. Preserve stage records,
|
|
||||||
checkpoints, and other progress; do not edit immutable remote snapshots or
|
|
||||||
force all stages to rerun. The role performs no session migration.
|
|
||||||
|
|
||||||
| Variable | Default |
|
|
||||||
| --- | --- |
|
|
||||||
| `dnd_pipeline_narratio_seriatim_output_schema` | `seriatim-intermediate` |
|
|
||||||
| `dnd_pipeline_narratio_normalize_output_path` | `transcripts/final.json` |
|
|
||||||
| `dnd_pipeline_narratio_normalize_output_schema` | `seriatim-intermediate` |
|
|
||||||
| `dnd_pipeline_narratio_trim_enabled` | `true` |
|
|
||||||
| `dnd_pipeline_narratio_trim_output_path` | `transcripts/final.trimmed.json` |
|
|
||||||
| `dnd_pipeline_narratio_trim_bounds_prompt_id` | `dnd.session_bounds` |
|
|
||||||
| `dnd_pipeline_narratio_trim_bounds_transcript_input_name` | `transcript` |
|
|
||||||
| `dnd_pipeline_narratio_trim_bounds_output_path` | `artifacts/session_bounds.json` |
|
|
||||||
| `dnd_pipeline_narratio_render_enabled` | `true` |
|
|
||||||
| `dnd_pipeline_narratio_render_format` | `markdown` |
|
|
||||||
| `dnd_pipeline_narratio_testing_scriptorium_profile` | `gemini-flash-latest` |
|
|
||||||
| `dnd_pipeline_notarius_testing_llm_profile` | `gpt-luna-latest` |
|
|
||||||
| `dnd_pipeline_notarius_promptkit_transient_retries` | `null`; native default |
|
|
||||||
| `dnd_pipeline_scriptorium_transient_retries` | `null`; native default |
|
|
||||||
| `dnd_pipeline_narratio_audita_credentials` | `[AUDITA_LLM_API_KEY]` |
|
|
||||||
| `dnd_pipeline_narratio_notarius_credentials` | `[OPENROUTER_API_KEY]` |
|
|
||||||
|
|
||||||
`dnd_pipeline_audita_output_schema` is also the Narratio Audita-adapter schema;
|
|
||||||
it is the shared cross-application boundary. Other Narratio-local controls,
|
|
||||||
including reports, timeouts, debug rendering, presentation, and bounds prompt
|
|
||||||
profile selection, remain Narratio defaults.
|
|
||||||
|
|
||||||
### Storage and publication policy
|
|
||||||
|
|
||||||
The suite selects Narratio's S3 backend and the established Backblaze-compatible
|
|
||||||
archive. These are ordinary inventory variables, so deployments may replace
|
|
||||||
the selected policy through the role's public interface.
|
|
||||||
|
|
||||||
| Variable | Default policy |
|
|
||||||
| --- | --- |
|
|
||||||
| `dnd_pipeline_narratio_workspace_cleanup_after_publish` | `true` |
|
|
||||||
| `dnd_pipeline_narratio_storage_backend` | `s3` |
|
|
||||||
| `dnd_pipeline_narratio_storage_s3_bucket` | `rakestraw-assets` |
|
|
||||||
| `dnd_pipeline_narratio_storage_s3_root_prefix` | `dnd` |
|
|
||||||
| `dnd_pipeline_narratio_storage_s3_region` | `us-east-1` |
|
|
||||||
| `dnd_pipeline_narratio_storage_s3_endpoint` | `https://s3.us-east-005.backblazeb2.com` |
|
|
||||||
| `dnd_pipeline_narratio_storage_s3_force_path_style` | `true` |
|
|
||||||
| `dnd_pipeline_narratio_storage_s3_access_key_id` | `OBJECT_STORAGE_KEY_ID` |
|
|
||||||
| `dnd_pipeline_narratio_storage_s3_secret_access_key` | `OBJECT_STORAGE_KEY` |
|
|
||||||
| `dnd_pipeline_narratio_cache_s3_audio` | `true` |
|
|
||||||
| `dnd_pipeline_narratio_publish_enabled` | `true` |
|
|
||||||
| `dnd_pipeline_narratio_publish_upload_run` | `true` |
|
|
||||||
|
|
||||||
`dnd_pipeline_narratio_publish_outputs` is a complete native list, not a list
|
|
||||||
merged with the suite default. It publishes final and trimmed JSON, final and
|
|
||||||
trimmed Markdown, session recap, hostile rumors, and optional deranged rumors.
|
|
||||||
Every rule omits `dest`: Narratio derives transcript destinations from its
|
|
||||||
built-in sources and artifact destinations from the configured artifact output
|
|
||||||
paths.
|
|
||||||
|
|
||||||
S3 session audio uses the maximum available native cache beneath
|
|
||||||
`/var/cache/narratio`. After successful run publication, Narratio cleans the
|
|
||||||
published workspace target while preserving that cache. The suite deliberately
|
|
||||||
does not set `narratio_spool_delete_audio_after_publish`; spool-audio retention
|
|
||||||
continues to use Narratio's application default.
|
|
||||||
|
|
||||||
### Artifacts and profiles
|
|
||||||
|
|
||||||
The role owns these complete native mapping variables. Replacing one mapping
|
|
||||||
changes that source's configuration as a whole; it does not change the fixed
|
|
||||||
file name, import, or source key. Set `enabled: false` to retain an available
|
|
||||||
source while excluding it from normal analysis.
|
|
||||||
|
|
||||||
| Variable | Fixed source | Default state | Output |
|
|
||||||
| --- | --- | --- | --- |
|
|
||||||
| `dnd_pipeline_narratio_session_recap_artifact` | `session_recap` | enabled | `artifacts/session_recap.md` |
|
|
||||||
| `dnd_pipeline_narratio_hostile_rumors_artifact` | `hostile_rumors` | enabled | `artifacts/hostile_rumors.md` |
|
|
||||||
| `dnd_pipeline_narratio_deranged_rumors_artifact` | `deranged_rumors` | enabled | `artifacts/deranged_rumors.md` |
|
|
||||||
| `dnd_pipeline_narratio_scene_map_artifact` | `scene_map` | disabled | `artifacts/scene_map.json` |
|
|
||||||
| `dnd_pipeline_narratio_character_analysis_family` | `character_meta_analysis` | disabled | `artifacts/character_meta_analysis/{character_id}.md` |
|
|
||||||
|
|
||||||
The character-analysis family expands over campaign `party.characters` and
|
|
||||||
passes each member's name and class summary to its prompt. Recap and both rumor
|
|
||||||
sources are enabled; the rumor input derives its recap dependency without a
|
|
||||||
redundant explicit ordering edge. Production artifacts inherit each prompt's
|
|
||||||
declared profile.
|
|
||||||
|
|
||||||
Narratio's root file remains owned by the standalone role. It imports the
|
|
||||||
suite-owned base fragments in this fixed order:
|
|
||||||
|
|
||||||
```text
|
|
||||||
/usr/local/etc/narratio/
|
|
||||||
├── pipeline.yml
|
|
||||||
├── conf.d/processing.yml
|
|
||||||
├── artifacts/session-recap.yml
|
|
||||||
├── artifacts/hostile-rumors.yml
|
|
||||||
├── artifacts/deranged-rumors.yml
|
|
||||||
├── artifacts/scene-map.yml
|
|
||||||
├── artifact-families/character-meta-analysis.yml
|
|
||||||
└── overlays/testing.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
Notarius follows the corresponding base-and-overlay layout:
|
|
||||||
|
|
||||||
```text
|
|
||||||
/usr/local/etc/notarius/
|
|
||||||
├── config.yml
|
|
||||||
├── pipelines/dnd-session.yml
|
|
||||||
└── overlays/testing.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
The `testing` overlay is not a second configuration tree. It sets
|
|
||||||
the Scriptorium `profile_id` for the four artifact sources and the one family,
|
|
||||||
and explicitly selects Notarius's separately managed `testing` overlay. The
|
|
||||||
Scriptorium default, `gemini-flash-latest`, is an inexpensive development
|
|
||||||
choice, not a compatibility guarantee. Replace it through inventory when a
|
|
||||||
different testing profile is appropriate:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
dnd_pipeline_narratio_testing_scriptorium_profile: endpoint-profile
|
|
||||||
dnd_pipeline_notarius_testing_llm_profile: alternate-economy-profile
|
|
||||||
```
|
|
||||||
|
|
||||||
Narratio selects it with `--overlay testing`, and direct Notarius commands
|
|
||||||
use `--config-overlay testing`; the former `--profile` and
|
|
||||||
`--config-profile` selectors are retired. Previously deployed
|
|
||||||
`profiles/testing.yml` files are ignored, not pruned. Renaming the selected
|
|
||||||
overlay normally changes configuration identity, so cached work tied to the
|
|
||||||
old named selection may not be reused.
|
|
||||||
|
|
||||||
### Notarius extraction policy
|
|
||||||
|
|
||||||
The Notarius root configuration imports the fixed
|
|
||||||
`pipelines/dnd-session.yml` fragment. The suite owns that fragment at
|
|
||||||
`/usr/local/etc/notarius/pipelines/dnd-session.yml`; callers do not edit it.
|
|
||||||
The separate `/usr/local/etc/notarius/overlays/testing.yml` overlay changes only
|
|
||||||
the selected suite pipeline's LLM profile.
|
|
||||||
|
|
||||||
| Variable | Default policy |
|
|
||||||
| --- | --- |
|
|
||||||
| `dnd_pipeline_notarius_pipelines` | Complete native map containing `dnd-session` |
|
|
||||||
| `dnd_pipeline_notarius_cache_root` | `/var/cache/notarius` |
|
|
||||||
| `dnd_pipeline_notarius_cache_chunk_plans_mode` | `auto` |
|
|
||||||
| `dnd_pipeline_notarius_cache_checkpoints_enabled` | `true` |
|
|
||||||
| `dnd_pipeline_notarius_testing_llm_profile` | `gpt-luna-latest` |
|
|
||||||
| `dnd_pipeline_narratio_notarius_pipeline_id` | `dnd-session` |
|
|
||||||
| `dnd_pipeline_narratio_notarius_credentials` | `[OPENROUTER_API_KEY]` |
|
|
||||||
| `dnd_pipeline_narratio_notarius_resume` | `true` |
|
|
||||||
| `dnd_pipeline_narratio_notarius_references` | `party`, `players`, and `glossary` prepared sources |
|
|
||||||
| `dnd_pipeline_narratio_notarius_outputs` | Complete native map of ten accepted D&D lanes |
|
|
||||||
|
|
||||||
The pipeline, reference, and output values are complete native mappings.
|
|
||||||
Inventory can replace them or compose additions with Jinja's `combine` filter;
|
|
||||||
a replacement pipeline map requires a matching selected pipeline ID. The base
|
|
||||||
`dnd-session` pipeline selects `gpt-terra-latest`, while the testing overlay
|
|
||||||
selects `gpt-luna-latest`. Both are moving catalog IDs rather than immutable
|
|
||||||
model promises. Pipeline and binding-level overrides retain Notarius's native
|
|
||||||
precedence; the suite does not rewrite caller-supplied bindings.
|
|
||||||
|
|
||||||
Narratio materializes the `party`, `players`, and `glossary` references for each
|
|
||||||
invocation. No campaign filesystem path appears in Notarius configuration. The
|
|
||||||
optional `spell_catalog` reference remains absent until a campaign supplies
|
|
||||||
that input. The accepted sources are
|
|
||||||
`narratio.extraction.item_registry`, `npc_registry`, `location_registry`,
|
|
||||||
`scene_descriptions`, `item_occurrences`, `spells`, `combat_turns`,
|
|
||||||
`npc_occurrences`, `location_occurrences`, and `enemy_events`.
|
|
||||||
They remain available as `narratio.extraction.<output_key>` inputs for future
|
|
||||||
analyze artifacts whether or not a source has a stable publication rule;
|
|
||||||
accepted extraction and published output selection are independent interfaces.
|
|
||||||
|
|
||||||
Narratio forwards the typed `OPENROUTER_API_KEY` reference to the selected
|
|
||||||
Notarius profile and ordinary extraction requests checkpoint reuse with
|
|
||||||
`resume: true`. Chunk plans use Notarius's root-owned `auto` policy; the
|
|
||||||
pipeline deliberately leaves Narratio's optional `chunk_cache` override unset.
|
|
||||||
The `chunk-plans` and `checkpoints` paths derive from the cache root and are
|
|
||||||
created by Notarius during use. See the [Notarius v0.8.1 release notes](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.8.1/docs/releases/v0.8.1.md)
|
|
||||||
for its PromptKit dependency and profile-source identity changes.
|
|
||||||
Existing checkpoints with the previous profile-source identity are not reused;
|
|
||||||
source-keyed chunk plans and output artifacts remain compatible. No cache
|
|
||||||
deletion or forced extraction is performed by this role. A real testing run may
|
|
||||||
invoke Notarius; the integration suite performs offline configuration inspection
|
|
||||||
only and makes no provider request.
|
|
||||||
|
|
||||||
### Inspecting configuration
|
|
||||||
|
|
||||||
The following native Narratio commands resolve configuration without running
|
|
||||||
transcription or requesting a model provider. Select a deployed campaign for
|
|
||||||
the party-driven character family:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo -u narratio narratio config validate \
|
narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope app
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs
|
narratio config show --config /usr/local/etc/narratio/narratio.yml --scope app --overlay testing
|
||||||
sudo -u narratio narratio config validate \
|
narratio artifacts list --config /usr/local/etc/narratio/narratio.yml --campaign centaurs
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs --overlay testing
|
notarius pipeline validate dnd-session --config /usr/local/etc/notarius/config.yml --overlay testing
|
||||||
sudo -u narratio narratio config artifacts \
|
scriptorium config validate --config /usr/local/etc/scriptorium/config.yml
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs
|
|
||||||
sudo -u narratio narratio config diff default testing \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The first two commands validate production and testing resolution. Artifact
|
See the tagged [Narratio release](https://gitea.maximumdirect.net/eric/narratio/src/tag/v4.0.0/docs/releases/v4.0.0.md),
|
||||||
inspection shows enabled sources, inferred dependencies, and generated family
|
[Notarius D&D integration](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/consumers/dnd-pipeline.md),
|
||||||
members; the diff shows the overlay's profile selections without modifying
|
[Audita configuration](https://gitea.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/config.md), and
|
||||||
managed files.
|
[Scriptorium migration](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/consumers/upgrading-promptkit.md)
|
||||||
|
for the application contracts.
|
||||||
|
|
||||||
With valid object-storage credentials, the selected policy enables Narratio's
|
## Offline validation
|
||||||
native [S3 session-audio](https://gitea.maximumdirect.net/eric/narratio/src/tag/v2.1.1/docs/config.md#session),
|
|
||||||
[publication](https://gitea.maximumdirect.net/eric/narratio/src/tag/v2.1.1/docs/operations.md#publish-workflow),
|
|
||||||
[restore](https://gitea.maximumdirect.net/eric/narratio/src/tag/v2.1.1/docs/operations.md#restore-workflow),
|
|
||||||
[publication locks](https://gitea.maximumdirect.net/eric/narratio/src/tag/v2.1.1/docs/operations.md#publish-locks),
|
|
||||||
[session status](https://gitea.maximumdirect.net/eric/narratio/src/tag/v2.1.1/docs/operations.md#standard-session-workflow),
|
|
||||||
and [cleanup](https://gitea.maximumdirect.net/eric/narratio/src/tag/v2.1.1/docs/operations.md#cleanup)
|
|
||||||
workflows. These remain application commands and lifecycle rules; scheduling
|
|
||||||
and real end-to-end execution remain deployment concerns.
|
|
||||||
|
|
||||||
### Shared execution filesystem
|
`tests/integration` installs pinned dependencies into temporary paths and
|
||||||
|
selects the local compatible asset commits. It runs syntax and production-profile
|
||||||
|
lint, native validation/inspection and supplied configuration cases, with a clean
|
||||||
|
repeat after each role application. It uses synthetic credentials and the local
|
||||||
|
Ubuntu test host; it does not run preflight, inference, S3 operations or an
|
||||||
|
end-to-end session.
|
||||||
|
|
||||||
`/var/lib/narratio`, `/var/spool/narratio`, `/var/cache/narratio`, and
|
```sh
|
||||||
`/var/cache/notarius` are
|
bash -n tests/integration
|
||||||
`narratio:narratio` mode `2775` **setgid** directories. Their access and
|
tests/integration
|
||||||
default ACLs retain owner and group write access plus world read/traverse access
|
|
||||||
for newly created content. The pipeline may run as `narratio` or as a human
|
|
||||||
account in the selected runtime group. Consumers can enroll selected existing
|
|
||||||
human accounts through the role interface:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
dnd_pipeline_operator_users:
|
|
||||||
- eric
|
|
||||||
- alice
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Every selected account must already exist; the role does not create human
|
|
||||||
accounts or manage their identity and login policy. Enrollment adds the
|
|
||||||
selected runtime group without replacing other supplementary groups. Removing
|
|
||||||
or omitting a name later does not revoke membership. A newly enrolled operator
|
|
||||||
must begin a new login session before the operating system exposes the added
|
|
||||||
supplementary group to that session.
|
|
||||||
|
|
||||||
Configuration, transcripts, caches, generated artifacts, campaign data,
|
|
||||||
prompts, and logs are non-secret D&D content. Credentials use the restricted
|
|
||||||
`/usr/local/etc/narratio/secrets` subtree, owned by the selected runtime user
|
|
||||||
and group with mode `0750`; managed files use mode `0640`. Runtime-group
|
|
||||||
membership, including enrollment through `dnd_pipeline_operator_users`,
|
|
||||||
authorizes use of these shared credentials, while the subtree grants no world
|
|
||||||
access. Ordinary configuration remains world-readable and contains only
|
|
||||||
reference names.
|
|
||||||
|
|
||||||
### Managed credentials
|
|
||||||
|
|
||||||
`dnd_pipeline_secrets` defaults to `{}`. Its keys must be valid environment
|
|
||||||
variable names, and each string value is managed as the exact named credential
|
|
||||||
file. Omitted names are unmanaged: the role neither mirrors nor purges the
|
|
||||||
directory. Narratio loads this conventional sibling directory before
|
|
||||||
configuration resolution; an already-set process environment value takes
|
|
||||||
precedence. The role adds no wrapper, service, or parallel credential loader.
|
|
||||||
|
|
||||||
Keep values in encrypted inventory, for example with Ansible Vault; Vault is a
|
|
||||||
consumer workflow, not role functionality:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
dnd_pipeline_secrets:
|
|
||||||
AUDITA_LLM_API_KEY: "{{ vault_dnd_audita_llm_api_key }}"
|
|
||||||
OPENROUTER_API_KEY: "{{ vault_dnd_openrouter_api_key }}"
|
|
||||||
OBJECT_STORAGE_KEY_ID: "{{ vault_dnd_object_storage_key_id }}"
|
|
||||||
OBJECT_STORAGE_KEY: "{{ vault_dnd_object_storage_key }}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Only the reference names enter ordinary Narratio configuration; credential
|
|
||||||
values remain in encrypted inventory and the restricted managed secrets
|
|
||||||
directory. A deployment using Narratio's ambient AWS SDK provider chain can
|
|
||||||
set both `dnd_pipeline_narratio_storage_s3_access_key_id` and
|
|
||||||
`dnd_pipeline_narratio_storage_s3_secret_access_key` to `null`. The pair must
|
|
||||||
be omitted together.
|
|
||||||
|
|
||||||
Scriptorium profiles continue to own their `api_key_env` selection. To supply
|
|
||||||
that credential through the suite, add a `dnd_pipeline_secrets` entry whose
|
|
||||||
name matches the selected profile's `api_key_env`. Narratio's secrets bootstrap
|
|
||||||
loads the value, and its existing Scriptorium adapter forwards only the
|
|
||||||
profile-selected credential.
|
|
||||||
|
|
||||||
## Validation
|
|
||||||
|
|
||||||
`tests/integration` installs the pinned Git dependencies and collection into
|
|
||||||
private temporary paths, runs syntax and production-profile lint checks, then
|
|
||||||
applies the suite with a local syntactically valid WhisperX URL and explicit
|
|
||||||
immutable `file://` asset inputs. It uses native application
|
|
||||||
smoke/configuration commands, validates Notarius's imported pipeline and
|
|
||||||
effective cache policy, and validates Narratio for both deployed campaigns and
|
|
||||||
the testing overlay. It inspects enabled Notarius wiring through Narratio's
|
|
||||||
native effective configuration, validates the same imported Notarius pipeline
|
|
||||||
as a temporary existing-group-member fixture, exercises representative shared
|
|
||||||
cache access across the service and fixture identities, and confirms that
|
|
||||||
`nobody` can read ordinary configuration. It also composes an alternate pair of
|
|
||||||
version-5 pipeline maps through the public interface and requires clean repeats
|
|
||||||
for the baseline and override cases. Cleanup reapplies the asset-enabled
|
|
||||||
baseline suite and removes only the fixture account, its named test content,
|
|
||||||
and the driver's private temporary directory.
|
|
||||||
|
|||||||
@@ -1,51 +1,28 @@
|
|||||||
---
|
---
|
||||||
dnd_pipeline_audita_version: v2.0.1
|
dnd_pipeline_audita_version: v4.3.0
|
||||||
dnd_pipeline_narratio_version: v3.0.0
|
dnd_pipeline_narratio_version: v4.0.0
|
||||||
dnd_pipeline_notarius_version: v0.8.1
|
dnd_pipeline_notarius_version: v0.10.0
|
||||||
dnd_pipeline_seriatim_version: v1.5.0
|
dnd_pipeline_seriatim_version: v1.5.0
|
||||||
dnd_pipeline_scriptorium_version: v0.15.0
|
dnd_pipeline_scriptorium_version: v0.16.0
|
||||||
dnd_pipeline_manage_build_dependencies: true
|
dnd_pipeline_manage_build_dependencies: true
|
||||||
dnd_pipeline_go_snap_channel: 1.26/stable
|
dnd_pipeline_go_snap_channel: 1.27/stable
|
||||||
dnd_pipeline_go_binary: /snap/bin/go
|
dnd_pipeline_go_binary: /snap/bin/go
|
||||||
dnd_pipeline_runtime_user: narratio
|
dnd_pipeline_runtime_user: narratio
|
||||||
dnd_pipeline_runtime_group: narratio
|
dnd_pipeline_runtime_group: narratio
|
||||||
dnd_pipeline_operator_users: []
|
dnd_pipeline_operator_users: []
|
||||||
dnd_pipeline_secrets: {}
|
dnd_pipeline_secrets: {}
|
||||||
dnd_pipeline_config_directory_mode: "0755"
|
dnd_pipeline_config_directory_mode: '0755'
|
||||||
dnd_pipeline_config_file_mode: "0644"
|
dnd_pipeline_config_file_mode: '0644'
|
||||||
dnd_pipeline_campaigns_repository_url: https://gitea.maximumdirect.net/eric/campaigns.git
|
dnd_pipeline_campaigns_repository_url: https://gitea.maximumdirect.net/eric/campaigns.git
|
||||||
dnd_pipeline_campaigns_revision: main
|
dnd_pipeline_campaigns_revision: 488c2eb97b5c62efe51aa7af35a5ec9cb8b7a747
|
||||||
dnd_pipeline_campaigns_root: /usr/local/share/narratio/campaigns
|
dnd_pipeline_campaigns_root: /usr/local/share/narratio/campaigns
|
||||||
dnd_pipeline_prompt_library_repository_url: https://gitea.maximumdirect.net/eric/narratio-prompts.git
|
dnd_pipeline_prompt_library_repository_url: https://gitea.maximumdirect.net/eric/narratio-prompts.git
|
||||||
dnd_pipeline_prompt_library_revision: main
|
dnd_pipeline_prompt_library_revision: d15a630ddfec18ab505df3ea5b076f6a0a5fd4b3
|
||||||
dnd_pipeline_prompt_library_root: /usr/local/share/narratio/prompt-library
|
dnd_pipeline_prompt_library_root: /usr/local/etc/scriptorium/prompt-library
|
||||||
dnd_pipeline_audita_pipeline_modules:
|
|
||||||
- glossary
|
|
||||||
- homophones
|
|
||||||
- glossary
|
|
||||||
- spoken_word
|
|
||||||
- grammar
|
|
||||||
dnd_pipeline_audita_output_schema: audita-v1
|
dnd_pipeline_audita_output_schema: audita-v1
|
||||||
dnd_pipeline_audita_backends:
|
|
||||||
dnd:
|
|
||||||
endpoint: https://inference.ai.rakestrawhome.com/v1
|
|
||||||
credential: AUDITA_LLM_API_KEY
|
|
||||||
concurrency: 4
|
|
||||||
dnd_pipeline_audita_profiles:
|
|
||||||
dnd-proposal:
|
|
||||||
id: dnd-proposal
|
|
||||||
backend: dnd
|
|
||||||
model: google/gemma-4-31b-it
|
|
||||||
timeout_seconds: 900
|
|
||||||
dnd-validation:
|
|
||||||
id: dnd-validation
|
|
||||||
backend: dnd
|
|
||||||
model: google/gemma-4-31b-it
|
|
||||||
timeout_seconds: 900
|
|
||||||
dnd_pipeline_audita_llm_proposal_profile: dnd-proposal
|
dnd_pipeline_audita_llm_proposal_profile: dnd-proposal
|
||||||
dnd_pipeline_audita_llm_validation_profile: dnd-validation
|
dnd_pipeline_audita_llm_validation_profile: dnd-validation
|
||||||
dnd_pipeline_audita_llm_transient_retries: null
|
dnd_pipeline_audita_llm_transient_retries: null
|
||||||
dnd_pipeline_audita_llm_repair_attempts: null
|
|
||||||
dnd_pipeline_audita_llm_operation_timeout: null
|
dnd_pipeline_audita_llm_operation_timeout: null
|
||||||
dnd_pipeline_audita_chunking_target_sections: 8
|
dnd_pipeline_audita_chunking_target_sections: 8
|
||||||
dnd_pipeline_audita_chunking_max_section_tokens: 6144
|
dnd_pipeline_audita_chunking_max_section_tokens: 6144
|
||||||
@@ -54,14 +31,8 @@ dnd_pipeline_audita_normalization_max_segment_gap: 3.0
|
|||||||
dnd_pipeline_audita_normalization_ellipsis_gap: 3.0
|
dnd_pipeline_audita_normalization_ellipsis_gap: 3.0
|
||||||
dnd_pipeline_audita_normalization_max_segment_duration: 240.0
|
dnd_pipeline_audita_normalization_max_segment_duration: 240.0
|
||||||
dnd_pipeline_audita_normalization_max_segment_tokens: 2048
|
dnd_pipeline_audita_normalization_max_segment_tokens: 2048
|
||||||
dnd_pipeline_audita_thresholds_glossary: 0.8
|
dnd_pipeline_audita_context_description: The following transcript was recorded during a Dungeons & Dragons game
|
||||||
dnd_pipeline_audita_thresholds_homophones: 0.8
|
session. It may contain some unrelated pre-session or post-session banter, in addition to actual D&D gameplay.
|
||||||
dnd_pipeline_audita_thresholds_spoken_word: 0.8
|
|
||||||
dnd_pipeline_audita_thresholds_grammar: 0.8
|
|
||||||
dnd_pipeline_audita_context_description: >-
|
|
||||||
The following transcript was recorded during a Dungeons & Dragons game session.
|
|
||||||
It may contain some unrelated pre-session or post-session banter, in addition
|
|
||||||
to actual D&D gameplay.
|
|
||||||
dnd_pipeline_audita_diagnostics_work_dir: /tmp/audita
|
dnd_pipeline_audita_diagnostics_work_dir: /tmp/audita
|
||||||
dnd_pipeline_notarius_pipelines:
|
dnd_pipeline_notarius_pipelines:
|
||||||
dnd-session:
|
dnd-session:
|
||||||
@@ -70,7 +41,6 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
module: seriatim
|
module: seriatim
|
||||||
chunk:
|
chunk:
|
||||||
module: dnd/scenes
|
module: dnd/scenes
|
||||||
retries: 2
|
|
||||||
output:
|
output:
|
||||||
module: json
|
module: json
|
||||||
options:
|
options:
|
||||||
@@ -94,7 +64,6 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
item-registry:
|
item-registry:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/item-registry
|
module: dnd/item-registry
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
@@ -102,25 +71,20 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
npc-registry:
|
npc-registry:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/npc-registry
|
module: dnd/npc-registry
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
module: dnd/npc-registry
|
module: dnd/npc-registry
|
||||||
retries: 2
|
|
||||||
location-registry:
|
location-registry:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/location-registry
|
module: dnd/location-registry
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
module: dnd/location-registry
|
module: dnd/location-registry
|
||||||
retries: 2
|
|
||||||
scene-descriptions:
|
scene-descriptions:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/scene-descriptions
|
module: dnd/scene-descriptions
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
@@ -147,7 +111,6 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
item-occurrences:
|
item-occurrences:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/item-occurrences
|
module: dnd/item-occurrences
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
@@ -155,7 +118,6 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
spells:
|
spells:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/spells
|
module: dnd/spells
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
@@ -163,7 +125,6 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
combat-turns:
|
combat-turns:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/combat-turns
|
module: dnd/combat-turns
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
@@ -171,7 +132,6 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
npc-occurrences:
|
npc-occurrences:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/npc-occurrences
|
module: dnd/npc-occurrences
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
@@ -179,7 +139,6 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
location-occurrences:
|
location-occurrences:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/location-occurrences
|
module: dnd/location-occurrences
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
@@ -206,18 +165,15 @@ dnd_pipeline_notarius_pipelines:
|
|||||||
enemy-events:
|
enemy-events:
|
||||||
extract:
|
extract:
|
||||||
module: dnd/enemy-events
|
module: dnd/enemy-events
|
||||||
retries: 2
|
|
||||||
merge:
|
merge:
|
||||||
module: appendorder
|
module: appendorder
|
||||||
normalize:
|
normalize:
|
||||||
module: dnd/enemy-events
|
module: dnd/enemy-events
|
||||||
|
cache: auto
|
||||||
dnd_pipeline_notarius_cache_root: /var/cache/notarius
|
dnd_pipeline_notarius_cache_root: /var/cache/notarius
|
||||||
dnd_pipeline_notarius_cache_chunk_plans_mode: auto
|
|
||||||
dnd_pipeline_notarius_cache_checkpoints_enabled: true
|
|
||||||
dnd_pipeline_notarius_testing_llm_profile: gpt-luna-latest
|
dnd_pipeline_notarius_testing_llm_profile: gpt-luna-latest
|
||||||
dnd_pipeline_notarius_promptkit_transient_retries: null
|
|
||||||
dnd_pipeline_scriptorium_transient_retries: null
|
dnd_pipeline_scriptorium_transient_retries: null
|
||||||
dnd_pipeline_narratio_workspace_cleanup_after_publish: true
|
dnd_pipeline_narratio_workspace_cleanup_after_publish: false
|
||||||
dnd_pipeline_narratio_storage_backend: s3
|
dnd_pipeline_narratio_storage_backend: s3
|
||||||
dnd_pipeline_narratio_storage_s3_bucket: rakestraw-assets
|
dnd_pipeline_narratio_storage_s3_bucket: rakestraw-assets
|
||||||
dnd_pipeline_narratio_storage_s3_root_prefix: dnd
|
dnd_pipeline_narratio_storage_s3_root_prefix: dnd
|
||||||
@@ -226,7 +182,6 @@ dnd_pipeline_narratio_storage_s3_endpoint: https://s3.us-east-005.backblazeb2.co
|
|||||||
dnd_pipeline_narratio_storage_s3_force_path_style: true
|
dnd_pipeline_narratio_storage_s3_force_path_style: true
|
||||||
dnd_pipeline_narratio_storage_s3_access_key_id: OBJECT_STORAGE_KEY_ID
|
dnd_pipeline_narratio_storage_s3_access_key_id: OBJECT_STORAGE_KEY_ID
|
||||||
dnd_pipeline_narratio_storage_s3_secret_access_key: OBJECT_STORAGE_KEY
|
dnd_pipeline_narratio_storage_s3_secret_access_key: OBJECT_STORAGE_KEY
|
||||||
dnd_pipeline_narratio_cache_s3_audio: true
|
|
||||||
dnd_pipeline_narratio_publish_enabled: true
|
dnd_pipeline_narratio_publish_enabled: true
|
||||||
dnd_pipeline_narratio_publish_upload_run: true
|
dnd_pipeline_narratio_publish_upload_run: true
|
||||||
dnd_pipeline_narratio_publish_outputs:
|
dnd_pipeline_narratio_publish_outputs:
|
||||||
@@ -257,72 +212,33 @@ dnd_pipeline_narratio_audita_credentials:
|
|||||||
- AUDITA_LLM_API_KEY
|
- AUDITA_LLM_API_KEY
|
||||||
dnd_pipeline_narratio_notarius_credentials:
|
dnd_pipeline_narratio_notarius_credentials:
|
||||||
- OPENROUTER_API_KEY
|
- OPENROUTER_API_KEY
|
||||||
dnd_pipeline_narratio_notarius_resume: true
|
dnd_pipeline_narratio_scriptorium_credentials:
|
||||||
|
- OPENROUTER_API_KEY
|
||||||
dnd_pipeline_narratio_notarius_references:
|
dnd_pipeline_narratio_notarius_references:
|
||||||
party: narratio.input.party
|
party: narratio.input.party
|
||||||
players: narratio.input.players
|
glossary: narratio.input.glossary.combined
|
||||||
glossary: narratio.input.glossary
|
spell_catalog: narratio.input.glossary.combined
|
||||||
dnd_pipeline_narratio_notarius_outputs:
|
dnd_pipeline_narratio_notarius_outputs:
|
||||||
item_registry:
|
item_registry:
|
||||||
lane_id: item-registry
|
lane_id: item-registry
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.item_registry
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/item-registry
|
|
||||||
npc_registry:
|
npc_registry:
|
||||||
lane_id: npc-registry
|
lane_id: npc-registry
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.npc_registry
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/npc-registry
|
|
||||||
location_registry:
|
location_registry:
|
||||||
lane_id: location-registry
|
lane_id: location-registry
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.location_registry
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/location-registry
|
|
||||||
scene_descriptions:
|
scene_descriptions:
|
||||||
lane_id: scene-descriptions
|
lane_id: scene-descriptions
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.scene_descriptions
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/scene-descriptions
|
|
||||||
item_occurrences:
|
item_occurrences:
|
||||||
lane_id: item-occurrences
|
lane_id: item-occurrences
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.item_occurrences
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/item-occurrences
|
|
||||||
spells:
|
spells:
|
||||||
lane_id: spells
|
lane_id: spells
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.spells
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/spells
|
|
||||||
combat_turns:
|
combat_turns:
|
||||||
lane_id: combat-turns
|
lane_id: combat-turns
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.combat_turns
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/combat-turns
|
|
||||||
npc_occurrences:
|
npc_occurrences:
|
||||||
lane_id: npc-occurrences
|
lane_id: npc-occurrences
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.npc_occurrences
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/npc-occurrences
|
|
||||||
location_occurrences:
|
location_occurrences:
|
||||||
lane_id: location-occurrences
|
lane_id: location-occurrences
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.location_occurrences
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/location-occurrences
|
|
||||||
enemy_events:
|
enemy_events:
|
||||||
lane_id: enemy-events
|
lane_id: enemy-events
|
||||||
media_type: application/json
|
|
||||||
schema_id: notarius.dnd.enemy_events
|
|
||||||
schema_version: v1
|
|
||||||
module_key: dnd/enemy-events
|
|
||||||
dnd_pipeline_narratio_render_enabled: true
|
dnd_pipeline_narratio_render_enabled: true
|
||||||
dnd_pipeline_narratio_render_format: markdown
|
dnd_pipeline_narratio_render_format: markdown
|
||||||
dnd_pipeline_narratio_session_recap_artifact:
|
dnd_pipeline_narratio_session_recap_artifact:
|
||||||
@@ -333,9 +249,12 @@ dnd_pipeline_narratio_session_recap_artifact:
|
|||||||
transcript:
|
transcript:
|
||||||
source: narratio.transcript.final_trimmed
|
source: narratio.transcript.final_trimmed
|
||||||
required: true
|
required: true
|
||||||
recap:
|
players:
|
||||||
source: narratio.previous_session.artifact.session_recap
|
source: narratio.input.players
|
||||||
required: false
|
required: true
|
||||||
|
party:
|
||||||
|
source: narratio.input.party
|
||||||
|
required: true
|
||||||
dnd_pipeline_narratio_hostile_rumors_artifact:
|
dnd_pipeline_narratio_hostile_rumors_artifact:
|
||||||
enabled: true
|
enabled: true
|
||||||
prompt_id: dnd.hostile_rumors
|
prompt_id: dnd.hostile_rumors
|
||||||
@@ -360,19 +279,77 @@ dnd_pipeline_narratio_scene_map_artifact:
|
|||||||
transcript:
|
transcript:
|
||||||
source: narratio.transcript.final_trimmed
|
source: narratio.transcript.final_trimmed
|
||||||
required: true
|
required: true
|
||||||
|
players:
|
||||||
|
source: narratio.input.players
|
||||||
|
required: true
|
||||||
|
party:
|
||||||
|
source: narratio.input.party
|
||||||
|
required: true
|
||||||
dnd_pipeline_narratio_character_analysis_family:
|
dnd_pipeline_narratio_character_analysis_family:
|
||||||
enabled: false
|
enabled: false
|
||||||
for_each: party.characters
|
for_each: party.characters
|
||||||
prompt_id: dnd.character_meta_analysis
|
prompt_id: dnd.character_meta_analysis
|
||||||
output_path_pattern: artifacts/character_meta_analysis/{character_id}.md
|
output_path_pattern: artifacts/character_meta_analysis_{character_id}.md
|
||||||
inputs:
|
inputs:
|
||||||
transcript:
|
transcript:
|
||||||
source: narratio.transcript.final_trimmed
|
source: narratio.transcript.final_trimmed
|
||||||
required: true
|
required: true
|
||||||
recap:
|
players:
|
||||||
source: narratio.previous_session.artifact.session_recap
|
source: narratio.input.players
|
||||||
required: false
|
required: true
|
||||||
|
party:
|
||||||
|
source: narratio.input.party
|
||||||
|
required: true
|
||||||
member_vars:
|
member_vars:
|
||||||
character_name: character.name
|
character_name: character.name
|
||||||
character_class: character.class_summary
|
character_class: character.class_summary
|
||||||
dnd_pipeline_narratio_testing_scriptorium_profile: gemini-flash-latest
|
dnd_pipeline_narratio_testing_scriptorium_profile: gemini-flash-latest
|
||||||
|
dnd_pipeline_audita_pipeline_stages:
|
||||||
|
- module: glossary
|
||||||
|
- module: homophones
|
||||||
|
- module: glossary
|
||||||
|
- module: spoken_word
|
||||||
|
- module: grammar
|
||||||
|
dnd_pipeline_audita_promptkit_backends:
|
||||||
|
- id: dnd
|
||||||
|
endpoint: https://inference.ai.rakestrawhome.com/v1
|
||||||
|
api_key_env: AUDITA_LLM_API_KEY
|
||||||
|
concurrency_limit: 4
|
||||||
|
dnd_pipeline_audita_promptkit_profiles:
|
||||||
|
- id: dnd-proposal
|
||||||
|
backend: dnd
|
||||||
|
model: google/gemma-4-31b-it
|
||||||
|
timeout_seconds: 900
|
||||||
|
- id: dnd-validation
|
||||||
|
backend: dnd
|
||||||
|
model: google/gemma-4-31b-it
|
||||||
|
timeout_seconds: 900
|
||||||
|
dnd_pipeline_audita_glossary_collections:
|
||||||
|
party:
|
||||||
|
entries: []
|
||||||
|
campaign:
|
||||||
|
entries: []
|
||||||
|
setting:
|
||||||
|
entries: []
|
||||||
|
spells:
|
||||||
|
entries: []
|
||||||
|
dnd_pipeline_audita_glossaries:
|
||||||
|
- party
|
||||||
|
- campaign
|
||||||
|
- setting
|
||||||
|
- spells
|
||||||
|
dnd_pipeline_audita_protected_terms: null
|
||||||
|
dnd_pipeline_audita_llm_correction_repair_profile: null
|
||||||
|
dnd_pipeline_audita_llm_correction_repair_attempts: null
|
||||||
|
dnd_pipeline_notarius_promptkit_backends: null
|
||||||
|
dnd_pipeline_notarius_promptkit_profiles: null
|
||||||
|
dnd_pipeline_notarius_promptkit_collections: null
|
||||||
|
dnd_pipeline_scriptorium_promptkit_backends: null
|
||||||
|
dnd_pipeline_scriptorium_promptkit_profiles: null
|
||||||
|
dnd_pipeline_scriptorium_promptkit_collections: null
|
||||||
|
dnd_pipeline_narratio_notarius_cache: null
|
||||||
|
dnd_pipeline_reference_catalog_repository_url: null
|
||||||
|
dnd_pipeline_reference_catalog_revision: null
|
||||||
|
dnd_pipeline_reference_catalog_root: /usr/local/etc/narratio/reference-catalog
|
||||||
|
dnd_pipeline_narratio_reference_catalog_settings: null
|
||||||
|
dnd_pipeline_narratio_reference_catalog_systems: null
|
||||||
|
|||||||
@@ -88,23 +88,10 @@ argument_specs:
|
|||||||
type: path
|
type: path
|
||||||
required: true
|
required: true
|
||||||
description: Prompt-library checkout root.
|
description: Prompt-library checkout root.
|
||||||
dnd_pipeline_audita_pipeline_modules:
|
|
||||||
type: list
|
|
||||||
elements: str
|
|
||||||
required: true
|
|
||||||
description: Ordered Audita processing modules.
|
|
||||||
dnd_pipeline_audita_output_schema:
|
dnd_pipeline_audita_output_schema:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
description: Audita output schema shared with Narratio.
|
description: Audita output schema shared with Narratio.
|
||||||
dnd_pipeline_audita_backends:
|
|
||||||
type: dict
|
|
||||||
required: true
|
|
||||||
description: Native Audita backend definitions.
|
|
||||||
dnd_pipeline_audita_profiles:
|
|
||||||
type: dict
|
|
||||||
required: true
|
|
||||||
description: Native Audita profiles keyed by filename-safe IDs matching each mapping's id.
|
|
||||||
dnd_pipeline_audita_llm_proposal_profile:
|
dnd_pipeline_audita_llm_proposal_profile:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
@@ -117,10 +104,6 @@ argument_specs:
|
|||||||
type: int
|
type: int
|
||||||
required: false
|
required: false
|
||||||
description: Optional Audita transient retry override.
|
description: Optional Audita transient retry override.
|
||||||
dnd_pipeline_audita_llm_repair_attempts:
|
|
||||||
type: int
|
|
||||||
required: false
|
|
||||||
description: Optional Audita repair attempt override.
|
|
||||||
dnd_pipeline_audita_llm_operation_timeout:
|
dnd_pipeline_audita_llm_operation_timeout:
|
||||||
type: str
|
type: str
|
||||||
required: false
|
required: false
|
||||||
@@ -153,22 +136,6 @@ argument_specs:
|
|||||||
type: int
|
type: int
|
||||||
required: true
|
required: true
|
||||||
description: Audita maximum segment tokens.
|
description: Audita maximum segment tokens.
|
||||||
dnd_pipeline_audita_thresholds_glossary:
|
|
||||||
type: float
|
|
||||||
required: true
|
|
||||||
description: Audita glossary confidence threshold.
|
|
||||||
dnd_pipeline_audita_thresholds_homophones:
|
|
||||||
type: float
|
|
||||||
required: true
|
|
||||||
description: Audita homophone confidence threshold.
|
|
||||||
dnd_pipeline_audita_thresholds_spoken_word:
|
|
||||||
type: float
|
|
||||||
required: true
|
|
||||||
description: Audita spoken-word confidence threshold.
|
|
||||||
dnd_pipeline_audita_thresholds_grammar:
|
|
||||||
type: float
|
|
||||||
required: true
|
|
||||||
description: Audita grammar confidence threshold.
|
|
||||||
dnd_pipeline_audita_context_description:
|
dnd_pipeline_audita_context_description:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
@@ -185,22 +152,10 @@ argument_specs:
|
|||||||
type: path
|
type: path
|
||||||
required: true
|
required: true
|
||||||
description: Shared root for Notarius cache state.
|
description: Shared root for Notarius cache state.
|
||||||
dnd_pipeline_notarius_cache_chunk_plans_mode:
|
|
||||||
type: str
|
|
||||||
required: true
|
|
||||||
description: Notarius chunk-plan cache policy.
|
|
||||||
dnd_pipeline_notarius_cache_checkpoints_enabled:
|
|
||||||
type: bool
|
|
||||||
required: true
|
|
||||||
description: Whether Notarius records checkpoints.
|
|
||||||
dnd_pipeline_notarius_testing_llm_profile:
|
dnd_pipeline_notarius_testing_llm_profile:
|
||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
description: Notarius LLM profile selected by the testing overlay.
|
description: Notarius LLM profile selected by the testing overlay.
|
||||||
dnd_pipeline_notarius_promptkit_transient_retries:
|
|
||||||
type: int
|
|
||||||
required: false
|
|
||||||
description: Optional Notarius PromptKit transient retry override.
|
|
||||||
dnd_pipeline_scriptorium_transient_retries:
|
dnd_pipeline_scriptorium_transient_retries:
|
||||||
type: int
|
type: int
|
||||||
required: false
|
required: false
|
||||||
@@ -241,10 +196,6 @@ argument_specs:
|
|||||||
type: str
|
type: str
|
||||||
required: false
|
required: false
|
||||||
description: Nullable secret-key environment-variable reference.
|
description: Nullable secret-key environment-variable reference.
|
||||||
dnd_pipeline_narratio_cache_s3_audio:
|
|
||||||
type: bool
|
|
||||||
required: true
|
|
||||||
description: Whether Narratio caches downloaded S3 audio.
|
|
||||||
dnd_pipeline_narratio_publish_enabled:
|
dnd_pipeline_narratio_publish_enabled:
|
||||||
type: bool
|
type: bool
|
||||||
required: true
|
required: true
|
||||||
@@ -303,10 +254,11 @@ argument_specs:
|
|||||||
elements: str
|
elements: str
|
||||||
required: true
|
required: true
|
||||||
description: Credential names forwarded by Narratio to Notarius.
|
description: Credential names forwarded by Narratio to Notarius.
|
||||||
dnd_pipeline_narratio_notarius_resume:
|
dnd_pipeline_narratio_scriptorium_credentials:
|
||||||
type: bool
|
type: list
|
||||||
required: true
|
elements: str
|
||||||
description: Whether ordinary Narratio extraction requests Notarius checkpoint reuse.
|
required: false
|
||||||
|
description: Optional credential names forwarded by Narratio to Scriptorium.
|
||||||
dnd_pipeline_narratio_notarius_references:
|
dnd_pipeline_narratio_notarius_references:
|
||||||
type: dict
|
type: dict
|
||||||
required: true
|
required: true
|
||||||
@@ -347,3 +299,92 @@ argument_specs:
|
|||||||
type: str
|
type: str
|
||||||
required: true
|
required: true
|
||||||
description: Scriptorium profile selected by the testing overlay.
|
description: Scriptorium profile selected by the testing overlay.
|
||||||
|
dnd_pipeline_audita_pipeline_stages:
|
||||||
|
type: list
|
||||||
|
elements: dict
|
||||||
|
required: true
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_audita_promptkit_backends:
|
||||||
|
type: list
|
||||||
|
elements: dict
|
||||||
|
required: true
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_audita_promptkit_profiles:
|
||||||
|
type: list
|
||||||
|
elements: dict
|
||||||
|
required: true
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_audita_glossary_collections:
|
||||||
|
type: dict
|
||||||
|
required: true
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_audita_glossaries:
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
|
required: true
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_audita_protected_terms:
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_audita_llm_correction_repair_profile:
|
||||||
|
type: str
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_audita_llm_correction_repair_attempts:
|
||||||
|
type: int
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_notarius_promptkit_backends:
|
||||||
|
type: list
|
||||||
|
elements: dict
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_notarius_promptkit_profiles:
|
||||||
|
type: list
|
||||||
|
elements: dict
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_notarius_promptkit_collections:
|
||||||
|
type: dict
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_scriptorium_promptkit_backends:
|
||||||
|
type: list
|
||||||
|
elements: dict
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_scriptorium_promptkit_profiles:
|
||||||
|
type: list
|
||||||
|
elements: dict
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_scriptorium_promptkit_collections:
|
||||||
|
type: dict
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_narratio_notarius_cache:
|
||||||
|
type: str
|
||||||
|
required: false
|
||||||
|
description: Native suite configuration input.
|
||||||
|
dnd_pipeline_reference_catalog_repository_url:
|
||||||
|
type: str
|
||||||
|
required: false
|
||||||
|
description: Optional reference catalog Git origin.
|
||||||
|
dnd_pipeline_reference_catalog_revision:
|
||||||
|
type: str
|
||||||
|
required: false
|
||||||
|
description: Revision selected for a managed reference catalog.
|
||||||
|
dnd_pipeline_reference_catalog_root:
|
||||||
|
type: path
|
||||||
|
required: true
|
||||||
|
description: Catalog checkout inside the Narratio configuration directory.
|
||||||
|
dnd_pipeline_narratio_reference_catalog_settings:
|
||||||
|
type: dict
|
||||||
|
required: false
|
||||||
|
description: Optional caller-managed setting vocabulary map.
|
||||||
|
dnd_pipeline_narratio_reference_catalog_systems:
|
||||||
|
type: dict
|
||||||
|
required: false
|
||||||
|
description: Optional caller-managed system vocabulary map.
|
||||||
|
|||||||
@@ -25,20 +25,29 @@ dependencies:
|
|||||||
narratio_go_binary: "{{ dnd_pipeline_go_binary }}"
|
narratio_go_binary: "{{ dnd_pipeline_go_binary }}"
|
||||||
narratio_user: "{{ dnd_pipeline_runtime_user }}"
|
narratio_user: "{{ dnd_pipeline_runtime_user }}"
|
||||||
narratio_group: "{{ dnd_pipeline_runtime_group }}"
|
narratio_group: "{{ dnd_pipeline_runtime_group }}"
|
||||||
narratio_config_path: /usr/local/etc/narratio/pipeline.yml
|
narratio_config_path: /usr/local/etc/narratio/narratio.yml
|
||||||
narratio_config_owner: "{{ dnd_pipeline_runtime_user }}"
|
narratio_config_owner: "{{ dnd_pipeline_runtime_user }}"
|
||||||
narratio_config_group: "{{ dnd_pipeline_runtime_group }}"
|
narratio_config_group: "{{ dnd_pipeline_runtime_group }}"
|
||||||
narratio_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
narratio_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
||||||
narratio_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
narratio_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
||||||
narratio_whisperx_transcribe_url: "{{ dnd_pipeline_whisperx_transcribe_url }}"
|
narratio_whisperx_transcribe_url: "{{ dnd_pipeline_whisperx_transcribe_url }}"
|
||||||
narratio_campaigns_root: "{{ dnd_pipeline_campaigns_root }}"
|
narratio_campaigns_root: "{{ dnd_pipeline_campaigns_root }}"
|
||||||
narratio_configkit_imports:
|
narratio_config_imports: >-
|
||||||
- path: conf.d/processing.yml
|
{{
|
||||||
- path: artifacts/session-recap.yml
|
[
|
||||||
- path: artifacts/hostile-rumors.yml
|
{'path': 'conf.d/processing.yml', 'required': true},
|
||||||
- path: artifacts/deranged-rumors.yml
|
{'path': 'artifacts/session-recap.yml', 'required': true},
|
||||||
- path: artifacts/scene-map.yml
|
{'path': 'artifacts/hostile-rumors.yml', 'required': true},
|
||||||
- path: artifact-families/character-meta-analysis.yml
|
{'path': 'artifacts/deranged-rumors.yml', 'required': true},
|
||||||
|
{'path': 'artifacts/scene-map.yml', 'required': true},
|
||||||
|
{'path': 'artifact-families/character-meta-analysis.yml', 'required': true}
|
||||||
|
] +
|
||||||
|
([{'path': (dnd_pipeline_reference_catalog_root ~ '/catalog.yml') | relpath('/usr/local/etc/narratio'), 'required': true}]
|
||||||
|
if dnd_pipeline_reference_catalog_repository_url is not none else [])
|
||||||
|
}}
|
||||||
|
narratio_reference_catalog_settings: "{{ dnd_pipeline_narratio_reference_catalog_settings }}"
|
||||||
|
narratio_reference_catalog_systems: "{{ dnd_pipeline_narratio_reference_catalog_systems }}"
|
||||||
|
narratio_config_secrets_dir: secrets
|
||||||
narratio_workspace_cleanup_after_publish: "{{ dnd_pipeline_narratio_workspace_cleanup_after_publish }}"
|
narratio_workspace_cleanup_after_publish: "{{ dnd_pipeline_narratio_workspace_cleanup_after_publish }}"
|
||||||
narratio_storage_backend: "{{ dnd_pipeline_narratio_storage_backend }}"
|
narratio_storage_backend: "{{ dnd_pipeline_narratio_storage_backend }}"
|
||||||
narratio_storage_s3_bucket: "{{ dnd_pipeline_narratio_storage_s3_bucket }}"
|
narratio_storage_s3_bucket: "{{ dnd_pipeline_narratio_storage_s3_bucket }}"
|
||||||
@@ -48,7 +57,6 @@ dependencies:
|
|||||||
narratio_storage_s3_force_path_style: "{{ dnd_pipeline_narratio_storage_s3_force_path_style }}"
|
narratio_storage_s3_force_path_style: "{{ dnd_pipeline_narratio_storage_s3_force_path_style }}"
|
||||||
narratio_storage_s3_access_key_id: "{{ dnd_pipeline_narratio_storage_s3_access_key_id }}"
|
narratio_storage_s3_access_key_id: "{{ dnd_pipeline_narratio_storage_s3_access_key_id }}"
|
||||||
narratio_storage_s3_secret_access_key: "{{ dnd_pipeline_narratio_storage_s3_secret_access_key }}"
|
narratio_storage_s3_secret_access_key: "{{ dnd_pipeline_narratio_storage_s3_secret_access_key }}"
|
||||||
narratio_cache_s3_audio: "{{ dnd_pipeline_narratio_cache_s3_audio }}"
|
|
||||||
narratio_publish_enabled: "{{ dnd_pipeline_narratio_publish_enabled }}"
|
narratio_publish_enabled: "{{ dnd_pipeline_narratio_publish_enabled }}"
|
||||||
narratio_publish_upload_run: "{{ dnd_pipeline_narratio_publish_upload_run }}"
|
narratio_publish_upload_run: "{{ dnd_pipeline_narratio_publish_upload_run }}"
|
||||||
narratio_publish_outputs: "{{ dnd_pipeline_narratio_publish_outputs }}"
|
narratio_publish_outputs: "{{ dnd_pipeline_narratio_publish_outputs }}"
|
||||||
@@ -62,11 +70,12 @@ dependencies:
|
|||||||
narratio_notarius_pipeline_id: "{{ dnd_pipeline_narratio_notarius_pipeline_id }}"
|
narratio_notarius_pipeline_id: "{{ dnd_pipeline_narratio_notarius_pipeline_id }}"
|
||||||
narratio_notarius_working_directory: /usr/local/etc/notarius
|
narratio_notarius_working_directory: /usr/local/etc/notarius
|
||||||
narratio_notarius_credentials: "{{ dnd_pipeline_narratio_notarius_credentials }}"
|
narratio_notarius_credentials: "{{ dnd_pipeline_narratio_notarius_credentials }}"
|
||||||
narratio_notarius_resume: "{{ dnd_pipeline_narratio_notarius_resume }}"
|
narratio_notarius_cache: "{{ dnd_pipeline_narratio_notarius_cache }}"
|
||||||
narratio_notarius_references: "{{ dnd_pipeline_narratio_notarius_references }}"
|
narratio_notarius_references: "{{ dnd_pipeline_narratio_notarius_references }}"
|
||||||
narratio_notarius_outputs: "{{ dnd_pipeline_narratio_notarius_outputs }}"
|
narratio_notarius_outputs: "{{ dnd_pipeline_narratio_notarius_outputs }}"
|
||||||
narratio_scriptorium_binary: /usr/local/bin/scriptorium
|
narratio_scriptorium_binary: /usr/local/bin/scriptorium
|
||||||
narratio_scriptorium_config_path: /usr/local/etc/scriptorium/config.yml
|
narratio_scriptorium_config_path: /usr/local/etc/scriptorium/config.yml
|
||||||
|
narratio_scriptorium_credentials: "{{ dnd_pipeline_narratio_scriptorium_credentials }}"
|
||||||
- role: rakestraw.seriatim
|
- role: rakestraw.seriatim
|
||||||
vars:
|
vars:
|
||||||
seriatim_version: "{{ dnd_pipeline_seriatim_version }}"
|
seriatim_version: "{{ dnd_pipeline_seriatim_version }}"
|
||||||
@@ -83,14 +92,18 @@ dependencies:
|
|||||||
audita_config_group: "{{ dnd_pipeline_runtime_group }}"
|
audita_config_group: "{{ dnd_pipeline_runtime_group }}"
|
||||||
audita_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
audita_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
||||||
audita_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
audita_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
||||||
audita_pipeline_modules: "{{ dnd_pipeline_audita_pipeline_modules }}"
|
audita_pipeline_stages: "{{ dnd_pipeline_audita_pipeline_stages }}"
|
||||||
|
audita_promptkit_backends: "{{ dnd_pipeline_audita_promptkit_backends }}"
|
||||||
|
audita_promptkit_profiles: "{{ dnd_pipeline_audita_promptkit_profiles }}"
|
||||||
|
audita_glossary_collections: "{{ dnd_pipeline_audita_glossary_collections }}"
|
||||||
|
audita_glossaries: "{{ dnd_pipeline_audita_glossaries }}"
|
||||||
|
audita_protected_terms: "{{ dnd_pipeline_audita_protected_terms }}"
|
||||||
|
audita_llm_correction_repair_profile: "{{ dnd_pipeline_audita_llm_correction_repair_profile }}"
|
||||||
|
audita_llm_correction_repair_attempts: "{{ dnd_pipeline_audita_llm_correction_repair_attempts }}"
|
||||||
audita_output_schema: "{{ dnd_pipeline_audita_output_schema }}"
|
audita_output_schema: "{{ dnd_pipeline_audita_output_schema }}"
|
||||||
audita_backends: "{{ dnd_pipeline_audita_backends }}"
|
|
||||||
audita_profiles_dir: /usr/local/etc/audita/profiles
|
|
||||||
audita_llm_proposal_profile: "{{ dnd_pipeline_audita_llm_proposal_profile }}"
|
audita_llm_proposal_profile: "{{ dnd_pipeline_audita_llm_proposal_profile }}"
|
||||||
audita_llm_validation_profile: "{{ dnd_pipeline_audita_llm_validation_profile }}"
|
audita_llm_validation_profile: "{{ dnd_pipeline_audita_llm_validation_profile }}"
|
||||||
audita_llm_transient_retries: "{{ dnd_pipeline_audita_llm_transient_retries }}"
|
audita_llm_transient_retries: "{{ dnd_pipeline_audita_llm_transient_retries }}"
|
||||||
audita_llm_repair_attempts: "{{ dnd_pipeline_audita_llm_repair_attempts }}"
|
|
||||||
audita_llm_operation_timeout: "{{ dnd_pipeline_audita_llm_operation_timeout }}"
|
audita_llm_operation_timeout: "{{ dnd_pipeline_audita_llm_operation_timeout }}"
|
||||||
audita_chunking_target_sections: "{{ dnd_pipeline_audita_chunking_target_sections }}"
|
audita_chunking_target_sections: "{{ dnd_pipeline_audita_chunking_target_sections }}"
|
||||||
audita_chunking_max_section_tokens: "{{ dnd_pipeline_audita_chunking_max_section_tokens }}"
|
audita_chunking_max_section_tokens: "{{ dnd_pipeline_audita_chunking_max_section_tokens }}"
|
||||||
@@ -99,10 +112,6 @@ dependencies:
|
|||||||
audita_normalization_ellipsis_gap: "{{ dnd_pipeline_audita_normalization_ellipsis_gap }}"
|
audita_normalization_ellipsis_gap: "{{ dnd_pipeline_audita_normalization_ellipsis_gap }}"
|
||||||
audita_normalization_max_segment_duration: "{{ dnd_pipeline_audita_normalization_max_segment_duration }}"
|
audita_normalization_max_segment_duration: "{{ dnd_pipeline_audita_normalization_max_segment_duration }}"
|
||||||
audita_normalization_max_segment_tokens: "{{ dnd_pipeline_audita_normalization_max_segment_tokens }}"
|
audita_normalization_max_segment_tokens: "{{ dnd_pipeline_audita_normalization_max_segment_tokens }}"
|
||||||
audita_thresholds_glossary: "{{ dnd_pipeline_audita_thresholds_glossary }}"
|
|
||||||
audita_thresholds_homophones: "{{ dnd_pipeline_audita_thresholds_homophones }}"
|
|
||||||
audita_thresholds_spoken_word: "{{ dnd_pipeline_audita_thresholds_spoken_word }}"
|
|
||||||
audita_thresholds_grammar: "{{ dnd_pipeline_audita_thresholds_grammar }}"
|
|
||||||
audita_context_description: "{{ dnd_pipeline_audita_context_description }}"
|
audita_context_description: "{{ dnd_pipeline_audita_context_description }}"
|
||||||
audita_diagnostics_work_dir: "{{ dnd_pipeline_audita_diagnostics_work_dir }}"
|
audita_diagnostics_work_dir: "{{ dnd_pipeline_audita_diagnostics_work_dir }}"
|
||||||
- role: rakestraw.notarius
|
- role: rakestraw.notarius
|
||||||
@@ -115,13 +124,13 @@ dependencies:
|
|||||||
notarius_config_group: "{{ dnd_pipeline_runtime_group }}"
|
notarius_config_group: "{{ dnd_pipeline_runtime_group }}"
|
||||||
notarius_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
notarius_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
||||||
notarius_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
notarius_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
||||||
notarius_configkit_imports:
|
notarius_config_imports:
|
||||||
- path: pipelines/dnd-session.yml
|
- path: pipelines/dnd-session.yml
|
||||||
notarius_cache_chunk_plans_mode: "{{ dnd_pipeline_notarius_cache_chunk_plans_mode }}"
|
required: true
|
||||||
notarius_cache_chunk_plans_directory: "{{ dnd_pipeline_notarius_cache_root ~ '/chunk-plans' }}"
|
notarius_cache_directory: "{{ dnd_pipeline_notarius_cache_root }}"
|
||||||
notarius_cache_checkpoints_enabled: "{{ dnd_pipeline_notarius_cache_checkpoints_enabled }}"
|
notarius_promptkit_backends: "{{ dnd_pipeline_notarius_promptkit_backends }}"
|
||||||
notarius_cache_checkpoints_directory: "{{ dnd_pipeline_notarius_cache_root ~ '/checkpoints' }}"
|
notarius_promptkit_profiles: "{{ dnd_pipeline_notarius_promptkit_profiles }}"
|
||||||
notarius_promptkit_transient_retries: "{{ dnd_pipeline_notarius_promptkit_transient_retries }}"
|
notarius_promptkit_collections: "{{ dnd_pipeline_notarius_promptkit_collections }}"
|
||||||
- role: rakestraw.scriptorium
|
- role: rakestraw.scriptorium
|
||||||
vars:
|
vars:
|
||||||
scriptorium_version: "{{ dnd_pipeline_scriptorium_version }}"
|
scriptorium_version: "{{ dnd_pipeline_scriptorium_version }}"
|
||||||
@@ -132,6 +141,11 @@ dependencies:
|
|||||||
scriptorium_config_group: "{{ dnd_pipeline_runtime_group }}"
|
scriptorium_config_group: "{{ dnd_pipeline_runtime_group }}"
|
||||||
scriptorium_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
scriptorium_config_directory_mode: "{{ dnd_pipeline_config_directory_mode }}"
|
||||||
scriptorium_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
scriptorium_config_file_mode: "{{ dnd_pipeline_config_file_mode }}"
|
||||||
scriptorium_prompt_dir: "{{ dnd_pipeline_prompt_library_root ~ '/prompts' }}"
|
scriptorium_config_imports:
|
||||||
scriptorium_schema_dir: "{{ dnd_pipeline_prompt_library_root ~ '/schemas' }}"
|
- path: "{{ (dnd_pipeline_prompt_library_root ~ '/promptkit.yml') | relpath('/usr/local/etc/scriptorium') }}"
|
||||||
|
destination: [promptkit]
|
||||||
|
required: true
|
||||||
|
scriptorium_promptkit_backends: "{{ dnd_pipeline_scriptorium_promptkit_backends }}"
|
||||||
|
scriptorium_promptkit_profiles: "{{ dnd_pipeline_scriptorium_promptkit_profiles }}"
|
||||||
|
scriptorium_promptkit_collections: "{{ dnd_pipeline_scriptorium_promptkit_collections }}"
|
||||||
scriptorium_transient_retries: "{{ dnd_pipeline_scriptorium_transient_retries }}"
|
scriptorium_transient_retries: "{{ dnd_pipeline_scriptorium_transient_retries }}"
|
||||||
|
|||||||
@@ -7,16 +7,16 @@ roles:
|
|||||||
- name: rakestraw.audita
|
- name: rakestraw.audita
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-audita.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-audita.git
|
||||||
scm: git
|
scm: git
|
||||||
version: c3dd59f5ac9b942306ffe540ae9e71d493998137
|
version: v0.2.0
|
||||||
- name: rakestraw.notarius
|
- name: rakestraw.notarius
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-notarius.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-notarius.git
|
||||||
scm: git
|
scm: git
|
||||||
version: 6aef48b7e12e3651971444b8c224d96ff1879e6c
|
version: v0.2.0
|
||||||
- name: rakestraw.scriptorium
|
- name: rakestraw.scriptorium
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-scriptorium.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-scriptorium.git
|
||||||
scm: git
|
scm: git
|
||||||
version: b174c8c2990bb79f8149d8f288c5e06ccb42bd73
|
version: v0.2.0
|
||||||
- name: rakestraw.narratio
|
- name: rakestraw.narratio
|
||||||
src: https://gitea.maximumdirect.net/eric/ansible-role-narratio.git
|
src: https://gitea.maximumdirect.net/eric/ansible-role-narratio.git
|
||||||
scm: git
|
scm: git
|
||||||
version: 3c0700b5323293d44e3b1e67a50074d82d7a3bff
|
version: v0.2.0
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
state: present
|
state: present
|
||||||
loop: >-
|
loop: >-
|
||||||
{{
|
{{
|
||||||
['/var/lib/narratio', '/var/spool/narratio', '/var/cache/narratio', dnd_pipeline_notarius_cache_root] |
|
['/var/lib/narratio', dnd_pipeline_notarius_cache_root] |
|
||||||
product([
|
product([
|
||||||
{'etype': 'user', 'permissions': 'rwx'},
|
{'etype': 'user', 'permissions': 'rwx'},
|
||||||
{'etype': 'group', 'permissions': 'rwx'},
|
{'etype': 'group', 'permissions': 'rwx'},
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
state: present
|
state: present
|
||||||
loop: >-
|
loop: >-
|
||||||
{{
|
{{
|
||||||
['/var/lib/narratio', '/var/spool/narratio', '/var/cache/narratio', dnd_pipeline_notarius_cache_root] |
|
['/var/lib/narratio', dnd_pipeline_notarius_cache_root] |
|
||||||
product([
|
product([
|
||||||
{'etype': 'user', 'permissions': 'rwx'},
|
{'etype': 'user', 'permissions': 'rwx'},
|
||||||
{'etype': 'group', 'permissions': 'rwx'},
|
{'etype': 'group', 'permissions': 'rwx'},
|
||||||
@@ -132,6 +132,34 @@
|
|||||||
update: true
|
update: true
|
||||||
force: true
|
force: true
|
||||||
|
|
||||||
|
- name: Require a revision for a selected reference catalog
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- dnd_pipeline_reference_catalog_revision is string
|
||||||
|
- dnd_pipeline_reference_catalog_revision | length > 0
|
||||||
|
fail_msg: A reference catalog repository requires a nonempty revision.
|
||||||
|
when: dnd_pipeline_reference_catalog_repository_url is not none
|
||||||
|
|
||||||
|
- name: Create the reference catalog root
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ dnd_pipeline_reference_catalog_root }}"
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: "{{ dnd_pipeline_runtime_group }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: dnd_pipeline_reference_catalog_repository_url is not none
|
||||||
|
|
||||||
|
- name: Deploy the selected reference catalog
|
||||||
|
become: true
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: "{{ dnd_pipeline_reference_catalog_repository_url }}"
|
||||||
|
dest: "{{ dnd_pipeline_reference_catalog_root }}"
|
||||||
|
version: "{{ dnd_pipeline_reference_catalog_revision }}"
|
||||||
|
update: true
|
||||||
|
force: true
|
||||||
|
when: dnd_pipeline_reference_catalog_repository_url is not none
|
||||||
|
|
||||||
- name: Create Narratio configuration directories
|
- name: Create Narratio configuration directories
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -158,25 +186,6 @@
|
|||||||
- pipelines
|
- pipelines
|
||||||
- overlays
|
- overlays
|
||||||
|
|
||||||
- name: Create the Audita profile directory
|
|
||||||
become: true
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /usr/local/etc/audita/profiles
|
|
||||||
state: directory
|
|
||||||
owner: "{{ dnd_pipeline_runtime_user }}"
|
|
||||||
group: "{{ dnd_pipeline_runtime_group }}"
|
|
||||||
mode: "{{ dnd_pipeline_config_directory_mode }}"
|
|
||||||
|
|
||||||
- name: Deploy Audita profiles
|
|
||||||
become: true
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: audita-profile.yml.j2
|
|
||||||
dest: "/usr/local/etc/audita/profiles/{{ item.key }}.yml"
|
|
||||||
owner: "{{ dnd_pipeline_runtime_user }}"
|
|
||||||
group: "{{ dnd_pipeline_runtime_group }}"
|
|
||||||
mode: "{{ dnd_pipeline_config_file_mode }}"
|
|
||||||
loop: "{{ dnd_pipeline_audita_profiles | dict2items }}"
|
|
||||||
|
|
||||||
- name: Deploy the Notarius D&D pipeline configuration
|
- name: Deploy the Notarius D&D pipeline configuration
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{{ item.value | to_nice_yaml }}
|
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
trim:
|
||||||
|
bounds:
|
||||||
|
profile_id: {{ dnd_pipeline_narratio_testing_scriptorium_profile | to_json }}
|
||||||
notarius:
|
notarius:
|
||||||
config_overlay: testing
|
config_overlay: testing
|
||||||
scriptorium:
|
scriptorium:
|
||||||
|
|||||||
@@ -1,384 +1,178 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
repository_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
repository_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||||
workspace_venv="$repository_root/../.venv"
|
workspace_venv="$repository_root/../.venv"
|
||||||
test_tmp=$(mktemp -d)
|
test_tmp=$(mktemp -d)
|
||||||
chmod 0700 "$test_tmp"
|
chmod 0700 "$test_tmp"
|
||||||
|
|
||||||
export ANSIBLE_COLLECTIONS_PATH="$test_tmp/collections"
|
export ANSIBLE_COLLECTIONS_PATH="$test_tmp/collections"
|
||||||
export ANSIBLE_ROLES_PATH="$test_tmp/roles:$(dirname "$repository_root")"
|
export ANSIBLE_ROLES_PATH="$test_tmp/roles:$(dirname "$repository_root")"
|
||||||
|
export ANSIBLE_PIPELINING=true
|
||||||
|
export ANSIBLE_REMOTE_TMP=/tmp
|
||||||
inventory="$repository_root/tests/inventory"
|
inventory="$repository_root/tests/inventory"
|
||||||
converge="$repository_root/tests/converge.yml"
|
converge="$repository_root/tests/converge.yml"
|
||||||
ansible_playbook="$workspace_venv/bin/ansible-playbook"
|
ansible_playbook="$workspace_venv/bin/ansible-playbook"
|
||||||
profile_dir="$test_tmp/profiles"
|
|
||||||
campaigns_repository=$(cd "$repository_root/../assets/campaigns" && pwd)
|
campaigns_repository=$(cd "$repository_root/../assets/campaigns" && pwd)
|
||||||
prompt_library_repository=$(cd "$repository_root/../assets/narratio-prompts" && pwd)
|
prompt_repository=$(cd "$repository_root/../assets/narratio-prompts" && pwd)
|
||||||
prompt_library_root=/usr/local/share/narratio/prompt-library
|
operator_user="dnd_test_${$}"
|
||||||
campaigns_revision=$(git -C "$campaigns_repository" rev-parse HEAD)
|
shared_fixture_root="/var/cache/notarius/$operator_user"
|
||||||
prompt_library_revision=$(git -C "$prompt_library_repository" rev-parse HEAD)
|
catalog_root="/usr/local/etc/narratio/catalog-$operator_user"
|
||||||
operator_user="dnd_f0009_${$}"
|
catalog_selected=false
|
||||||
shared_fixture_root="/var/cache/notarius/${operator_user}"
|
|
||||||
service_fixture_file="$shared_fixture_root/service.txt"
|
|
||||||
operator_fixture_file="$shared_fixture_root/operator.txt"
|
|
||||||
synthetic_audita_api_key='audita-pipeline-synthetic-value'
|
|
||||||
synthetic_notarius_api_key='notarius-pipeline-synthetic-value'
|
|
||||||
synthetic_object_storage_key_id='object-storage-key-id-pipeline-synthetic-value'
|
|
||||||
synthetic_object_storage_key='object-storage-key-pipeline-synthetic-value'
|
|
||||||
baseline_args=(
|
|
||||||
-e 'dnd_pipeline_whisperx_transcribe_url=http://127.0.0.1:8000/transcribe'
|
|
||||||
-e "dnd_pipeline_campaigns_repository_url=file://$campaigns_repository"
|
|
||||||
-e "dnd_pipeline_campaigns_revision=$campaigns_revision"
|
|
||||||
-e "dnd_pipeline_prompt_library_repository_url=file://$prompt_library_repository"
|
|
||||||
-e "dnd_pipeline_prompt_library_revision=$prompt_library_revision"
|
|
||||||
-e "dnd_pipeline_prompt_library_root=$prompt_library_root"
|
|
||||||
-e "{\"dnd_pipeline_operator_users\":[\"$operator_user\"]}"
|
|
||||||
-e "{\"dnd_pipeline_secrets\":{\"AUDITA_LLM_API_KEY\":\"$synthetic_audita_api_key\",\"OPENROUTER_API_KEY\":\"$synthetic_notarius_api_key\",\"OBJECT_STORAGE_KEY_ID\":\"$synthetic_object_storage_key_id\",\"OBJECT_STORAGE_KEY\":\"$synthetic_object_storage_key\"}}"
|
|
||||||
-e 'dnd_pipeline_narratio_storage_backend=s3'
|
|
||||||
-e 'dnd_pipeline_narratio_storage_s3_bucket=dnd-pipeline-fixture'
|
|
||||||
-e 'dnd_pipeline_narratio_storage_s3_root_prefix=fixture/dnd'
|
|
||||||
-e 'dnd_pipeline_narratio_storage_s3_region=fixture-1'
|
|
||||||
-e 'dnd_pipeline_narratio_storage_s3_endpoint=https://storage.fixture.invalid'
|
|
||||||
-e 'dnd_pipeline_narratio_storage_s3_access_key_id=OBJECT_STORAGE_KEY_ID'
|
|
||||||
-e 'dnd_pipeline_narratio_storage_s3_secret_access_key=OBJECT_STORAGE_KEY'
|
|
||||||
-e '{"dnd_pipeline_narratio_workspace_cleanup_after_publish":false,"dnd_pipeline_narratio_storage_s3_force_path_style":false,"dnd_pipeline_narratio_cache_s3_audio":false,"dnd_pipeline_narratio_publish_enabled":true,"dnd_pipeline_narratio_publish_upload_run":true}'
|
|
||||||
-e '{"dnd_pipeline_narratio_publish_outputs":[{"source":"narratio.transcript.final","required":true},{"source":"narratio.artifact.session_recap","required":true}]}'
|
|
||||||
-e 'dnd_pipeline_narratio_testing_scriptorium_profile=endpoint-profile'
|
|
||||||
-e 'dnd_pipeline_notarius_testing_llm_profile=gpt-terra-latest'
|
|
||||||
-e '{"dnd_pipeline_audita_llm_transient_retries":null,"dnd_pipeline_audita_llm_repair_attempts":null,"dnd_pipeline_audita_llm_operation_timeout":null,"dnd_pipeline_notarius_promptkit_transient_retries":null,"dnd_pipeline_scriptorium_transient_retries":null}'
|
|
||||||
)
|
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
exit_status=$?
|
exit_status=$?
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
/usr/bin/sudo /bin/rm -rf -- "$shared_fixture_root" || true
|
if "$catalog_selected"; then
|
||||||
"$ansible_playbook" -i "$inventory" "${baseline_args[@]}" "$converge" >/dev/null 2>&1 || true
|
if ! "$ansible_playbook" -i "$inventory" -e "@$test_tmp/base.json" "$converge" > /dev/null 2>&1; then
|
||||||
/usr/bin/sudo /usr/sbin/userdel --remove "$operator_user" 2>/dev/null || true
|
printf '%s\n' "Could not restore the no-catalog configuration; retaining $catalog_root" >&2
|
||||||
|
exit_status=1
|
||||||
|
catalog_root="$test_tmp/no-catalog-cleanup"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
sudo rm -rf -- "$shared_fixture_root" "$catalog_root" || true
|
||||||
|
sudo userdel --remove "$operator_user" 2>/dev/null || true
|
||||||
rm -rf -- "$test_tmp"
|
rm -rf -- "$test_tmp"
|
||||||
exit "$exit_status"
|
exit "$exit_status"
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
require_clean_recap() { grep -Eq 'changed=0 .*failed=0' "$1"; }
|
||||||
require_clean_recap() {
|
|
||||||
grep -Eq 'changed=0 .*failed=0' "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_converge() {
|
run_converge() {
|
||||||
output_file=$1
|
local output_file=$1
|
||||||
shift
|
shift
|
||||||
env -u AUDITA_LLM_API_KEY -u OPENROUTER_API_KEY \
|
env -u AUDITA_LLM_API_KEY -u OPENROUTER_API_KEY -u OBJECT_STORAGE_KEY_ID -u OBJECT_STORAGE_KEY \
|
||||||
-u OBJECT_STORAGE_KEY_ID -u OBJECT_STORAGE_KEY \
|
"$ansible_playbook" -i "$inventory" -e "@$test_tmp/base.json" "$@" "$converge" | tee "$output_file"
|
||||||
"$ansible_playbook" -i "$inventory" "$@" "$converge" | tee "$output_file"
|
}
|
||||||
|
repeat_case() {
|
||||||
|
local case_name=$1
|
||||||
|
shift
|
||||||
|
run_converge "$test_tmp/$case_name.log" "$@"
|
||||||
|
run_converge "$test_tmp/$case_name-repeat.log" "$@"
|
||||||
|
require_clean_recap "$test_tmp/$case_name-repeat.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd "$repository_root"
|
cd "$repository_root"
|
||||||
mkdir -p "$profile_dir"
|
"$workspace_venv/bin/python" - "$test_tmp/base.json" "$campaigns_repository" "$prompt_repository" "$operator_user" <<'PY'
|
||||||
printf '%s\n' \
|
import json,sys
|
||||||
'id: endpoint-profile' \
|
config={
|
||||||
'endpoint: http://127.0.0.1:8000/v1' \
|
'dnd_pipeline_whisperx_transcribe_url':'http://127.0.0.1:8000/transcribe',
|
||||||
'model: offline-fixture' > "$profile_dir/endpoint-profile.yml"
|
'dnd_pipeline_campaigns_repository_url':'file://'+sys.argv[2],
|
||||||
"$workspace_venv/bin/ansible-galaxy" collection install \
|
'dnd_pipeline_campaigns_revision':'488c2eb97b5c62efe51aa7af35a5ec9cb8b7a747',
|
||||||
-r collections/requirements.yml \
|
'dnd_pipeline_prompt_library_repository_url':'file://'+sys.argv[3],
|
||||||
-p "$ANSIBLE_COLLECTIONS_PATH"
|
'dnd_pipeline_prompt_library_revision':'d15a630ddfec18ab505df3ea5b076f6a0a5fd4b3',
|
||||||
"$workspace_venv/bin/ansible-galaxy" role install \
|
'dnd_pipeline_operator_users':[sys.argv[4]],
|
||||||
-r requirements.yml \
|
'dnd_pipeline_secrets':{'AUDITA_LLM_API_KEY':'synthetic-audita','OPENROUTER_API_KEY':'synthetic-openrouter','OBJECT_STORAGE_KEY_ID':'synthetic-storage-id','OBJECT_STORAGE_KEY':'synthetic-storage-key'},
|
||||||
-p "$test_tmp/roles"
|
'dnd_pipeline_narratio_storage_s3_bucket':'fixture-bucket',
|
||||||
|
'dnd_pipeline_narratio_storage_s3_endpoint':'https://storage.fixture.invalid',
|
||||||
|
'dnd_pipeline_narratio_storage_s3_force_path_style':False,
|
||||||
|
'dnd_pipeline_narratio_workspace_cleanup_after_publish':False,
|
||||||
|
'dnd_pipeline_narratio_publish_outputs':[{'source':'narratio.transcript.final','required':True},{'source':'narratio.artifact.session_recap','required':True}],
|
||||||
|
'dnd_pipeline_narratio_notarius_references':{'party':'narratio.input.party','glossary':'narratio.input.glossary.combined','spell_catalog':'narratio.input.glossary.combined'},
|
||||||
|
'dnd_pipeline_narratio_notarius_outputs':{'enemy_events':{'lane_id':'enemy-events'},'spells':{'lane_id':'spells'}},
|
||||||
|
'dnd_pipeline_narratio_testing_scriptorium_profile':'fixture-test',
|
||||||
|
'dnd_pipeline_notarius_testing_llm_profile':'gpt-luna-latest',
|
||||||
|
'dnd_pipeline_scriptorium_promptkit_profiles':[{'id':'fixture-test','endpoint':'http://127.0.0.1:8000/v1','model':'fixture/model'}],
|
||||||
|
}
|
||||||
|
with open(sys.argv[1],'w',encoding='utf-8') as f: json.dump(config,f)
|
||||||
|
PY
|
||||||
|
"$workspace_venv/bin/ansible-galaxy" collection install -r collections/requirements.yml -p "$ANSIBLE_COLLECTIONS_PATH"
|
||||||
|
"$workspace_venv/bin/ansible-galaxy" role install -r requirements.yml -p "$test_tmp/roles"
|
||||||
"$ansible_playbook" -i "$inventory" --syntax-check "$converge"
|
"$ansible_playbook" -i "$inventory" --syntax-check "$converge"
|
||||||
"$workspace_venv/bin/ansible-lint" --offline --profile production "$converge"
|
"$workspace_venv/bin/ansible-lint" --offline --profile production "$converge"
|
||||||
/usr/bin/sudo /usr/sbin/useradd --create-home --shell /usr/sbin/nologin "$operator_user"
|
sudo useradd --create-home --shell /usr/sbin/nologin "$operator_user"
|
||||||
|
repeat_case composed
|
||||||
baseline_log="$test_tmp/baseline.log"
|
/usr/local/bin/audita config validate --config /usr/local/etc/audita/config.yml
|
||||||
run_converge "$baseline_log" "${baseline_args[@]}"
|
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml
|
||||||
/usr/local/bin/seriatim --version
|
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml --overlay testing
|
||||||
AUDITA_LLM_API_KEY="$synthetic_audita_api_key" \
|
/usr/local/bin/notarius pipeline validate dnd-session --config /usr/local/etc/notarius/config.yml
|
||||||
/usr/local/bin/audita config validate --config /usr/local/etc/audita/config.yml
|
/usr/local/bin/notarius pipeline validate dnd-session --config /usr/local/etc/notarius/config.yml --overlay testing
|
||||||
"$workspace_venv/bin/python" - <<'PY'
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
with open("/usr/local/etc/audita/config.yml", encoding="utf-8") as config_file:
|
|
||||||
audita = yaml.safe_load(config_file)
|
|
||||||
with open("/usr/local/etc/notarius/config.yml", encoding="utf-8") as config_file:
|
|
||||||
notarius = yaml.safe_load(config_file)
|
|
||||||
with open("/usr/local/etc/scriptorium/config.yml", encoding="utf-8") as config_file:
|
|
||||||
scriptorium = yaml.safe_load(config_file)
|
|
||||||
|
|
||||||
assert "transient_retries" not in audita["llm"]
|
|
||||||
assert "repair_attempts" not in audita["llm"]
|
|
||||||
assert "operation_timeout" not in audita["llm"]
|
|
||||||
assert "transient_retries" not in notarius.get("promptkit", {})
|
|
||||||
assert "transient_retries" not in scriptorium
|
|
||||||
PY
|
|
||||||
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--pipeline dnd-session
|
|
||||||
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--config-overlay testing --pipeline dnd-session
|
|
||||||
notarius_effective_config="$test_tmp/notarius-effective.yml"
|
|
||||||
/usr/local/bin/notarius config effective --config /usr/local/etc/notarius/config.yml \
|
|
||||||
> "$notarius_effective_config"
|
|
||||||
notarius_testing_effective_config="$test_tmp/notarius-testing-effective.yml"
|
|
||||||
/usr/local/bin/notarius config effective --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--config-overlay testing > "$notarius_testing_effective_config"
|
|
||||||
grep -Fq 'mode: auto' "$notarius_effective_config"
|
|
||||||
grep -Fq 'step: describe-session' "$notarius_effective_config"
|
|
||||||
/usr/local/bin/scriptorium config validate --config /usr/local/etc/scriptorium/config.yml
|
/usr/local/bin/scriptorium config validate --config /usr/local/etc/scriptorium/config.yml
|
||||||
/usr/local/bin/scriptorium inspect profile --config /usr/local/etc/scriptorium/config.yml \
|
for campaign in centaurs dilfs; do
|
||||||
--profile-dir "$profile_dir" --profile endpoint-profile
|
sudo -u narratio /usr/local/bin/narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope campaign --campaign "$campaign"
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config validate \
|
sudo -u narratio /usr/local/bin/narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope party --campaign "$campaign"
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs
|
done
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config validate \
|
sudo -u narratio /usr/local/bin/narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope app
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign dilfs
|
sudo -u narratio /usr/local/bin/narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope app --overlay testing
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config validate \
|
sudo -u "$operator_user" /usr/local/bin/narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope app
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs --overlay testing
|
sudo -u narratio /usr/local/bin/narratio config show --config /usr/local/etc/narratio/narratio.yml --scope app --overlay testing --format json > "$test_tmp/narratio.json"
|
||||||
narratio_effective_config="$test_tmp/narratio-effective.yml"
|
sudo -u narratio /usr/local/bin/narratio artifacts list --config /usr/local/etc/narratio/narratio.yml --campaign centaurs --format json > "$test_tmp/artifacts.json"
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config show \
|
/usr/local/bin/notarius config show --config /usr/local/etc/notarius/config.yml --overlay testing --format json > "$test_tmp/notarius.json"
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs \
|
"$workspace_venv/bin/python" tests/verify.py composed "$test_tmp"
|
||||||
> "$narratio_effective_config"
|
for prompt in dnd.session_bounds dnd.session_recap dnd.session_recap_with_previous dnd.hostile_rumors dnd.deranged_rumors dnd.scene_map dnd.character_meta_analysis dnd.character_meta_analysis_with_previous; do
|
||||||
narratio_testing_effective_config="$test_tmp/narratio-testing-effective.yml"
|
/usr/local/bin/scriptorium promptkit show prompt "$prompt" --config /usr/local/etc/scriptorium/config.yml --format json > /dev/null
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config show \
|
args=(--var session_id=fixture-session)
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs --overlay testing \
|
case "$prompt" in
|
||||||
> "$narratio_testing_effective_config"
|
dnd.*rumors) args+=(--input-text 'recap=synthetic recap') ;;
|
||||||
grep -Fq 'enabled: true' "$narratio_effective_config"
|
dnd.session_bounds) args+=(--input-text 'transcript={"segments":[]}') ;;
|
||||||
grep -Fq 'pipeline_id: dnd-session' "$narratio_effective_config"
|
*) args+=(--input-text 'transcript={"segments":[]}' --input-text 'players=synthetic players' --input-text 'party=synthetic party') ;;
|
||||||
grep -Fq 'resume: true' "$narratio_effective_config"
|
esac
|
||||||
! grep -Fq 'chunk_cache:' "$narratio_effective_config"
|
if [[ "$prompt" == *_with_previous ]]; then args+=(--input-text 'recap=synthetic previous recap'); fi
|
||||||
grep -Fq 'party: narratio.input.party' "$narratio_effective_config"
|
if [[ "$prompt" == dnd.character_meta_analysis* ]]; then args+=(--var character_name=Example --var character_class=Cleric); fi
|
||||||
grep -Fq 'lane_id: item-registry' "$narratio_effective_config"
|
/usr/local/bin/scriptorium promptkit show prepared "$prompt" --config /usr/local/etc/scriptorium/config.yml "${args[@]}" --format json > "$test_tmp/$prompt.json"
|
||||||
"$workspace_venv/bin/python" - \
|
done
|
||||||
"$narratio_effective_config" "$narratio_testing_effective_config" <<'PY'
|
"$workspace_venv/bin/python" tests/verify.py prompts "$test_tmp"
|
||||||
import sys
|
sudo -u narratio /bin/sh -c "umask 077; mkdir '$shared_fixture_root'; printf '%s\n' service > '$shared_fixture_root/service'"
|
||||||
|
sudo -u "$operator_user" /bin/sh -c "grep -Fx service '$shared_fixture_root/service'; printf '%s\n' operator >> '$shared_fixture_root/service'; umask 077; printf '%s\n' operator > '$shared_fixture_root/operator'"
|
||||||
import yaml
|
sudo -u narratio grep -Fx operator "$shared_fixture_root/service" "$shared_fixture_root/operator"
|
||||||
|
! grep -Eq 'synthetic-(audita|openrouter|storage)' "$test_tmp/composed.log" "$test_tmp/narratio.json" "$test_tmp/notarius.json"
|
||||||
with open(sys.argv[1], encoding="utf-8") as config_file:
|
repeat_case selected -e 'dnd_pipeline_seriatim_version=v1.4.0'
|
||||||
config = yaml.safe_load(config_file)
|
|
||||||
with open(sys.argv[2], encoding="utf-8") as config_file:
|
|
||||||
testing_config = yaml.safe_load(config_file)
|
|
||||||
|
|
||||||
assert config["workspace"]["cleanup_after_publish"] is False
|
|
||||||
assert config["storage"] == {
|
|
||||||
"backend": "s3",
|
|
||||||
"s3": {
|
|
||||||
"bucket": "dnd-pipeline-fixture",
|
|
||||||
"root_prefix": "fixture/dnd",
|
|
||||||
"region": "fixture-1",
|
|
||||||
"endpoint": "https://storage.fixture.invalid",
|
|
||||||
"force_path_style": False,
|
|
||||||
"access_key_id": "OBJECT_STORAGE_KEY_ID",
|
|
||||||
"secret_access_key": "OBJECT_STORAGE_KEY",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
assert config["cache"]["s3_audio"] is False
|
|
||||||
assert config["publish"] == {
|
|
||||||
"enabled": True,
|
|
||||||
"upload_run": True,
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"source": "narratio.transcript.final",
|
|
||||||
"dest": "transcripts/final.json",
|
|
||||||
"required": True,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "narratio.artifact.session_recap",
|
|
||||||
"dest": "artifacts/session_recap.md",
|
|
||||||
"required": True,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
assert "config_overlay" not in config["notarius"]
|
|
||||||
assert testing_config["notarius"]["config_overlay"] == "testing"
|
|
||||||
assert all(
|
|
||||||
artifact["profile_id"] == "endpoint-profile"
|
|
||||||
for artifact in testing_config["scriptorium"]["artifacts"].values()
|
|
||||||
)
|
|
||||||
assert any(
|
|
||||||
artifact_id.startswith("character_meta_analysis_")
|
|
||||||
for artifact_id in testing_config["scriptorium"]["artifacts"]
|
|
||||||
)
|
|
||||||
PY
|
|
||||||
! grep -Fq "$synthetic_audita_api_key" "$baseline_log" "$narratio_effective_config" "$narratio_testing_effective_config" "$notarius_effective_config" "$notarius_testing_effective_config"
|
|
||||||
! grep -Fq "$synthetic_notarius_api_key" "$baseline_log" "$narratio_effective_config" "$narratio_testing_effective_config" "$notarius_effective_config" "$notarius_testing_effective_config"
|
|
||||||
! grep -Fq "$synthetic_object_storage_key_id" "$baseline_log" "$narratio_effective_config" "$narratio_testing_effective_config" "$notarius_effective_config" "$notarius_testing_effective_config"
|
|
||||||
! grep -Fq "$synthetic_object_storage_key" "$baseline_log" "$narratio_effective_config" "$narratio_testing_effective_config" "$notarius_effective_config" "$notarius_testing_effective_config"
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config artifacts \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs | \
|
|
||||||
awk -F '\t' '$1 == "session_recap" && $4 == "true" { found = 1 } END { exit !found }'
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config artifacts \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs | \
|
|
||||||
awk -F '\t' '$1 == "hostile_rumors" && $6 == "session_recap" { found = 1 } END { exit !found }'
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config artifacts \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs | \
|
|
||||||
awk -F '\t' 'index($1, "character_meta_analysis_") == 1 && $4 == "false" && $7 == "character_meta_analysis" { found = 1 } END { exit !found }'
|
|
||||||
/usr/bin/sudo -u "$operator_user" /usr/local/bin/narratio config validate \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs
|
|
||||||
/usr/bin/sudo -u "$operator_user" /usr/local/bin/notarius config validate \
|
|
||||||
--config /usr/local/etc/notarius/config.yml --pipeline dnd-session
|
|
||||||
/usr/bin/sudo -u nobody /bin/cat /usr/local/etc/narratio/pipeline.yml >/dev/null
|
|
||||||
if /usr/bin/sudo -u nobody /usr/local/bin/narratio config validate \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
/usr/bin/sudo -u narratio /bin/sh -c \
|
|
||||||
"umask 077; mkdir '$shared_fixture_root'; printf '%s\\n' service-created > '$service_fixture_file'"
|
|
||||||
/usr/bin/sudo -u "$operator_user" /bin/sh -c \
|
|
||||||
"grep -Fx service-created '$service_fixture_file'; printf '%s\\n' operator-appended >> '$service_fixture_file'"
|
|
||||||
/usr/bin/sudo -u narratio /bin/grep -Fx operator-appended "$service_fixture_file"
|
|
||||||
/usr/bin/sudo -u "$operator_user" /bin/sh -c \
|
|
||||||
"umask 077; printf '%s\\n' operator-created > '$operator_fixture_file'"
|
|
||||||
/usr/bin/sudo -u narratio /bin/grep -Fx operator-created "$operator_fixture_file"
|
|
||||||
session_recap_prompt_json=$(/usr/local/bin/scriptorium inspect prompt \
|
|
||||||
--config /usr/local/etc/scriptorium/config.yml \
|
|
||||||
--prompt dnd.session_recap --prompt-version 2.0.0 --format json)
|
|
||||||
session_recap_profile=$(printf '%s\n' "$session_recap_prompt_json" | \
|
|
||||||
"$workspace_venv/bin/python" -c 'import json, sys; print(json.load(sys.stdin)["default_profile_id"])')
|
|
||||||
/usr/local/bin/scriptorium inspect profile --config /usr/local/etc/scriptorium/config.yml \
|
|
||||||
--profile "$session_recap_profile"
|
|
||||||
/usr/local/bin/scriptorium inspect prompt --config /usr/local/etc/scriptorium/config.yml \
|
|
||||||
--prompt dnd.scene_map --prompt-version 1.0.0 --format json | \
|
|
||||||
"$workspace_venv/bin/python" -c '
|
|
||||||
import json
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
schema_root = Path(sys.argv[1]).resolve()
|
|
||||||
schema_path = json.load(sys.stdin)["output_contract"]["schema_path"]
|
|
||||||
schema = (schema_root / schema_path).resolve()
|
|
||||||
if not schema.is_relative_to(schema_root) or not schema.is_file():
|
|
||||||
raise SystemExit(f"invalid deployed schema path: {schema}")
|
|
||||||
' "$prompt_library_root/schemas"
|
|
||||||
baseline_repeat_log="$test_tmp/baseline-repeat.log"
|
|
||||||
run_converge "$baseline_repeat_log" "${baseline_args[@]}"
|
|
||||||
require_clean_recap "$baseline_repeat_log"
|
|
||||||
|
|
||||||
invalid_key_log="$test_tmp/invalid-key.log"
|
|
||||||
if run_converge "$invalid_key_log" "${baseline_args[@]}" \
|
|
||||||
-e '{"dnd_pipeline_secrets":{"INVALID-KEY":"invalid-key-synthetic-value"}}'; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
selected_version_log="$test_tmp/selected-version.log"
|
|
||||||
run_converge "$selected_version_log" "${baseline_args[@]}" \
|
|
||||||
-e 'dnd_pipeline_seriatim_version=v1.4.0'
|
|
||||||
/usr/local/bin/seriatim --version | grep -Fx 'seriatim version v1.4.0'
|
/usr/local/bin/seriatim --version | grep -Fx 'seriatim version v1.4.0'
|
||||||
selected_version_repeat_log="$test_tmp/selected-version-repeat.log"
|
"$workspace_venv/bin/python" - "$test_tmp/composed-pipelines.json" <<'PY'
|
||||||
run_converge "$selected_version_repeat_log" "${baseline_args[@]}" \
|
import json,sys
|
||||||
-e 'dnd_pipeline_seriatim_version=v1.4.0'
|
pipeline=lambda:{'llm_profile':'gpt-terra-latest','input':{'module':'seriatim'},'artifacts':{'spells':{'extract':{'module':'dnd/spells'},'normalize':{'module':'dnd/spells'}}}}
|
||||||
require_clean_recap "$selected_version_repeat_log"
|
config={'group_one':{'archive-session':pipeline()},'group_two':{'research-session':pipeline()},'dnd_pipeline_notarius_pipelines':'{{ group_one | combine(group_two) }}','dnd_pipeline_narratio_notarius_pipeline_id':'archive-session','dnd_pipeline_notarius_testing_llm_profile':'gpt-luna-latest'}
|
||||||
|
with open(sys.argv[1],'w',encoding='utf-8') as f:json.dump(config,f)
|
||||||
pipeline_group_one='{"archive-session":{"llm_profile":"gpt-luna-latest","input":{"module":"seriatim"},"artifacts":{"spells":{"extract":{"module":"dnd/spells"},"normalize":{"module":"dnd/spells"}}}}}'
|
|
||||||
pipeline_group_two='{"research-session":{"llm_profile":"gpt-luna-latest","input":{"module":"seriatim"},"artifacts":{"spells":{"extract":{"module":"dnd/spells"},"normalize":{"module":"dnd/spells"}}}}}'
|
|
||||||
alternate_config="{\"notarius_pipeline_group_one\":$pipeline_group_one,\"notarius_pipeline_group_two\":$pipeline_group_two,\"dnd_pipeline_notarius_pipelines\":\"{{ notarius_pipeline_group_one | combine(notarius_pipeline_group_two) }}\",\"dnd_pipeline_narratio_notarius_pipeline_id\":\"archive-session\",\"dnd_pipeline_notarius_testing_llm_profile\":\"gpt-terra-latest\",\"dnd_pipeline_notarius_cache_chunk_plans_mode\":\"bypass\"}"
|
|
||||||
alternate_log="$test_tmp/alternate.log"
|
|
||||||
run_converge "$alternate_log" "${baseline_args[@]}" -e "$alternate_config"
|
|
||||||
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--pipeline archive-session
|
|
||||||
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--config-overlay testing --pipeline archive-session
|
|
||||||
alternate_narratio_config="$test_tmp/alternate-narratio.yml"
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config show \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs \
|
|
||||||
> "$alternate_narratio_config"
|
|
||||||
grep -Fq 'pipeline_id: archive-session' "$alternate_narratio_config"
|
|
||||||
alternate_testing_narratio_config="$test_tmp/alternate-testing-narratio.yml"
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config show \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs --overlay testing \
|
|
||||||
> "$alternate_testing_narratio_config"
|
|
||||||
alternate_effective_config="$test_tmp/alternate-effective.yml"
|
|
||||||
/usr/local/bin/notarius config effective --config /usr/local/etc/notarius/config.yml \
|
|
||||||
> "$alternate_effective_config"
|
|
||||||
alternate_testing_effective_config="$test_tmp/alternate-testing-effective.yml"
|
|
||||||
/usr/local/bin/notarius config effective --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--config-overlay testing > "$alternate_testing_effective_config"
|
|
||||||
"$workspace_venv/bin/python" - \
|
|
||||||
"$alternate_narratio_config" "$alternate_testing_narratio_config" \
|
|
||||||
"$alternate_effective_config" "$alternate_testing_effective_config" <<'PY'
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
with open(sys.argv[1], encoding="utf-8") as config_file:
|
|
||||||
narratio_base = yaml.safe_load(config_file)
|
|
||||||
with open(sys.argv[2], encoding="utf-8") as config_file:
|
|
||||||
narratio_testing = yaml.safe_load(config_file)
|
|
||||||
with open(sys.argv[3], encoding="utf-8") as config_file:
|
|
||||||
notarius_base = yaml.safe_load(config_file)
|
|
||||||
with open(sys.argv[4], encoding="utf-8") as config_file:
|
|
||||||
notarius_testing = yaml.safe_load(config_file)
|
|
||||||
|
|
||||||
assert narratio_base["notarius"]["pipeline_id"] == "archive-session"
|
|
||||||
assert "config_overlay" not in narratio_base["notarius"]
|
|
||||||
assert narratio_testing["notarius"]["pipeline_id"] == "archive-session"
|
|
||||||
assert narratio_testing["notarius"]["config_overlay"] == "testing"
|
|
||||||
assert notarius_base["pipelines"]["archive-session"]["llm_profile"] == "gpt-luna-latest"
|
|
||||||
assert notarius_testing["pipelines"]["archive-session"]["llm_profile"] == "gpt-terra-latest"
|
|
||||||
assert notarius_testing["pipelines"]["research-session"]["llm_profile"] == "gpt-luna-latest"
|
|
||||||
assert notarius_base["cache"]["chunk_plans"]["mode"] == "bypass"
|
|
||||||
PY
|
PY
|
||||||
alternate_repeat_log="$test_tmp/alternate-repeat.log"
|
repeat_case pipelines -e "@$test_tmp/composed-pipelines.json"
|
||||||
run_converge "$alternate_repeat_log" "${baseline_args[@]}" -e "$alternate_config"
|
/usr/local/bin/notarius pipeline validate archive-session --config /usr/local/etc/notarius/config.yml --overlay testing
|
||||||
require_clean_recap "$alternate_repeat_log"
|
/usr/local/bin/notarius config show --config /usr/local/etc/notarius/config.yml --overlay testing --format json > "$test_tmp/pipelines.json"
|
||||||
|
"$workspace_venv/bin/python" tests/verify.py pipelines "$test_tmp"
|
||||||
synthetic_fixture_audita_key='audita-override-synthetic-value'
|
"$workspace_venv/bin/python" - "$test_tmp/overrides.json" <<'PY'
|
||||||
synthetic_fixture_notarius_key='notarius-override-synthetic-value'
|
import json,sys
|
||||||
override_config="{\"dnd_pipeline_audita_backends\":{\"fixture\":{\"endpoint\":\"https://inference.fixture.invalid/v1\",\"credential\":\"FIXTURE_AUDITA_KEY\",\"concurrency\":2}},"\
|
config={'dnd_pipeline_audita_promptkit_backends':[{'id':'fixture','endpoint':'https://inference.fixture.invalid/v1','api_key_env':'FIXTURE_AUDITA_KEY','concurrency_limit':2}], 'dnd_pipeline_audita_promptkit_profiles':[{'id':'fixture-proposal','backend':'fixture','model':'fixture/proposal','timeout_seconds':900},{'id':'fixture-validation','backend':'fixture','model':'fixture/validation','timeout_seconds':900}], 'dnd_pipeline_audita_llm_proposal_profile':'fixture-proposal','dnd_pipeline_audita_llm_validation_profile':'fixture-validation','dnd_pipeline_audita_llm_transient_retries':0,'dnd_pipeline_audita_llm_correction_repair_attempts':0,'dnd_pipeline_audita_llm_operation_timeout':'20m','dnd_pipeline_scriptorium_transient_retries':0,'dnd_pipeline_narratio_audita_credentials':['FIXTURE_AUDITA_KEY'],'dnd_pipeline_narratio_notarius_credentials':['FIXTURE_NOTARIUS_KEY'],'dnd_pipeline_narratio_scriptorium_credentials':['FIXTURE_AUDITA_KEY','FIXTURE_NOTARIUS_KEY'],'dnd_pipeline_secrets':{'FIXTURE_AUDITA_KEY':'synthetic-fixture-audita','FIXTURE_NOTARIUS_KEY':'synthetic-fixture-notarius','OBJECT_STORAGE_KEY_ID':'synthetic-storage-id','OBJECT_STORAGE_KEY':'synthetic-storage-key'}}
|
||||||
"\"dnd_pipeline_audita_profiles\":{\"fixture-proposal\":{\"id\":\"fixture-proposal\",\"backend\":\"fixture\",\"model\":\"fixture/proposal\",\"timeout_seconds\":900},"\
|
context_inputs = {
|
||||||
"\"fixture-validation\":{\"id\":\"fixture-validation\",\"backend\":\"fixture\",\"model\":\"fixture/validation\",\"timeout_seconds\":900}},"\
|
'transcript': {'source': 'narratio.transcript.final_trimmed', 'required': True},
|
||||||
"\"dnd_pipeline_audita_llm_proposal_profile\":\"fixture-proposal\",\"dnd_pipeline_audita_llm_validation_profile\":\"fixture-validation\","\
|
'recap': {'source': 'narratio.previous_session.artifact.session_recap', 'required': True},
|
||||||
"\"dnd_pipeline_narratio_audita_credentials\":[\"FIXTURE_AUDITA_KEY\"],\"dnd_pipeline_narratio_notarius_credentials\":[\"FIXTURE_NOTARIUS_KEY\"],"\
|
'players': {'source': 'narratio.input.players', 'required': True},
|
||||||
"\"dnd_pipeline_audita_llm_transient_retries\":0,\"dnd_pipeline_audita_llm_repair_attempts\":0,\"dnd_pipeline_audita_llm_operation_timeout\":\"20m\","\
|
'party': {'source': 'narratio.input.party', 'required': True},
|
||||||
"\"dnd_pipeline_notarius_promptkit_transient_retries\":0,\"dnd_pipeline_scriptorium_transient_retries\":0,"\
|
}
|
||||||
"\"dnd_pipeline_secrets\":{\"AUDITA_LLM_API_KEY\":\"$synthetic_audita_api_key\",\"OPENROUTER_API_KEY\":\"$synthetic_notarius_api_key\","\
|
config['dnd_pipeline_narratio_session_recap_artifact'] = {
|
||||||
"\"FIXTURE_AUDITA_KEY\":\"$synthetic_fixture_audita_key\",\"FIXTURE_NOTARIUS_KEY\":\"$synthetic_fixture_notarius_key\","\
|
'enabled': True, 'prompt_id': 'dnd.session_recap_with_previous',
|
||||||
"\"OBJECT_STORAGE_KEY_ID\":\"$synthetic_object_storage_key_id\",\"OBJECT_STORAGE_KEY\":\"$synthetic_object_storage_key\"}}"
|
'output_path': 'artifacts/session_recap.md', 'inputs': context_inputs,
|
||||||
override_log="$test_tmp/override.log"
|
}
|
||||||
run_converge "$override_log" "${baseline_args[@]}" -e "$override_config"
|
config['dnd_pipeline_narratio_character_analysis_family'] = {
|
||||||
FIXTURE_AUDITA_KEY="$synthetic_fixture_audita_key" \
|
'enabled': False, 'for_each': 'party.characters',
|
||||||
/usr/local/bin/audita config validate --config /usr/local/etc/audita/config.yml
|
'prompt_id': 'dnd.character_meta_analysis_with_previous',
|
||||||
audita_override_settings="$test_tmp/audita-override-settings.yml"
|
'output_path_pattern': 'artifacts/character_meta_analysis_{character_id}.md',
|
||||||
audita_override_profiles="$test_tmp/audita-override-profiles.yml"
|
'inputs': context_inputs,
|
||||||
FIXTURE_AUDITA_KEY="$synthetic_fixture_audita_key" \
|
'member_vars': {'character_name': 'character.name', 'character_class': 'character.class_summary'},
|
||||||
/usr/local/bin/audita config print-effective --config /usr/local/etc/audita/config.yml \
|
}
|
||||||
--view settings > "$audita_override_settings"
|
with open(sys.argv[1],'w',encoding='utf-8') as f:json.dump(config,f)
|
||||||
FIXTURE_AUDITA_KEY="$synthetic_fixture_audita_key" \
|
|
||||||
/usr/local/bin/audita config print-effective --config /usr/local/etc/audita/config.yml \
|
|
||||||
--view profiles > "$audita_override_profiles"
|
|
||||||
notarius_override_config="$test_tmp/notarius-override.yml"
|
|
||||||
scriptorium_override_config="$test_tmp/scriptorium-override.yml"
|
|
||||||
narratio_override_config="$test_tmp/narratio-override.yml"
|
|
||||||
/usr/local/bin/notarius config effective --config /usr/local/etc/notarius/config.yml \
|
|
||||||
> "$notarius_override_config"
|
|
||||||
/usr/local/bin/scriptorium config show --config /usr/local/etc/scriptorium/config.yml \
|
|
||||||
> "$scriptorium_override_config"
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config show \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs \
|
|
||||||
> "$narratio_override_config"
|
|
||||||
"$workspace_venv/bin/python" - \
|
|
||||||
"$audita_override_settings" "$audita_override_profiles" \
|
|
||||||
"$notarius_override_config" "$scriptorium_override_config" \
|
|
||||||
"$narratio_override_config" <<'PY'
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
settings, profiles, notarius, scriptorium, narratio = (
|
|
||||||
yaml.safe_load(open(path, encoding="utf-8")) for path in sys.argv[1:]
|
|
||||||
)
|
|
||||||
assert settings["backends"]["fixture"]["endpoint"] == "https://inference.fixture.invalid/v1"
|
|
||||||
assert settings["backends"]["fixture"]["concurrency"] == 2
|
|
||||||
assert settings["llm"]["proposal_profile"] == "fixture-proposal"
|
|
||||||
assert settings["llm"]["validation_profile"] == "fixture-validation"
|
|
||||||
assert settings["llm"]["transient_retries"] == 0
|
|
||||||
assert settings["llm"]["repair_attempts"] == 0
|
|
||||||
assert settings["llm"]["operation_timeout"] == "20m0s"
|
|
||||||
assert profiles["proposal"]["model"] == "fixture/proposal"
|
|
||||||
assert profiles["validation"]["model"] == "fixture/validation"
|
|
||||||
assert notarius["promptkit"]["transient_retries"] == 0
|
|
||||||
assert scriptorium["transient_retries"] == 0
|
|
||||||
assert narratio["audita"]["credentials"] == ["FIXTURE_AUDITA_KEY"]
|
|
||||||
assert narratio["notarius"]["credentials"] == ["FIXTURE_NOTARIUS_KEY"]
|
|
||||||
PY
|
PY
|
||||||
! grep -Fq "$synthetic_fixture_audita_key" "$override_log" "$narratio_override_config"
|
repeat_case overrides -e "@$test_tmp/overrides.json"
|
||||||
! grep -Fq "$synthetic_fixture_notarius_key" "$override_log" "$narratio_override_config"
|
/usr/local/bin/audita config validate --config /usr/local/etc/audita/config.yml
|
||||||
override_repeat_log="$test_tmp/override-repeat.log"
|
sudo -u narratio /usr/local/bin/narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope app
|
||||||
run_converge "$override_repeat_log" "${baseline_args[@]}" -e "$override_config"
|
"$workspace_venv/bin/python" tests/verify.py overrides "$test_tmp"
|
||||||
require_clean_recap "$override_repeat_log"
|
! grep -Eq 'synthetic-fixture-(audita|notarius)' "$test_tmp/overrides.log"
|
||||||
|
|
||||||
|
catalog_repository="$test_tmp/catalog-source"
|
||||||
|
mkdir -p "$catalog_repository"
|
||||||
|
"$workspace_venv/bin/python" - "$catalog_repository" "$repository_root/../../narratio" <<'PYTHON'
|
||||||
|
import json, subprocess, sys
|
||||||
|
from pathlib import Path
|
||||||
|
import yaml
|
||||||
|
from jsonschema import Draft202012Validator
|
||||||
|
root = Path(sys.argv[1])
|
||||||
|
schema = json.loads(subprocess.check_output(['git', '-C', sys.argv[2], 'show', 'v4.0.0:internal/domaininput/resources/glossary/v0.2.0/schema.json'], text=True))
|
||||||
|
for collection, filename in [('setting', 'setting.yml'), ('spells', 'spells.yml')]:
|
||||||
|
document = {'schema_version': 'maximumdirect.glossary.v1', 'collections': {collection: {'entries': [{'id': 'fixture', 'name': 'Fixture', 'category': 'test'}]}}}
|
||||||
|
Draft202012Validator(schema).validate(document)
|
||||||
|
(root / filename).write_text(yaml.safe_dump(document, sort_keys=False), encoding='utf-8')
|
||||||
|
(root / 'catalog.yml').write_text('reference_catalog:\n settings:\n fixture_setting: setting.yml\n systems:\n fixture_system: spells.yml\n', encoding='utf-8')
|
||||||
|
PYTHON
|
||||||
|
git -C "$catalog_repository" init -q
|
||||||
|
git -C "$catalog_repository" add .
|
||||||
|
git -C "$catalog_repository" -c user.name='Fixture' -c user.email='fixture@example.invalid' commit -qm 'Add synthetic catalog'
|
||||||
|
catalog_revision=$(git -C "$catalog_repository" rev-parse HEAD)
|
||||||
|
catalog_args=(-e "dnd_pipeline_reference_catalog_repository_url=file://$catalog_repository" -e "dnd_pipeline_reference_catalog_revision=$catalog_revision" -e "dnd_pipeline_reference_catalog_root=$catalog_root" -e '{"dnd_pipeline_narratio_reference_catalog_settings":{"caller_setting":"/usr/local/etc/narratio/caller-setting.yml"}}')
|
||||||
|
catalog_selected=true
|
||||||
|
repeat_case catalog "${catalog_args[@]}"
|
||||||
|
sudo -u narratio /usr/local/bin/narratio config validate --config /usr/local/etc/narratio/narratio.yml --scope app
|
||||||
|
sudo -u narratio /usr/local/bin/narratio config show --config /usr/local/etc/narratio/narratio.yml --scope app --format json > "$test_tmp/catalog.json"
|
||||||
|
"$workspace_venv/bin/python" tests/verify.py catalog "$test_tmp" "$catalog_root"
|
||||||
|
|||||||
76
roles/pipeline/tests/verify.py
Normal file
76
roles/pipeline/tests/verify.py
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Inspect supplied suite configuration outcomes from the offline integration run."""
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
case, directory = sys.argv[1:3]
|
||||||
|
tmp = Path(directory)
|
||||||
|
|
||||||
|
def read_json(name):
|
||||||
|
return json.loads((tmp / name).read_text(encoding="utf-8"))
|
||||||
|
|
||||||
|
def read_yaml(name):
|
||||||
|
return yaml.safe_load(Path(name).read_text(encoding="utf-8"))
|
||||||
|
|
||||||
|
if case == "composed":
|
||||||
|
config = read_json("narratio.json")
|
||||||
|
assert config["workspace"]["cleanup_after_publish"] is False
|
||||||
|
assert config["storage"]["s3"]["bucket"] == "fixture-bucket"
|
||||||
|
assert config["storage"]["s3"]["force_path_style"] is False
|
||||||
|
assert [item["source"] for item in config["publish"]["outputs"]] == ["narratio.transcript.final", "narratio.artifact.session_recap"]
|
||||||
|
assert config["notarius"]["config_overlay"] == "testing"
|
||||||
|
assert config["notarius"]["enabled"] is True
|
||||||
|
assert config["notarius"]["references"]["party"] == "narratio.input.party"
|
||||||
|
assert config["notarius"]["references"]["spell_catalog"] == "narratio.input.glossary.combined"
|
||||||
|
assert config["notarius"]["outputs"]["enemy_events"]["lane_id"] == "enemy-events"
|
||||||
|
assert config["trim"]["bounds"]["profile_id"] == "fixture-test"
|
||||||
|
assert all(item["profile_id"] == "fixture-test" for item in config["scriptorium"]["artifacts"].values())
|
||||||
|
assert config["scriptorium"]["artifact_families"]["character_meta_analysis"]["profile_id"] == "fixture-test"
|
||||||
|
artifacts = read_json("artifacts.json")["artifacts"]
|
||||||
|
assert any(item.get("family") == "character_meta_analysis" and item["output"].startswith("artifacts/character_meta_analysis_") for item in artifacts)
|
||||||
|
assert any(item["key"] == "hostile_rumors" and "session_recap" in item["dependencies"] for item in artifacts)
|
||||||
|
pipeline = read_json("notarius.json")["pipelines"]["dnd-session"]
|
||||||
|
assert pipeline["llm_profile"] == "gpt-luna-latest"
|
||||||
|
elif case == "prompts":
|
||||||
|
for base in ["dnd.session_recap", "dnd.character_meta_analysis"]:
|
||||||
|
for suffix in ["", "_with_previous"]:
|
||||||
|
prompt = base + suffix
|
||||||
|
content = "\n".join(message["content"] for message in read_json(f"{prompt}.json")["messages"])
|
||||||
|
assert ("synthetic previous recap" in content) == bool(suffix), prompt
|
||||||
|
assert "synthetic players" in content and "synthetic party" in content, prompt
|
||||||
|
elif case == "pipelines":
|
||||||
|
pipelines = read_json("pipelines.json")["pipelines"]
|
||||||
|
assert pipelines["archive-session"]["llm_profile"] == "gpt-luna-latest"
|
||||||
|
assert pipelines["research-session"]["llm_profile"] == "gpt-terra-latest"
|
||||||
|
elif case == "overrides":
|
||||||
|
audita = read_yaml("/usr/local/etc/audita/config.yml")
|
||||||
|
assert audita["promptkit"]["backends"][0]["endpoint"] == "https://inference.fixture.invalid/v1"
|
||||||
|
assert audita["promptkit"]["backends"][0]["concurrency_limit"] == 2
|
||||||
|
assert audita["llm"]["proposal_profile"] == "fixture-proposal"
|
||||||
|
assert audita["llm"]["validation_profile"] == "fixture-validation"
|
||||||
|
assert audita["llm"]["transient_retries"] == 0
|
||||||
|
assert audita["llm"]["correction_repair_attempts"] == 0
|
||||||
|
assert audita["llm"]["operation_timeout"] == "20m"
|
||||||
|
scriptorium = read_yaml("/usr/local/etc/scriptorium/config.yml")
|
||||||
|
assert scriptorium["transient_retries"] == 0
|
||||||
|
narratio = read_yaml("/usr/local/etc/narratio/narratio.yml")
|
||||||
|
assert narratio["audita"]["credentials"] == ["FIXTURE_AUDITA_KEY"]
|
||||||
|
assert narratio["notarius"]["credentials"] == ["FIXTURE_NOTARIUS_KEY"]
|
||||||
|
assert narratio["scriptorium"]["credentials"] == ["FIXTURE_AUDITA_KEY", "FIXTURE_NOTARIUS_KEY"]
|
||||||
|
recap = read_yaml("/usr/local/etc/narratio/artifacts/session-recap.yml")["scriptorium"]["artifacts"]["session_recap"]
|
||||||
|
family = read_yaml("/usr/local/etc/narratio/artifact-families/character-meta-analysis.yml")["scriptorium"]["artifact_families"]["character_meta_analysis"]
|
||||||
|
assert recap["prompt_id"] == "dnd.session_recap_with_previous"
|
||||||
|
assert family["prompt_id"] == "dnd.character_meta_analysis_with_previous"
|
||||||
|
for selection in [recap, family]:
|
||||||
|
assert selection["inputs"]["recap"] == {"source": "narratio.previous_session.artifact.session_recap", "required": True}
|
||||||
|
elif case == "catalog":
|
||||||
|
catalog = read_json("catalog.json")["reference_catalog"]
|
||||||
|
root = Path(sys.argv[3])
|
||||||
|
assert catalog["settings"]["fixture_setting"] == str(root / "setting.yml")
|
||||||
|
assert catalog["settings"]["caller_setting"] == "/usr/local/etc/narratio/caller-setting.yml"
|
||||||
|
assert catalog["systems"]["fixture_system"] == str(root / "spells.yml")
|
||||||
|
else:
|
||||||
|
raise ValueError(case)
|
||||||
@@ -8,21 +8,17 @@ chmod 0700 "$test_tmp"
|
|||||||
|
|
||||||
export ANSIBLE_COLLECTIONS_PATH="$test_tmp/collections"
|
export ANSIBLE_COLLECTIONS_PATH="$test_tmp/collections"
|
||||||
export ANSIBLE_ROLES_PATH="$test_tmp/roles"
|
export ANSIBLE_ROLES_PATH="$test_tmp/roles"
|
||||||
|
export ANSIBLE_PIPELINING=true
|
||||||
|
export ANSIBLE_REMOTE_TMP=/tmp
|
||||||
|
|
||||||
inventory="$repository_root/tests/inventory"
|
inventory="$repository_root/tests/inventory"
|
||||||
converge="$repository_root/tests/converge.yml"
|
converge="$repository_root/tests/converge.yml"
|
||||||
ansible_playbook="$workspace_venv/bin/ansible-playbook"
|
ansible_playbook="$workspace_venv/bin/ansible-playbook"
|
||||||
campaigns_repository=$(cd "$repository_root/../assets/campaigns" && pwd)
|
|
||||||
prompt_library_repository=$(cd "$repository_root/../assets/narratio-prompts" && pwd)
|
|
||||||
campaigns_revision=$(git -C "$campaigns_repository" rev-parse HEAD)
|
|
||||||
prompt_library_revision=$(git -C "$prompt_library_repository" rev-parse HEAD)
|
|
||||||
baseline_args=(
|
baseline_args=(
|
||||||
-e 'dnd_pipeline_whisperx_transcribe_url=http://127.0.0.1:8000/transcribe'
|
-e 'dnd_pipeline_whisperx_transcribe_url=http://127.0.0.1:8000/transcribe'
|
||||||
-e "dnd_pipeline_campaigns_repository_url=file://$campaigns_repository"
|
-e 'dnd_pipeline_notarius_testing_llm_profile=gpt-luna-latest'
|
||||||
-e "dnd_pipeline_campaigns_revision=$campaigns_revision"
|
-e 'dnd_pipeline_narratio_testing_scriptorium_profile=gemini-flash-latest'
|
||||||
-e "dnd_pipeline_prompt_library_repository_url=file://$prompt_library_repository"
|
-e 'dnd_pipeline_narratio_storage_s3_bucket=fixture-collection-bucket'
|
||||||
-e "dnd_pipeline_prompt_library_revision=$prompt_library_revision"
|
|
||||||
-e 'dnd_pipeline_notarius_testing_llm_profile=gpt-terra-latest'
|
|
||||||
-e '{"dnd_pipeline_secrets":{"AUDITA_LLM_API_KEY":"audita-pipeline-synthetic-value","OPENROUTER_API_KEY":"notarius-pipeline-synthetic-value","OBJECT_STORAGE_KEY_ID":"object-storage-key-id-pipeline-synthetic-value","OBJECT_STORAGE_KEY":"object-storage-key-pipeline-synthetic-value"}}'
|
-e '{"dnd_pipeline_secrets":{"AUDITA_LLM_API_KEY":"audita-pipeline-synthetic-value","OPENROUTER_API_KEY":"notarius-pipeline-synthetic-value","OBJECT_STORAGE_KEY_ID":"object-storage-key-id-pipeline-synthetic-value","OBJECT_STORAGE_KEY":"object-storage-key-pipeline-synthetic-value"}}'
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -35,7 +31,7 @@ cleanup() {
|
|||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
run_converge() {
|
run_converge() {
|
||||||
output_file=$1
|
local output_file=$1
|
||||||
env -u AUDITA_LLM_API_KEY -u OPENROUTER_API_KEY \
|
env -u AUDITA_LLM_API_KEY -u OPENROUTER_API_KEY \
|
||||||
-u OBJECT_STORAGE_KEY_ID -u OBJECT_STORAGE_KEY \
|
-u OBJECT_STORAGE_KEY_ID -u OBJECT_STORAGE_KEY \
|
||||||
"$ansible_playbook" -i "$inventory" "${baseline_args[@]}" "$converge" | \
|
"$ansible_playbook" -i "$inventory" "${baseline_args[@]}" "$converge" | \
|
||||||
@@ -46,7 +42,8 @@ cd "$repository_root"
|
|||||||
mkdir -p "$ANSIBLE_COLLECTIONS_PATH" "$ANSIBLE_ROLES_PATH" "$test_tmp/build"
|
mkdir -p "$ANSIBLE_COLLECTIONS_PATH" "$ANSIBLE_ROLES_PATH" "$test_tmp/build"
|
||||||
"$workspace_venv/bin/ansible-galaxy" install -r requirements.yml
|
"$workspace_venv/bin/ansible-galaxy" install -r requirements.yml
|
||||||
"$workspace_venv/bin/ansible-galaxy" collection build --output-path "$test_tmp/build"
|
"$workspace_venv/bin/ansible-galaxy" collection build --output-path "$test_tmp/build"
|
||||||
artifact="$test_tmp/build/rakestraw-dnd-0.1.0.tar.gz"
|
artifacts=("$test_tmp/build/"rakestraw-dnd-*.tar.gz)
|
||||||
|
artifact=${artifacts[0]}
|
||||||
archive_contents="$test_tmp/archive.txt"
|
archive_contents="$test_tmp/archive.txt"
|
||||||
tar -tzf "$artifact" > "$archive_contents"
|
tar -tzf "$artifact" > "$archive_contents"
|
||||||
grep -Fxq 'roles/pipeline/tasks/main.yml' "$archive_contents"
|
grep -Fxq 'roles/pipeline/tasks/main.yml' "$archive_contents"
|
||||||
@@ -62,46 +59,49 @@ fi
|
|||||||
|
|
||||||
baseline_log="$test_tmp/baseline.log"
|
baseline_log="$test_tmp/baseline.log"
|
||||||
run_converge "$baseline_log"
|
run_converge "$baseline_log"
|
||||||
/usr/local/bin/seriatim --version
|
|
||||||
AUDITA_LLM_API_KEY='audita-pipeline-synthetic-value' \
|
|
||||||
/usr/local/bin/audita config validate --config /usr/local/etc/audita/config.yml
|
|
||||||
AUDITA_LLM_API_KEY='audita-pipeline-synthetic-value' \
|
|
||||||
/usr/local/bin/audita config print-effective --config /usr/local/etc/audita/config.yml \
|
|
||||||
--view profiles >/dev/null
|
|
||||||
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--pipeline dnd-session
|
|
||||||
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--config-overlay testing --pipeline dnd-session
|
|
||||||
notarius_testing_config="$test_tmp/notarius-testing.yml"
|
|
||||||
/usr/local/bin/notarius config effective --config /usr/local/etc/notarius/config.yml \
|
|
||||||
--config-overlay testing > "$notarius_testing_config"
|
|
||||||
/usr/local/bin/scriptorium config validate --config /usr/local/etc/scriptorium/config.yml
|
|
||||||
/usr/local/bin/scriptorium inspect prompt \
|
|
||||||
--config /usr/local/etc/scriptorium/config.yml \
|
|
||||||
--prompt dnd.session_recap --prompt-version 2.0.0 --format json >/dev/null
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config validate \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config validate \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs --overlay testing
|
|
||||||
narratio_testing_config="$test_tmp/narratio-testing.yml"
|
|
||||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config show \
|
|
||||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs --overlay testing \
|
|
||||||
> "$narratio_testing_config"
|
|
||||||
"$workspace_venv/bin/python" - \
|
|
||||||
"$notarius_testing_config" "$narratio_testing_config" <<'PY'
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
with open(sys.argv[1], encoding="utf-8") as config_file:
|
|
||||||
notarius = yaml.safe_load(config_file)
|
|
||||||
with open(sys.argv[2], encoding="utf-8") as config_file:
|
|
||||||
narratio = yaml.safe_load(config_file)
|
|
||||||
|
|
||||||
assert notarius["pipelines"]["dnd-session"]["llm_profile"] == "gpt-terra-latest"
|
|
||||||
assert narratio["notarius"]["config_overlay"] == "testing"
|
|
||||||
PY
|
|
||||||
|
|
||||||
repeat_log="$test_tmp/repeat.log"
|
repeat_log="$test_tmp/repeat.log"
|
||||||
run_converge "$repeat_log"
|
run_converge "$repeat_log"
|
||||||
grep -Eq 'changed=0 .*failed=0' "$repeat_log"
|
grep -Eq 'changed=0 .*failed=0' "$repeat_log"
|
||||||
|
|
||||||
|
/usr/local/bin/audita config validate --config /usr/local/etc/audita/config.yml
|
||||||
|
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml
|
||||||
|
/usr/local/bin/notarius config validate --config /usr/local/etc/notarius/config.yml --overlay testing
|
||||||
|
/usr/local/bin/notarius pipeline validate dnd-session --config /usr/local/etc/notarius/config.yml
|
||||||
|
/usr/local/bin/notarius pipeline validate dnd-session --config /usr/local/etc/notarius/config.yml --overlay testing
|
||||||
|
/usr/local/bin/notarius config show --config /usr/local/etc/notarius/config.yml \
|
||||||
|
--overlay testing --format json > "$test_tmp/notarius-testing.json"
|
||||||
|
/usr/local/bin/scriptorium config validate --config /usr/local/etc/scriptorium/config.yml
|
||||||
|
/usr/local/bin/scriptorium promptkit show prepared dnd.session_recap \
|
||||||
|
--config /usr/local/etc/scriptorium/config.yml \
|
||||||
|
--input-text 'transcript={"segments":[]}' \
|
||||||
|
--input-text 'players=synthetic players' --input-text 'party=synthetic party' \
|
||||||
|
--var session_id=fixture-session --format json > "$test_tmp/recap.json"
|
||||||
|
for overlay in default testing; do
|
||||||
|
sudo -u narratio /usr/local/bin/narratio config validate \
|
||||||
|
--config /usr/local/etc/narratio/narratio.yml --scope app --overlay "$overlay"
|
||||||
|
done
|
||||||
|
sudo -u narratio /usr/local/bin/narratio config validate \
|
||||||
|
--config /usr/local/etc/narratio/narratio.yml --scope campaign --campaign centaurs
|
||||||
|
sudo -u narratio /usr/local/bin/narratio config validate \
|
||||||
|
--config /usr/local/etc/narratio/narratio.yml --scope party --campaign centaurs
|
||||||
|
sudo -u narratio /usr/local/bin/narratio artifacts list \
|
||||||
|
--config /usr/local/etc/narratio/narratio.yml --campaign centaurs --format json > /dev/null
|
||||||
|
sudo -u narratio /usr/local/bin/narratio config show \
|
||||||
|
--config /usr/local/etc/narratio/narratio.yml --scope app --overlay testing \
|
||||||
|
--format json > "$test_tmp/narratio-testing.json"
|
||||||
|
"$workspace_venv/bin/python" - "$test_tmp" <<'PY'
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
root = Path(sys.argv[1])
|
||||||
|
notarius = json.loads((root / "notarius-testing.json").read_text())
|
||||||
|
narratio = json.loads((root / "narratio-testing.json").read_text())
|
||||||
|
recap = json.loads((root / "recap.json").read_text())
|
||||||
|
assert notarius["pipelines"]["dnd-session"]["llm_profile"] == "gpt-luna-latest"
|
||||||
|
assert narratio["storage"]["s3"]["bucket"] == "fixture-collection-bucket"
|
||||||
|
assert narratio["trim"]["bounds"]["profile_id"] == "gemini-flash-latest"
|
||||||
|
assert narratio["scriptorium"]["artifacts"]["session_recap"]["profile_id"] == "gemini-flash-latest"
|
||||||
|
content = "\n".join(message["content"] for message in recap["messages"])
|
||||||
|
assert "synthetic players" in content and "synthetic party" in content
|
||||||
|
PY
|
||||||
|
|||||||
Reference in New Issue
Block a user