Document and test the D&D Notarius integration
This commit is contained in:
66
README.md
66
README.md
@@ -41,7 +41,7 @@ The compatible application versions are selected through these variables:
|
||||
| --- | --- |
|
||||
| `dnd_pipeline_audita_version` | `v0.9.1` |
|
||||
| `dnd_pipeline_narratio_version` | `v2.0.0` |
|
||||
| `dnd_pipeline_notarius_version` | `v0.6.0` |
|
||||
| `dnd_pipeline_notarius_version` | `v0.7.0` |
|
||||
| `dnd_pipeline_seriatim_version` | `v1.5.0` |
|
||||
| `dnd_pipeline_scriptorium_version` | `v0.13.0` |
|
||||
| `dnd_pipeline_manage_build_dependencies` | `true` |
|
||||
@@ -78,8 +78,7 @@ 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
|
||||
installed but remains disabled in Narratio until a later feature supplies a
|
||||
Notarius pipeline.
|
||||
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
|
||||
@@ -176,6 +175,41 @@ different testing profile is appropriate:
|
||||
dnd_pipeline_narratio_testing_scriptorium_profile: endpoint-profile
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
| 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_narratio_notarius_pipeline_id` | `dnd-session` |
|
||||
| `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.
|
||||
|
||||
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`.
|
||||
|
||||
Chunk plans use `auto` caching and checkpoints are recorded but not resumed.
|
||||
The `chunk-plans` and `checkpoints` paths derive from the cache root and are
|
||||
created by Notarius during use. Base and `testing` configurations select the
|
||||
same `dnd-extraction` profile and Notarius pipeline; the testing overlay changes
|
||||
only Scriptorium profiles, so a real testing run may invoke Notarius. The
|
||||
integration suite performs offline configuration inspection only.
|
||||
|
||||
### Inspecting configuration
|
||||
|
||||
The following native Narratio commands resolve configuration without running
|
||||
@@ -198,13 +232,14 @@ inspection shows enabled sources, inferred dependencies, and generated family
|
||||
members; the diff shows the overlay's profile selections without modifying
|
||||
managed files.
|
||||
|
||||
API keys, Notarius enablement, storage and publishing, operator selection and
|
||||
API keys, storage and publishing, operator selection and
|
||||
group-membership management, scheduling, and end-to-end external execution
|
||||
remain deferred.
|
||||
|
||||
### Shared execution filesystem
|
||||
|
||||
`/var/lib/narratio`, `/var/spool/narratio`, and `/var/cache/narratio` are
|
||||
`/var/lib/narratio`, `/var/spool/narratio`, `/var/cache/narratio`, and
|
||||
`/var/cache/notarius` are
|
||||
`narratio:narratio` mode `2775` **setgid** directories. Their access and
|
||||
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
|
||||
@@ -233,13 +268,14 @@ create or populate that subtree.
|
||||
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 Narratio's assembled configuration and
|
||||
campaign discovery as the Narratio account, and inspects deployed Scriptorium
|
||||
prompts and a schema path. It also validates the same Narratio configuration as
|
||||
a temporary existing-group-member fixture, exercises representative shared-root
|
||||
access across the service and fixture identities, and confirms that `nobody`
|
||||
can read ordinary configuration. It requires immediate clean repeats, then
|
||||
selects Seriatim `v1.4.0` through the suite interface and requires a clean
|
||||
repeat of that selection. Cleanup reapplies the asset-enabled baseline suite and
|
||||
removes only the fixture account, its named test content, and the driver's
|
||||
private temporary directory.
|
||||
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.
|
||||
|
||||
@@ -19,7 +19,7 @@ prompt_library_root=/usr/local/share/narratio/prompt-library
|
||||
campaigns_revision=$(git -C "$campaigns_repository" rev-parse HEAD)
|
||||
prompt_library_revision=$(git -C "$prompt_library_repository" rev-parse HEAD)
|
||||
operator_user="dnd_f0009_${$}"
|
||||
shared_fixture_root="/var/lib/narratio/${operator_user}"
|
||||
shared_fixture_root="/var/cache/notarius/${operator_user}"
|
||||
service_fixture_file="$shared_fixture_root/service.txt"
|
||||
operator_fixture_file="$shared_fixture_root/operator.txt"
|
||||
baseline_args=(
|
||||
@@ -71,13 +71,29 @@ baseline_log="$test_tmp/baseline.log"
|
||||
run_converge "$baseline_log" "${baseline_args[@]}"
|
||||
/usr/local/bin/seriatim --version
|
||||
/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 \
|
||||
--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"
|
||||
grep -Fq 'mode: auto' "$notarius_effective_config"
|
||||
grep -Fq 'step: describe-session' "$notarius_effective_config"
|
||||
/usr/local/bin/scriptorium inspect profile --config /usr/local/etc/scriptorium/config.yml \
|
||||
--profile-dir "$profile_dir" --profile endpoint-profile
|
||||
/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 dilfs
|
||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config validate \
|
||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs --profile testing
|
||||
narratio_effective_config="$test_tmp/narratio-effective.yml"
|
||||
/usr/bin/sudo -u narratio /usr/local/bin/narratio config show \
|
||||
--config /usr/local/etc/narratio/pipeline.yml --campaign centaurs \
|
||||
> "$narratio_effective_config"
|
||||
grep -Fq 'enabled: true' "$narratio_effective_config"
|
||||
grep -Fq 'pipeline_id: dnd-session' "$narratio_effective_config"
|
||||
grep -Fq 'party: narratio.input.party' "$narratio_effective_config"
|
||||
grep -Fq 'lane_id: item-registry' "$narratio_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 }'
|
||||
@@ -94,6 +110,8 @@ run_converge "$baseline_log" "${baseline_args[@]}"
|
||||
--shell /usr/sbin/nologin "$operator_user"
|
||||
/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
|
||||
/usr/bin/sudo -u narratio /bin/sh -c \
|
||||
"umask 077; mkdir '$shared_fixture_root'; printf '%s\\n' service-created > '$service_fixture_file'"
|
||||
@@ -150,3 +168,20 @@ selected_version_repeat_log="$test_tmp/selected-version-repeat.log"
|
||||
run_converge "$selected_version_repeat_log" "${baseline_args[@]}" \
|
||||
-e 'dnd_pipeline_seriatim_version=v1.4.0'
|
||||
require_clean_recap "$selected_version_repeat_log"
|
||||
|
||||
pipeline_group_one='{"archive-session":{"llm_profile":"dnd-extraction","input":{"module":"seriatim"},"artifacts":{"spells":{"extract":{"module":"dnd/spells"},"normalize":{"module":"dnd/spells"}}}}}'
|
||||
pipeline_group_two='{"research-session":{"llm_profile":"dnd-extraction","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_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
|
||||
alternate_effective_config="$test_tmp/alternate-effective.yml"
|
||||
/usr/local/bin/notarius config effective --config /usr/local/etc/notarius/config.yml \
|
||||
> "$alternate_effective_config"
|
||||
grep -Fq 'archive-session:' "$alternate_effective_config"
|
||||
grep -Fq 'research-session:' "$alternate_effective_config"
|
||||
grep -Fq 'mode: bypass' "$alternate_effective_config"
|
||||
alternate_repeat_log="$test_tmp/alternate-repeat.log"
|
||||
run_converge "$alternate_repeat_log" "${baseline_args[@]}" -e "$alternate_config"
|
||||
require_clean_recap "$alternate_repeat_log"
|
||||
|
||||
Reference in New Issue
Block a user