Close out the Narratio version 4 upgrade

This commit is contained in:
2026-12-03 17:11:42 +00:00
parent 5a476d347a
commit 8448d4cf93
4 changed files with 51 additions and 327 deletions

View File

@@ -21,15 +21,15 @@ match the other three targets.
- [x] [Feature 0024: Standalone Scriptorium adoption](features/0024-scriptorium-v0-16-adoption.md) — closed after independent review with no findings; role `e936d52` passed the full offline suite and all clean repeats.
- [x] [Feature 0025: Standalone Audita adoption](features/0025-audita-v4-adoption.md) — closed after independent review with no findings; role `b818f60` passed the full offline suite and all clean repeats.
- [x] [Feature 0026: Standalone Notarius adoption](features/0026-notarius-v0-10-adoption.md) — closed after independent review with no findings; role `85cd3a3` passed the full offline suite and all clean repeats.
- [ ] [Feature 0027: Standalone Narratio adoption](features/0027-narratio-v4-adoption.md) — role `2a4e82c` passed the offline suite; independent review is pending.
- [x] [Feature 0027: Standalone Narratio adoption](features/0027-narratio-v4-adoption.md) — closed after independent review with no findings; public role `2a4e82c` passed the full offline suite and all clean repeats.
- [ ] Compatible prompt/campaign assets and coordinated suite integration.
- [ ] Collection assembly and consumer dependency/guidance updates.
Scriptorium, Audita, and Notarius adoption are complete, and their reviewed role
commits are pushed. Standalone Narratio adoption is implemented as Feature 0027;
independent review is pending. Later features will be scoped individually; this
ordering does not require separate features for every
listed integration deliverable. Keep one active implementation plan at
All four standalone adoptions are complete after independent review, and their
reviewed role commits are pushed. Coordinated assets/suite integration is next.
Later features will be scoped individually; this ordering does not require
separate features for every listed integration deliverable. Keep one active
implementation plan at
[implementation.md](implementation.md), following roadmap approval.
### Boundaries and Migration Consequences

View File

@@ -1,6 +1,6 @@
# Feature 0027: Adopt Narratio v4.0.0 in the Standalone Role
Status: in_progress
Status: done
Approved: 2026-12-03, including the discovery-compatible configuration filename.
@@ -273,8 +273,8 @@ is needed. The binary stat remains justified by missing-output build recovery.
## Implementation Evidence
Standalone role commit `2a4e82c734a256a02281dbb6e63b348a7171f808` implements the
v4 source build and native configuration interface. Independent review is
pending; this feature is not yet complete.
v4 source build and native configuration interface. Workspace handoff `5a476d3`
records the implementation results.
From the role repository, `bash -n tests/integration`, `git diff --check`, and
`tests/integration` passed. The integration harness installed the pinned
@@ -307,11 +307,36 @@ Existing system configuration and old spool/cache/session data were not
migrated or deleted. This is not an operational deployment or a suite
compatibility claim.
## Independent Review and Closeout
Closed on 2026-12-03 after independent review of role `2a4e82c` against the
approved roadmap and executed plan. No required code-quality fixes,
implementation gaps, or unnecessarily strengthened requirements were found.
`docs/roadmap/remediation.md` was left unchanged.
The reviewer independently reran `bash -n tests/integration`, changed-commit
whitespace checks, and the full `tests/integration` harness. Syntax checking,
production-profile lint, native app validation/inspection, imports, synthetic
secrets bootstrap, explicit version selection, and custom-Go missing-binary
recovery passed. All four immediate repeats reported `changed=0` and `failed=0`.
Changed documentation's local links passed as well.
The role retains its direct declarative task flow, original build condition,
and nullable native configuration interface. Test fixtures were removed; no
existing system configuration, old directories or session data were migrated.
No live provider, operational deployment, or coordinated suite compatibility
was validated. Suite, collection, consumer and asset selections remain unchanged.
The reviewed role commit was pushed to upstream `main` during closeout. This
publishes the standalone update without creating a new tagged release or
advancing the suite compatibility set. Git history preserves the executed plan;
no implementation plan is active.
## Dependencies and Follow-up Work
Features 0024, 0025 and 0026 are complete after independent review and provide
native interface/build examples. This roadmap is approved; its
[staged implementation plan](../implementation.md) is approved and ready to execute.
native interface/build examples. Standalone Narratio adoption and independent
review are now complete as well.
Coordinated integration follows Narratio implementation, review and closeout.
It owns shared campaign/party/glossary and prompt assets, reference-catalog

View File

