From 330afe7856da94b2402a75447f4b60aba767843f Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Tue, 22 Sep 2026 18:33:28 +0000 Subject: [PATCH] Expose the Notarius configuration profile in the Narratio role --- README.md | 9 ++++++--- defaults/main.yml | 1 + meta/argument_specs.yml | 1 + templates/pipeline.yml.j2 | 5 ++++- tests/integration | 11 +++++++++++ tests/representative.yml | 1 + tests/verify-config.yml | 2 ++ 7 files changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4984093..ed9c31e 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ narratio_scriptorium_artifact_families: null narratio_notarius_enabled: null narratio_notarius_binary: null narratio_notarius_config_path: null +narratio_notarius_config_profile: null narratio_notarius_pipeline_id: null narratio_notarius_timeout: null narratio_notarius_working_directory: null @@ -139,9 +140,11 @@ them and the role does not merge or rewrite them. Credential fields name environment variables only; credential values remain outside this role and are the caller's responsibility. `narratio_notarius_llm_api_key` names the environment variable that Narratio forwards to Notarius. The optional -`narratio_notarius_resume` and `narratio_notarius_chunk_cache` settings expose -Narratio's native extraction and chunk-plan choices; this generic role assigns -no D&D-specific credential or cache policy. +`narratio_notarius_config_profile` selects a Notarius ConfigKit overlay without +coupling it to Narratio's own profile name. The optional `narratio_notarius_resume` +and `narratio_notarius_chunk_cache` settings expose Narratio's native extraction +and chunk-plan choices; this generic role assigns no D&D-specific credential or +cache policy. ConfigKit imports and profile overlays are externally managed, and this role does not install the downstream applications, campaign content, or suite policy. diff --git a/defaults/main.yml b/defaults/main.yml index 442c503..750102c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -90,6 +90,7 @@ narratio_scriptorium_artifact_families: null narratio_notarius_enabled: null narratio_notarius_binary: null narratio_notarius_config_path: null +narratio_notarius_config_profile: null narratio_notarius_pipeline_id: null narratio_notarius_timeout: null narratio_notarius_working_directory: null diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index e626c1c..b96e7fd 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -95,6 +95,7 @@ argument_specs: narratio_notarius_enabled: {type: bool, required: false} narratio_notarius_binary: {type: str, required: false} narratio_notarius_config_path: {type: str, required: false} + narratio_notarius_config_profile: {type: str, required: false} narratio_notarius_pipeline_id: {type: str, required: false} narratio_notarius_timeout: {type: str, required: false} narratio_notarius_working_directory: {type: str, required: false} diff --git a/templates/pipeline.yml.j2 b/templates/pipeline.yml.j2 index 70921d3..a4e964e 100644 --- a/templates/pipeline.yml.j2 +++ b/templates/pipeline.yml.j2 @@ -253,7 +253,7 @@ scriptorium: artifact_families: {{ narratio_scriptorium_artifact_families | to_json }} {% endif %} {% endif %} -{% if narratio_notarius_enabled is not none or narratio_notarius_binary is not none or narratio_notarius_config_path is not none or narratio_notarius_pipeline_id is not none or narratio_notarius_timeout is not none or narratio_notarius_working_directory is not none or narratio_notarius_llm_api_key is not none or narratio_notarius_resume is not none or narratio_notarius_chunk_cache is not none or narratio_notarius_references is not none or narratio_notarius_outputs is not none %} +{% if narratio_notarius_enabled is not none or narratio_notarius_binary is not none or narratio_notarius_config_path is not none or narratio_notarius_config_profile is not none or narratio_notarius_pipeline_id is not none or narratio_notarius_timeout is not none or narratio_notarius_working_directory is not none or narratio_notarius_llm_api_key is not none or narratio_notarius_resume is not none or narratio_notarius_chunk_cache is not none or narratio_notarius_references is not none or narratio_notarius_outputs is not none %} notarius: {% if narratio_notarius_enabled is not none %} enabled: {{ narratio_notarius_enabled | to_json }} @@ -264,6 +264,9 @@ notarius: {% if narratio_notarius_config_path is not none %} config_path: {{ narratio_notarius_config_path | to_json }} {% endif %} +{% if narratio_notarius_config_profile is not none %} + config_profile: {{ narratio_notarius_config_profile | to_json }} +{% endif %} {% if narratio_notarius_pipeline_id is not none %} pipeline_id: {{ narratio_notarius_pipeline_id | to_json }} {% endif %} diff --git a/tests/integration b/tests/integration index 93cba87..47c58b7 100755 --- a/tests/integration +++ b/tests/integration @@ -70,6 +70,7 @@ chmod 0755 "$custom_go_binary" sudo rm -f -- /usr/local/bin/narratio recovery_log="$test_tmp/recovery.log" run_converge "$recovery_log" "${baseline_args[@]}" \ + -e 'narratio_version=v2.1.0' \ -e '{"narratio_manage_build_dependencies": false}' \ -e "narratio_go_binary=$custom_go_binary" grep -q . "$custom_go_invocations" @@ -77,6 +78,7 @@ grep -q . "$custom_go_invocations" "$ansible_playbook" -i "$inventory" "$verify_baseline" recovery_repeat_log="$test_tmp/recovery-repeat.log" run_converge "$recovery_repeat_log" "${baseline_args[@]}" \ + -e 'narratio_version=v2.1.0' \ -e '{"narratio_manage_build_dependencies": false}' \ -e "narratio_go_binary=$custom_go_binary" require_clean_recap "$recovery_repeat_log" @@ -91,3 +93,12 @@ NARRATIO_TEST_NOTARIUS_API_KEY="$synthetic_notarius_api_key" \ representative_repeat_log="$test_tmp/representative-repeat.log" "$ansible_playbook" -i "$inventory" "$representative" | tee "$representative_repeat_log" require_clean_recap "$representative_repeat_log" + +empty_profile_log="$test_tmp/empty-profile.log" +"$ansible_playbook" -i "$inventory" \ + -e '{"narratio_notarius_config_profile": ""}' \ + "$representative" | tee "$empty_profile_log" +NARRATIO_TEST_NOTARIUS_API_KEY="$synthetic_notarius_api_key" \ + "$ansible_playbook" -i "$inventory" \ + -e '{"narratio_test_notarius_config_profile": ""}' \ + "$verify_config" diff --git a/tests/representative.yml b/tests/representative.yml index 986ca6d..1dbeb9f 100644 --- a/tests/representative.yml +++ b/tests/representative.yml @@ -26,6 +26,7 @@ narratio_audita_modules: [] narratio_audita_report: false narratio_notarius_llm_api_key: NARRATIO_TEST_NOTARIUS_API_KEY + narratio_notarius_config_profile: representative-profile narratio_notarius_resume: false narratio_notarius_chunk_cache: auto narratio_normalize_output_path: null diff --git a/tests/verify-config.yml b/tests/verify-config.yml index c159e53..b109a01 100644 --- a/tests/verify-config.yml +++ b/tests/verify-config.yml @@ -26,6 +26,7 @@ - narratio_pipeline.audita.modules == [] - narratio_pipeline.audita.report == false - narratio_pipeline.notarius.llm_api_key == 'NARRATIO_TEST_NOTARIUS_API_KEY' + - narratio_pipeline.notarius.config_profile == narratio_expected_notarius_config_profile - narratio_pipeline.notarius.resume == false - narratio_pipeline.notarius.chunk_cache == 'auto' - narratio_pipeline.trim.enabled == false @@ -39,6 +40,7 @@ - "'normalize' not in narratio_pipeline" vars: narratio_pipeline: "{{ narratio_managed_pipeline.content | b64decode | from_yaml }}" + narratio_expected_notarius_config_profile: "{{ narratio_test_notarius_config_profile | default('representative-profile') }}" - name: Validate the representative pipeline as the Narratio account become: true