Close out the Scriptorium upgrade

This commit is contained in:
2026-12-03 12:22:25 +00:00
parent 3aa83a6044
commit 65d8e5970c
4 changed files with 51 additions and 339 deletions

View File

@@ -18,17 +18,18 @@ These are repository selections, not observations of an operational host.
Seriatim remains at v1.5.0. The reviewed Narratio v4.0.0 integration baselines
match the other three targets.
- [ ] [Feature 0024: Standalone Scriptorium adoption](features/0024-scriptorium-v0-16-adoption.md) — role `e936d52` implemented and validated; independent review pending.
- [ ] Standalone Audita adoption — select and plan after Scriptorium review.
- [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.
- [ ] Standalone Audita adoption — next recommended scope, targeting v4.3.0.
- [ ] Standalone Notarius adoption.
- [ ] Standalone Narratio adoption.
- [ ] Compatible prompt/campaign assets and coordinated suite integration.
- [ ] Collection assembly and consumer dependency/guidance updates.
Only the Scriptorium feature is selected for detailed planning. 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.
The Scriptorium feature is complete and no implementation plan is active.
Select and scope the Audita feature 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 0024: Adopt Scriptorium v0.16.0 in the Standalone Role
Status: in_progress
Status: done
## Summary
@@ -118,7 +118,7 @@ behavior rather than adding a role-specific loader.
- `ansible-role-scriptorium`: installation defaults/build, public configuration
variables, argument spec, template, documentation, and local tests.
- Workspace: roadmap, later implementation plan, tracking, and review evidence.
- Workspace: roadmap, implementation tracking, and review evidence.
- Scriptorium and selected framework sources: read-only release contracts.
- All other roles, assets, collection, and consumer repositories: unchanged.
@@ -170,10 +170,10 @@ configuration-assembly facts, or persisted role-private state is needed.
## Dependencies and Follow-up Work
The standalone role implementation is ready for independent review. The plan at
[implementation.md](../implementation.md) records the handoff.
The standalone role implementation and independent review are complete. Git
history preserves the executed staged plan; no implementation plan is active.
Audita adoption follows independent review and closeout. Later prompt-asset
Audita adoption is next in the agreed sequence. Later prompt-asset
migration must retain compatibility for the existing suite until cutover, as
recorded in the upgrade sequence. Final integration owns the new Scriptorium
configuration bindings, compatible prompt content, coordinated pins, and consumer
@@ -182,8 +182,8 @@ guidance. This feature does not claim end-to-end D&D compatibility by itself.
## Implementation Evidence
Standalone role commit `e936d5200df675feeb53be235a175b608c0afc7c` implements
the native interface and source-build identity. Independent review is pending;
the feature remains in progress.
the native interface and source-build identity. Workspace handoff `3aa83a6`
records the implementation results.
From `ansible-role-scriptorium`, the following passed:
@@ -203,7 +203,7 @@ output matched `scriptorium v0.16.0`. All four immediate repeats reported
`changed=0` and `failed=0`.
The representative schema root is source-relative within the temporary fixture
configuration directory, as required by the native resource resolver. Initial
configuration directory. Initial
fixture attempts exposed the need for a positive concurrency limit with queue
capacity and a source-relative schema root; the corrected full run passed. The
local test host's Go Snap was switched from `1.26/stable` to `1.27/stable` and
@@ -212,6 +212,27 @@ operational deployment, suite compatibility, or credential validation is claimed
No production task or rebuild trigger was added, and suite selections remain
unchanged.
## Independent Review and Closeout
Closed on 2026-12-02 after independent review of role `e936d52` against the
approved roadmap and executed plan. No actionable code-quality issues,
implementation gaps, or unnecessary strengthening of 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 validation and resource inspection, explicit
version selection, custom-executable missing-binary recovery, and all four
immediate repeats passed; each repeat reported `changed=0` and `failed=0`.
Edited documentation's local links passed validation as well.
The role retains its minimal production task flow and original build trigger.
Native configuration fields preserve omission and explicit falsey values.
Other role, suite, collection, consumer, and asset selections remain unchanged.
The review exercised only the authorized local test host; it did not establish
live provider behavior or coordinated suite compatibility. Role and workspace
commits remain local pending separately authorized publication.
## Upstream References
- [v0.16.0 release notes](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/releases/v0.16.0.md)

View File

@@ -1,324 +1,12 @@
# Implementation Plan 0024: Adopt Scriptorium v0.16.0
# Implementation Plan
Status: ready
No implementation plan is currently active.
Target executor: GPT-5.6-Terra
[Feature 0024](features/0024-scriptorium-v0-16-adoption.md) was closed on
2026-12-02 after implementation and independent review with no actionable
findings. Its roadmap retains the completion evidence; Git history preserves
the executed staged implementation plan.
Feature roadmap: [Feature 0024](features/0024-scriptorium-v0-16-adoption.md)
Active plan location: `docs/roadmap/implementation.md`
## Objective
Deliver the approved standalone Scriptorium v0.16.0 role update with native
configuration, Go 1.27, correct version identity, and focused offline behavioral
coverage. The feature roadmap owns scope and rationale. Its public-interface
migration is small and coupled enough to implement and validate in one role
stage, followed by a separate workspace handoff stage. Do not commit an
intermediate role whose configuration or tests still use the retired interface.
## Execution Rules
- Execute Stage 1, then Stage 2. Reread each stage's required policies immediately
before beginning it; confirm its preconditions and owning repository.
- Preserve pre-existing changes. Commit each completed stage in its owning
repository with the stated plain English message after validation. No push,
release, consumer refresh, or operational deployment is part of this plan.
- Keep the current module-driven task flow. The binary stat is necessary for
the imperative build; rebuilding remains conditional on checkout change or
binary absence. Trust file, Git, Snap, APT, and template module postconditions.
- Add no production validation, version interrogation, sidecar state,
configuration-assembly facts, compatibility loader, or custom Ansible module.
- Tests exercise supplied values and observable outcomes. Do not add default
identity snapshots, module-postcondition assertions, task trace checks,
upstream framework test matrices, or provider calls.
- Missing local tools are setup work. Use the existing workspace tooling and
local test host; do not invent requirements for another controller,
`pipeline-dnd`, `ansible-doc`, live credentials, or upstream release checks.
- If an actual contract conflict or unavailable prerequisite remains after
ordinary setup, report the concrete failure and preserve work. Do not change
the approved scope or silently weaken a required role outcome to bypass it.
## Starting State and Preconditions
- The feature roadmap and this implementation plan are approved. No application
implementation has been performed by the planning pass.
- The standalone role starts at `b174c8c2990bb79f8149d8f288c5e06ccb42bd73`
on `main`, with Scriptorium v0.15.0 and Go `1.26/stable` selected. Confirm the
actual tree before editing; preserve later unrelated changes if present.
- The application source is `../scriptorium`. Public v0.16.0 resolves to
`0fa538c336fd64be51bc355fd53d3ca19f104d68`. Use the tag's configuration and
CLI contracts, not later branch changes.
- The workspace `.venv/bin/ansible-playbook` is already available at planning
time. If absent in the execution environment, follow `README.md`'s Development
Tooling section using `requirements-dev.txt`; do not change pinned tooling
merely to set up the environment.
- The existing local test host is Ubuntu 26.04 and is the approved test proxy.
Its role harness uses sudo, `/usr/local/src/scriptorium`,
`/usr/local/bin/scriptorium`, and `/usr/local/etc/scriptorium/config.yml`.
Local test convergence may change those paths and provision Go through Snap;
it is distinct from deploying to an operational controller or host.
- Source builds use the role-selected Go executable, not whichever `go` first
appears on PATH. The updated role provisions `1.27/stable`; dependency opt-out
tests run after a compatible Go executable is available. Keep
`GOTOOLCHAIN=local` rather than relying on implicit toolchain downloads.
- The existing collection requirement is `community.general` 13.3.0. Reuse it
and the harness's temporary collection path. Other dependency pins stay put.
## Repository Scope
- `ansible-role-scriptorium`: production defaults/spec/template/build, README,
and repository-local test fixtures/harness.
- Workspace: implementation tracking and review evidence for Feature 0024.
- `../scriptorium` and its selected framework sources are read-only references.
If their instructions require policy reading for investigation, follow the
upstream `AGENTS.md` reading guide; do not modify those repositories.
- Pipeline, collection, consumer, other roles, and both asset repositories
remain unchanged. Do not run their integration suites: they still select the
earlier compatibility set and are outside this standalone feature.
## Stage 1: Deliver the Native Scriptorium Role and Its Offline Tests
**Complete:** role implementation and required offline validation passed.
### Objective
Leave one coherent, documented, tested standalone role that installs and
configures the released Scriptorium v0.16.0 interface.
### Required Policy Review
Before beginning this stage, read these workspace-relative files:
- `AGENTS.md`
- `docs/orientation.md`
- `docs/conventions.md`
- `docs/ansible.md`
- `docs/testing.md`
Then read the approved feature roadmap and the tagged upstream configuration,
CLI migration, and PromptKit migration documents linked there. Inspect any
repository-local agent instructions before changing the role.
### Preconditions
The starting-state checks above are satisfied and this plan is approved.
Inspect `defaults/main.yml`, `meta/argument_specs.yml`, `templates/config.yml.j2`,
`tasks/main.yml`, `README.md`, `tests/integration`, `tests/converge.yml`, and
`tests/verify-config.yml` in the owning repository before editing.
### Owning Repository
`ansible-role-scriptorium`
### Required Changes
1. Set `scriptorium_version: v0.16.0` and
`scriptorium_go_snap_channel: 1.27/stable`. Keep the repository URL, paths,
metadata defaults, dependency-management switch, and Go executable interface.
Continue building `./cmd/scriptorium` using the existing command task and
build environment. Replace the ldflags argument with:
```yaml
"-s -w -X go.maximumdirect.net/releasekit/internal/runtimeinfo.injectedVersion={{ scriptorium_version }}"
```
This is the injection symbol used by the selected ReleaseKit v0.10.0 build
implementation, surfaced through public `buildinfo.Version()`. No ReleaseKit
launcher, build receipt, new public flag variable, or release tooling is needed.
2. Replace the old configuration interface with the six nullable variables
specified in the feature roadmap. In the argument spec use optional
`list`/`elements: dict` for imports and the three resource lists, `dict` for
collections, and `path` for schema root. Remove the six retired variables
listed in the roadmap from defaults, spec, template, tests, and active examples;
mention them only in migration documentation. Keep the supported server and
transient-retry variables unchanged.
3. Use the existing single configuration template. Render imports beneath
`config` and native resource fields beneath `promptkit`, with a parent
predicate covering every supported descendant. Serialize collections and
strings appropriately and select fields with `is not none`. Preserve `[]`,
`{}`, zero, and false inside supplied structures. Render `{}` when all
application settings are null. Do not merge or translate resource definitions.
4. Update README defaults, inventory examples, validation description, and
migration guidance together. Explain the variable replacements, caller-owned
fragments and source-relative resources, qualified IDs, whole-record same-ID
replacement, native overlay versus LLM profile selection, and the new CLI
boundary. Link upstream for discovery, secrets bootstrap, structural-repair
budgets, and removed profile IDs. The role supplies native fields and imports;
it does not deploy arbitrary referenced assets or secret files.
5. Migrate the existing harness and verifier in place. Keep its temporary paths,
local inventory, dependency installation, cleanup, and clean-repeat checks.
Delete the obsolete profile-directory fixtures and retired inspection flags.
Use these existing behavioral cases rather than adding parallel test tooling:
- **Minimal configuration:** explicitly supply null for the supported optional
application fields, validate the managed document with native `config
validate`, and verify it parses as `{}`. This proves supplied null omission,
not current default identity. Immediately repeat identical convergence.
- **Recovery and executable selection:** retain removal of the test binary
and the existing caller-supplied Go wrapper with dependency management
disabled. Explicitly request `scriptorium_version: v0.16.0` in this case
and its repeat. Require wrapper use and native `scriptorium version` output
`scriptorium v0.16.0`. Do not inspect linker arguments as a test assertion.
- **Representative native configuration:** supply a synthetic backend list,
profile list, prompt list, collection mapping containing a namespaced
profile/prompt, and a schema-root path under the temporary fixture root.
Use explicit IDs such as `fixture-backend`, `fixture-profile`,
`fixture-prompt`, and `fixture/offline`/`fixture/note`. Give profiles a
synthetic model and localhost endpoint/backend, without a credential
reference. Prompts use inline messages and a native text output contract
with validation disabled, so inspection needs no provider or real assets.
Include server address, request limit zero, retry zero, queue capacity
zero, and a nested false parameter. Verify supplied fields through the
deployed document and native offline inspection; leave selected nullable
server fields unset and assert their omission. Repeat identical convergence.
- **Caller-owned import and empty containers:** retain a small temporary
`fragments/server.yml`, selected with
`scriptorium_config_imports: [{path: fragments/server.yml, required: true}]`.
Select the temporary main config path and caller ownership as before.
Also supply empty resource lists and an empty collections mapping in this
case. Check their literal deployment and null schema-root omission, then
use native configuration inspection to verify the imported server address.
Repeat identical convergence. Keep import behavior and empty-container
rendering in this existing case instead of adding a combinatorial matrix.
Synthetic names and values above are test inputs, never production defaults.
Use native commands with flags after the full command path, for example:
```sh
/usr/local/bin/scriptorium config validate --config "$config_path"
/usr/local/bin/scriptorium promptkit show profile fixture-profile --config "$config_path" --format json
/usr/local/bin/scriptorium promptkit show prompt fixture/note --config "$config_path" --format json
/usr/local/bin/scriptorium config show --config "$import_config_path" --path /server/addr --format json
```
Path-selected native config show returns the selected effective value; parse
that JSON scalar rather than assuming the retired full-document report shape.
Successful inspection of explicitly supplied resource IDs plus assertions of
caller fields is sufficient. Do not test the bundled catalog, run generation,
call smoke/preflight, or test framework inheritance internals.
### Validation
From `ansible-role-scriptorium`, run:
```sh
bash -n tests/integration
git diff --check
tests/integration
```
The harness must run native offline validation/inspection, the revised supplied
configuration assertions, version selection and missing-binary/custom-executable
recovery, and immediate clean repeats. Its existing syntax and lint invocations
must pass with the updated fixtures. Retain production-profile lint; do not
silence real failures. An unrelated dependency-download attempt by lint can be
avoided using its offline mode after installing the pinned dependencies.
Tool setup follows workspace README instructions. If the harness needs sudo
authentication, use the available local privilege mechanism and report an actual
access failure accurately. No remote-controller login or API keys are needed.
Do not run the full upstream application/release suites as an additional gate.
### Completion Criteria
The installed application reports the explicitly requested version, all selected
native configuration behaviors work offline, and identical repeats report
`changed=0` with no failures. Defaults/spec/template/README agree. No production
task or rebuild trigger was added. Record the commands and results for handoff;
only role-owned changes belong in this stage's commit.
### Commit
Commit intent: `Update Scriptorium to its native configuration interface`.
## Stage 2: Record the Implementation Handoff
**Complete:** implementation evidence and pending review recorded.
### Objective
Record the tested standalone role revision and leave the feature ready for
independent review, with the existing suite compatibility set intact.
### Required Policy Review
Before beginning this stage, reread these workspace-relative files:
- `AGENTS.md`
- `docs/orientation.md`
- `docs/conventions.md`
- `docs/planning.md`
- `docs/testing.md` before recording validation claims
### Preconditions
Stage 1 is committed and its required validation passed. Inspect the role's
actual commit and working-tree state and the workspace's outstanding changes.
### Owning Repository
Workspace root.
### Required Changes
1. Add concise implementation evidence to Feature 0024: role commit, native
configuration/version outcomes, exact commands run, clean-repeat evidence,
limitations, and any deviations. Leave independent review explicitly pending.
2. Update `docs/status.md` and the current section of
`docs/roadmap/application-upgrade-sequence.md` to identify the implemented
role and pending review. Use `in_progress`, not `done`; do not advance to
Audita implementation before review and closeout.
3. Keep concise progress notes in this plan. Do not retire it, write speculative
remediation findings, update suite/collection/consumer pins, or start the next
feature as part of handoff. Preserve other repositories' pre-existing work.
### Validation
From the workspace root, run:
```sh
git diff --check
git -C ansible-role-scriptorium status --short
scripts/status
```
Check edited Markdown's local links. Compare the final role diff and recorded
evidence with every feature acceptance criterion. Reuse Stage 1's successful
checks for unchanged code; rerun only checks affected by subsequent changes.
Confirm the unrelated repository trees and dependency selections were not changed
by this feature. Do not interpret existing ahead-of-origin commits as a failure.
### Completion Criteria
Documentation accurately identifies the tested role revision, evidence, and
pending review. The role and workspace have no uncommitted feature work after
the handoff commit; report unrelated changes separately. No suite deployment,
publication, or credential validation is claimed.
### Commit
Commit intent: `Record the Scriptorium update for review`.
## Final Validation and Handoff
Report both commit identifiers, actual validation results, any deviations or
remaining failures, and any complexity added beyond the planned task flow with
the requirement that justified it. Report whether optional local tooling setup
changed the shared test host. Feature completion requires independent review;
do not mark Feature 0024 done. The next selected application in the agreed
sequence is Audita, after this feature's review and closeout.
## Progress Notes
Role `e936d5200df675feeb53be235a175b608c0afc7c` passed the required offline
checks. Workspace handoff records the results; independent review is pending.
## Open Questions
None. Scope, native variable mapping, version injection, toolchain selection,
offline validation, and repository boundaries are settled for this feature.
The next recommended scope is standalone Audita v4.3.0 adoption, following the
[agreed upgrade sequence](application-upgrade-sequence.md). Agree on its feature
roadmap before preparing a new staged plan.

View File

@@ -4,12 +4,14 @@ Last updated: 2026-12-02
Current milestone: Operational D&D pipeline deployment
Current focus: Feature 0024's standalone Scriptorium v0.16.0 role is
implemented at `e936d52` and awaits independent review. The agreed sequence is
Current focus: Feature 0024 is complete after independent review with no findings.
The standalone Scriptorium v0.16.0 role is recorded at `e936d52`; no implementation
plan is active. Standalone Audita v4.3.0 adoption is the next recommended scope.
The agreed sequence is
Scriptorium → Audita → Notarius → Narratio → coordinated assets/suite integration
→ collection and consumer updates. Existing suite pins remain unchanged. See the
[upgrade sequence](roadmap/application-upgrade-sequence.md) and
[current feature](roadmap/features/0024-scriptorium-v0-16-adoption.md).
[completion evidence](roadmap/features/0024-scriptorium-v0-16-adoption.md).
| ID | Deliverable | Owner | State | Evidence or next step |
| --- | --- | --- | --- | --- |
@@ -46,7 +48,7 @@ Scriptorium → Audita → Notarius → Narratio → coordinated assets/suite in
| F0022 | Integrate the reviewed application upgrades | Pipeline role, collection, consumer, and workspace | done | Closed after review and resolution of all three findings; public pipeline `37b1cf6`, public collection `b3bc045`, local consumer `15f0f4e`; [remediation evidence](roadmap/remediation.md) |
| A0001 | Audit completed standalone-role test suites | workspace and standalone roles | done | Findings recorded in `docs/roadmap/test-suite-audit-findings.md` |
| F0023 | Adopt Narratio v3.1.0 and forward Scriptorium credentials | Narratio role, pipeline role, collection, consumer, and workspace | done | Public Narratio role `758aed7a`, pipeline `0f841fd`, collection `002e86c`; local consumer `67cc22f`. Independent review found no actionable issues; [feature evidence](roadmap/features/0023-narratio-scriptorium-credentials.md) |
| F0024 | Adopt Scriptorium v0.16.0 | Scriptorium role and workspace | in_progress | Role `e936d52` validated; [evidence](roadmap/features/0024-scriptorium-v0-16-adoption.md); independent review pending; suite unchanged |
| F0024 | Adopt Scriptorium v0.16.0 | Scriptorium role and workspace | done | Role `e936d52` passed independent review with no findings and a fresh full offline suite run; [completion evidence](roadmap/features/0024-scriptorium-v0-16-adoption.md); suite unchanged |
| R0001 | Simplify completed standalone-role test suites | workspace and standalone roles | done | Role commits `e08c63c`, `d2d0b9d`, and `cfecf37` passed implementation and independent review |
## Updating This File