@@ -1,314 +1,12 @@
# Implementation Plan 0027: Adopt Narratio v4.0.0
# Implementation Plan
Status: ready
No implementation plan is active.
Approved: 2026-12-03
[Feature 0027: Standalone Narratio v4.0.0 adoption](features/0027-narratio-v4-adoption.md)
is complete after independent review with no findings. Git history preserves
its executed staged plan.
Target executor: GPT-5.6-Terra
Feature roadmap: [Feature 0027](features/0027-narratio-v4-adoption.md), approved
2026-12-03, including the native discovery filename.
Active plan location: `docs/roadmap/implementation.md`
## Objective
Deliver the approved standalone Narratio v4.0.0 source installation and native
configuration interface, current operator guidance and focused offline tests.
The feature roadmap owns scope, policy and acceptance criteria. Keep the coupled
interface and its tests coherent in one role commit, followed by a workspace
handoff for independent review.
## Execution Rules
- This plan is approved for implementation. Execute Stage 1 then Stage 2.
Immediately before each stage, reread its Required Policy Review documents
and confirm its preconditions and repository state.
- Preserve unrelated work. Commit each validated stage in its owning repository
and mark completion here. Do not push, publish, deploy to an operational host,
or advance suite/collection/consumer/asset selections.
- Trust state-management modules. Retain the binary stat solely to decide
missing-output build recovery; rebuild on checkout change or binary absence.
Preserve task-level escalation and imperative build change semantics. Add no
production probes, state assembly, fingerprints or compatibility/migration
machinery. Do not test module postconditions or default identities.
- Native preflight, processing, family expansion, provider calls, storage I/O,
actual credentials and the full upstream release suite are outside validation.
- Missing tools on PATH do not imply a missing controller. Use workspace `.venv`
executables; follow README setup with `requirements-dev.txt` if necessary.
Local preparation is ordinary work, not an operational deployment requirement.
Report genuine remaining prerequisites or contract conflicts with evidence;
do not replace required behavior or add unrelated acceptance gates.
## Starting State and Preconditions
- The feature roadmap and this implementation plan are approved.
- `ansible-role-narratio` is clean on `main` at
`758aed7a74c9a64ad02e13ff551b4f7aea16b3af`. It selects v3.1.0, Go
`1.26/stable`, and `/usr/local/etc/narratio/pipeline.yml`. Recheck before work.
- Read-only `../narratio` tag v4.0.0 resolves to
`831665c9137877e250e667c06d1a383a95a14eef`. Use this tag's contracts even
if the checkout later advances. Its module requires Go 1.27.0 or newer.
- Planning checks found Ansible Core 2.21.3 in `.venv`, Go 1.27.4 at
`/snap/bin/go`, and working `sudo -n true`. The local Ubuntu 26.04 host is
the authorized role test host; recheck prerequisites when executing.
- The harness may update `/usr/local/src/narratio`, `/usr/local/bin/narratio`,
the application account and managed roots, and the Go Snap. Use temporary
caller-owned configuration fixtures. Do not open/migrate existing sessions
or delete old configuration/spool/cache directories.
- Retain `collections/requirements.yml` selecting `community.general` 13.3.0
and its temporary collection installation. Other pins stay unchanged.
## Repository Scope
- `ansible-role-narratio`: defaults, argument specs, production tasks, one
template, README and role-local tests.
- Workspace: plan progress, feature evidence, status and upgrade sequence.
- Narratio and selected framework sources, and reviewed standalone roles:
read-only references. Follow their repository-local agent reading guides.
- Other roles, assets, collection and consumer: unchanged; their integration
suites are not prerequisites for this standalone feature.
## Stage 1: Deliver the Native Role and Offline Behavioral Coverage — Complete
### Objective
Leave one coherent role that builds v4.0.0, renders supported native settings,
and documents and verifies the caller boundary without obsolete inputs.
### Required Policy Review
Immediately read workspace `AGENTS.md`, `docs/orientation.md`,
`docs/conventions.md`, `docs/ansible.md`, `docs/testing.md` and the approved
feature roadmap. Check role-local instructions. Before upstream inspection,
read `../narratio/AGENTS.md`, `docs/development.md` and `docs/policy/agents.md`
in that repository. Use the tagged release, config, CLI, operations and
integration references linked by the roadmap for the consumer contract.
### Preconditions
Plan approval and starting-state/tool checks are confirmed. Inspect defaults,
argument specs, tasks, `templates/pipeline.yml.j2`, README, `tests/integration`,
`tests/converge.yml`, `tests/representative.yml`, both verification playbooks,
inventory and collection requirements before editing.
### Owning Repository
`ansible-role-narratio`
### Required Changes
1. Select `narratio_version: v4.0.0`, `narratio_go_snap_channel: 1.27/stable`
and `narratio_config_path: /usr/local/etc/narratio/narratio.yml`. Preserve
other installation inputs and account/configuration metadata from the
roadmap. Keep `./cmd/narratio`, `-trimpath`, `CGO_ENABLED=0`, `GOWORK=off`
and `GOTOOLCHAIN=local`. Replace the retired linker override with:
```yaml
"-s -w -X go.maximumdirect.net/releasekit/internal/runtimeinfo.injectedVersion={{ narratio_version }}"
```
2. Remove the eight retired variables enumerated by the roadmap from active
defaults, specs, template and fixtures. Replace the mutable-root loop with
an ordinary file task for `narratio_workspace_root`, retaining its ownership
and `2775` mode. Preserve campaign-root and account management. Do not remove
legacy files/directories or change the binary build trigger.
3. Add all ten nullable variables in the roadmap's Native public variables
table with its exact names, destinations and types. Imports use dictionary
elements; render variants use string elements. Keep catalog dictionaries
and existing open-ended records unrestricted by role-authored child schemas.
Other supported variables retain their types and null defaults; the
WhisperX URL remains required.
4. Extend the single template with conditional native fields. Put imports and
bootstrap controls together under root `config`, catalog maps under
`reference_catalog`, and other fields under their mapped parents. Render
only non-null leaves/parents using serialization and `is not none`. Keep
workspace/campaign roots and WhisperX URL concrete; add no schema marker.
Preserve supported empty/false/zero values and nested nulls in caller records.
Root null render variants omits the field; `[]` selects none. Bootstrap is a
relative string, not an absolute-path transformation or role-managed directory.
Do not translate retired cache/module settings.
5. Update README defaults, inventory examples, validation and migration guide
together. Cover every Operator migration guidance item in the roadmap:
discovery/custom paths, main-file bootstrap, native imports, independently
owned downstream configuration, native cache/lane records, shared inputs,
unsupported older manifests, product-only restore and run-history cleanup.
Remove old instructions to edit manifests in place. Link tagged contracts.
Explain that old files become unmanaged and companions/credentials are caller
responsibilities. Add no provider/model/D&D policy or release machinery.
6. Adapt the existing harness/verification playbooks in place. Retain temporary
collection setup, local inventory, service-account inspection, cleanup,
syntax and production-profile lint. Use a unique temporary fixture root
traversable by `narratio`; it contains the explicitly selected managed file,
one imported fragment and a restricted synthetic secrets directory. Fixture
setup owns companions and cleanup, outside the production role. Update all
hard-coded configuration reads/commands to the supplied test path; leave
existing system configurations untouched.
Retain four representative cases, each followed immediately by an identical
role application requiring `changed=0` and `failed=0`:
- **Minimal:** explicitly null optional application inputs, select roots and
a synthetic HTTP WhisperX URL, and validate the selected main as `narratio`.
Verify selected omissions in authored YAML rather than comparing a complete
default document. No campaign/session/downstream file is needed.
- **Version/recovery:** replace v2.1.0 with explicitly requested v4.0.0.
Remove the test host's installed binary, disable dependency management and
supply the existing logging Go wrapper. Confirm wrapper use and native
selected version identity (use structured version fields rather than
requiring an exact text line with no revision), then repeat identically.
Fold the old standalone
version-switch run into this case rather than retaining a redundant legacy
case. Explicitly select a custom `pipeline.yml` fixture path here to retain
useful configurable-path coverage.
- **Representative:** migrate the current fixture to v4.0.0, retaining
meaningful zero/false/string/composition assertions. Add a required relative
import, e.g. `fragments/imported.yml` supplying a non-default WhisperX
language while its root role input is null. Supply `config.secrets_dir:
secrets` and explicit overwrite false; fixture files provide the synthetic
names already used by credential tests. Validate without setting empty
environment values that would shadow those files. Supply both catalog maps
and a session-template path; app inspection only resolves these paths and
needs no vocabulary/template contents. Supply native Notarius `cache:
bypass`, debug false, config/pipeline selection, party/combined-glossary
bindings and an output with `lane_id` and flat JSON filename. Enable its
section for native field validation without invoking Notarius. Retain named
overlay/profile selectors and credential lists. Compose Scriptorium artifacts
and families in inventory; use a small family shaped from the tagged example
with `for_each: party.characters` and an
`artifacts/{character_id}-notes.md` output pattern. Inspect the declaration
without a party or expansion. Include a supported nested null such as
a family's `render_debug: null` and verify authored pass-through. Supply
Audita debug false and
`render.variants: [normalized]`. Keep cleanup/publish disabled in the fixture.
- **Explicit empty:** reuse the representative fixture with credential lists
`[]`, empty downstream selectors, render variants `[]`, catalog maps `{}`,
Notarius references `{}`, and null bootstrap/import controls. Keep the
enabled Notarius section's required config/pipeline/lane declarations.
Preserve the useful credential-only Scriptorium parent case by nulling its
other fields, including families. Verify supplied empty values and validate
offline. Do not create a matrix of every upstream clearing rule.
Use native commands with flags after the full command path:
```sh
narratio version --format text
narratio version --format json
narratio config validate --config "$fixture_config" --scope app
narratio config show --config "$fixture_config" --scope app --format json
```
Run config commands as `narratio`, with a fixture path readable by that
account. Inspect selected paths when practical; assert only supplied outcomes.
Native views may omit bootstrap controls or redact credentials: inspect
authored YAML for control/reference spelling and use native loading for
composition. Do not assert resolved secrets or bootstrap precedence internals.
Retain useful synthetic-value log checks without expanding a redaction matrix.
Omit preflight, domain planning, artifact expansion and processing commands.
### Validation
From `ansible-role-narratio` run:
```sh
bash -n tests/integration
git diff --check
tests/integration
```
The harness installs the pinned collection, syntax-checks its playbooks and runs
`ansible-lint --profile production --offline` on role test entry points and
fixture/verification playbooks after dependency setup. Adapt the current lint
invocation accordingly; do not suppress real failures. Native app validation,
inspection, explicit version/custom-Go recovery, supplied configuration and four
clean repeats must pass. Check README local links.
### Completion Criteria
Defaults, specs, tasks, template, documentation and tests agree with every
roadmap criterion. Record exact checks/results, clean repeats, test-host changes
and fixture adjustments. The role is valid before committing; resolve failures
before Stage 2. No production probes or extra runtime policy have been added.
No operational deployment or suite compatibility is claimed.
### Commit
Commit intent: `Update Narratio to its native version 4 interface`.
## Stage 2: Record the Implementation Handoff — Complete
### Objective
Identify the tested standalone role revision and leave Feature 0027 ready for
independent review while retaining the current suite compatibility set.
### Required Policy Review
Immediately reread workspace `AGENTS.md`, `docs/orientation.md`,
`docs/conventions.md`, `docs/planning.md` and `docs/testing.md`, plus the approved
roadmap and this plan, before recording claims and progress.
### Preconditions
Stage 1 is committed and all checks passed. Inspect actual role/workspace
changes and aggregate repository state; preserve unrelated work.
### Owning Repository
Workspace root.
### Required Changes
1. Add implementation evidence to Feature 0027: role commit, exact checks/results,
four clean repeats, supplied native-field/import/bootstrap outcomes,
version/custom-Go recovery, test-host effects, deviations and limits. State
that independent review is pending; do not mark the feature complete.
2. Update `docs/status.md`, the Feature 0027 upgrade-sequence entry and plan
progress. Use feature state `in_progress`; mark both execution stages
complete. Leave the plan available for review. Do not retire it, write
speculative remediation or start coordinated integration.
3. Confirm other repositories and compatibility pins remain unchanged. Record
unrelated dirt separately; ahead-of-origin commits alone are not failures.
### Validation
From the workspace root run:
```sh
git diff --check
git -C ansible-role-narratio status --short
scripts/status
```
Check edited Markdown links and compare the actual role diff and validation
evidence with each acceptance criterion. Reuse Stage 1 results for unchanged
role code; do not rerun other suites. Review and commit the workspace handoff.
### Completion Criteria
The handoff identifies the tested revision, results and pending review. Both
owning repositories have no uncommitted feature work after their commits;
compatibility selections remain intact. No provider, operational deployment,
older-state migration or end-to-end suite validation is claimed.
### Commit
Commit intent: `Record the Narratio version 4 update for review`.
## Final Validation and Handoff
Report both commits, validation outcomes, four clean repeats, deviations,
remaining failures, test-host changes and deferred integration work. Identify
complexity added beyond the planned flow and the requirement it serves.
Feature 0027 remains in progress until independent review and closeout.
## Progress Notes
Both stages are complete. Role commit `2a4e82c` passed the complete offline
integration suite, including four clean repeated convergences. Implementation
evidence is recorded in Feature 0027; independent review is pending.
## Open Questions
None. The roadmap resolves filename, interface and ownership; this plan assigns
concrete implementation and validation boundaries.
The next recommended scope in the
[agreed upgrade sequence](application-upgrade-sequence.md) is coordinated
asset/suite integration. Agree on its feature roadmap before preparing a new
staged plan here. Collection assembly and consumer updates follow integration.