16 KiB
Implementation Plan 0024: Adopt Scriptorium v0.16.0
Status: ready
Target executor: GPT-5.6-Terra
Feature roadmap: Feature 0024
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
b174c8c2990bb79f8149d8f288c5e06ccb42bd73onmain, with Scriptorium v0.15.0 and Go1.26/stableselected. Confirm the actual tree before editing; preserve later unrelated changes if present. - The application source is
../scriptorium. Public v0.16.0 resolves to0fa538c336fd64be51bc355fd53d3ca19f104d68. Use the tag's configuration and CLI contracts, not later branch changes. - The workspace
.venv/bin/ansible-playbookis already available at planning time. If absent in the execution environment, followREADME.md's Development Tooling section usingrequirements-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
gofirst appears on PATH. The updated role provisions1.27/stable; dependency opt-out tests run after a compatible Go executable is available. KeepGOTOOLCHAIN=localrather than relying on implicit toolchain downloads. - The existing collection requirement is
community.general13.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.
../scriptoriumand its selected framework sources are read-only references. If their instructions require policy reading for investigation, follow the upstreamAGENTS.mdreading 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.mddocs/orientation.mddocs/conventions.mddocs/ansible.mddocs/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
-
Set
scriptorium_version: v0.16.0andscriptorium_go_snap_channel: 1.27/stable. Keep the repository URL, paths, metadata defaults, dependency-management switch, and Go executable interface. Continue building./cmd/scriptoriumusing the existing command task and build environment. Replace the ldflags argument with:"-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. -
Replace the old configuration interface with the six nullable variables specified in the feature roadmap. In the argument spec use optional
list/elements: dictfor imports and the three resource lists,dictfor collections, andpathfor 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. -
Use the existing single configuration template. Render imports beneath
configand native resource fields beneathpromptkit, with a parent predicate covering every supported descendant. Serialize collections and strings appropriately and select fields withis not none. Preserve[],{}, zero, and false inside supplied structures. Render{}when all application settings are null. Do not merge or translate resource definitions. -
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.
-
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.0in this case and its repeat. Require wrapper use and nativescriptorium versionoutputscriptorium 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, andfixture/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 withscriptorium_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:
/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 jsonPath-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.
- Minimal configuration: explicitly supply null for the supported optional
application fields, validate the managed document with native
Validation
From ansible-role-scriptorium, run:
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.mddocs/orientation.mddocs/conventions.mddocs/planning.mddocs/testing.mdbefore 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
- 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.
- Update
docs/status.mdand the current section ofdocs/roadmap/application-upgrade-sequence.mdto identify the implemented role and pending review. Usein_progress, notdone; do not advance to Audita implementation before review and closeout. - 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:
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.