191 lines
10 KiB
Markdown
191 lines
10 KiB
Markdown
# Feature 0024: Adopt Scriptorium v0.16.0 in the Standalone Role
|
|
|
|
Status: ready
|
|
|
|
## Summary
|
|
|
|
Update the standalone Scriptorium role to v0.16.0, its native shared
|
|
configuration interface, and its source-build requirements. This is the first
|
|
selected feature in the current [application upgrade sequence](../application-upgrade-sequence.md).
|
|
Suite integration and production prompt assets remain separate work.
|
|
|
|
## Problem or Opportunity
|
|
|
|
Scriptorium v0.16.0 replaces the former application CLI and resource-directory
|
|
configuration with native CommandKit and ConfigKit/PromptKit interfaces. The
|
|
current role targets v0.15.0, renders retired fields, and provisions Go 1.26.
|
|
A version bump alone cannot produce a usable migrated installation.
|
|
|
|
The release requires Go 1.27.0 or newer and reads version identity through
|
|
ReleaseKit. A local source build must embed the selected identifier to report
|
|
the requested version rather than `dev`. Existing tests also invoke retired
|
|
inspection commands and use obsolete resource formats.
|
|
|
|
## Scope
|
|
|
|
- Select v0.16.0 and a compatible Go Snap channel by default.
|
|
- Adapt the ordinary build command to the released version-identity contract.
|
|
- Replace retired configuration variables with native field-specific variables;
|
|
preserve supported server and transient-retry settings.
|
|
- Update argument specifications, the single template, operator guidance, and
|
|
existing offline behavioral tests.
|
|
- Record the reviewed role revision for later suite integration.
|
|
|
|
## Non-goals
|
|
|
|
- Changing application upstream code, other roles, suite/collection/consumer
|
|
pins, or installing the new version on an operational host.
|
|
- Migrating the D&D prompt-library repository or campaign assets, selecting
|
|
production/testing models, or changing credential-delivery policy.
|
|
- Managing arbitrary imported files, overlays, prompt collections, secrets,
|
|
or an HTTP service in the standalone role.
|
|
- Legacy configuration/CLI conversion, compatibility aliases, provider smoke
|
|
checks, HTTP integration testing, or new Ansible release publication.
|
|
- Adopting ReleaseKit's release workflow, receipts, or artifact delivery as
|
|
production installation machinery.
|
|
|
|
## Target End State
|
|
|
|
### Source installation
|
|
|
|
`scriptorium_version` defaults to `v0.16.0` and
|
|
`scriptorium_go_snap_channel` to `1.27/stable`. Preserve the configurable Go
|
|
executable and dependency opt-out; callers opting out provide a compatible
|
|
toolchain. The Go 1.27.0 application minimum is distinct from the upstream
|
|
maintainer's selected 1.27.4 release toolchain.
|
|
|
|
Continue building `./cmd/scriptorium` from the selected checkout directly to
|
|
the configured binary path, with the existing build environment and installation
|
|
metadata. Embed `scriptorium_version` using the version-injection contract used
|
|
by ReleaseKit v0.10.0. Retain the existing rebuild condition: checkout changed
|
|
or output binary absent. Do not add production version interrogation or checks
|
|
of the just-built binary.
|
|
|
|
### Native configuration interface
|
|
|
|
Keep the current configuration path and ownership/mode interface. All optional
|
|
application variables default to null, which omits the corresponding field.
|
|
With no application settings supplied, render `{}`. Preserve explicit supported
|
|
falsey values, and emit parent sections only for non-null descendants.
|
|
|
|
Introduce the following variables, all defaulting to null:
|
|
|
|
| Variable | Type | Native field |
|
|
| --- | --- | --- |
|
|
| `scriptorium_config_imports` | list of dictionaries | `config.imports` |
|
|
| `scriptorium_promptkit_backends` | list of dictionaries | `promptkit.backends` |
|
|
| `scriptorium_promptkit_profiles` | list of dictionaries | `promptkit.profiles` |
|
|
| `scriptorium_promptkit_prompts` | list of dictionaries | `promptkit.prompts` |
|
|
| `scriptorium_promptkit_collections` | dictionary | `promptkit.collections` |
|
|
| `scriptorium_promptkit_schema_root` | path | `promptkit.schema_root` |
|
|
|
|
These expose complete native fields, serialized without role-side merging or
|
|
resource rewriting. Inventory may compose the values using ordinary Ansible
|
|
expressions. Native ID-bearing lists and namespaced collection mappings retain
|
|
upstream semantics. Imports also allow caller-managed fragments or collection
|
|
entry points; callers own their deployment. This is one configuration interface,
|
|
not a parallel raw-document override.
|
|
|
|
Retire `scriptorium_configkit_imports` in favor of `scriptorium_config_imports`.
|
|
Remove `scriptorium_prompt_dir`, `scriptorium_profile_dir`,
|
|
`scriptorium_schema_dir`, `scriptorium_defaults_render_format`, and the old
|
|
mapping-valued `scriptorium_backends`. Schema resources and backend/profile/prompt
|
|
definitions use the new native fields and imports. Render format is a runtime
|
|
CLI choice. Do not silently translate old variables or promise old-version
|
|
configuration compatibility from this updated role.
|
|
|
|
Retain `scriptorium_transient_retries` and the existing five
|
|
`scriptorium_server_*` fields with their current null-by-default behavior.
|
|
Do not copy upstream retry, HTTP-limit, model, or repair defaults into Ansible.
|
|
|
|
### Operator documentation
|
|
|
|
Document the variable migration and link the tagged upstream migration guides
|
|
for resource formats, exact CLI flags, discovery, and precedence. Show a concise
|
|
inventory example using native definitions or an explicit required import.
|
|
Explain declaration-relative resources, qualified collection IDs, whole-record
|
|
same-ID replacement, and the distinction between a ConfigKit overlay and a
|
|
PromptKit LLM profile. Explicit configuration selection is appropriate for
|
|
unattended callers when discovery would be ambiguous.
|
|
|
|
Call out the native generation boundary (`run PROMPT_ID`, `--input-file`,
|
|
artifact stdout), removed legacy catalog profile IDs without replacements, and
|
|
prompt-owned structural repair budgets. Credential configuration contains names,
|
|
never key values. Link upstream for native secrets bootstrap and provider
|
|
behavior rather than adding a role-specific loader.
|
|
|
|
## Repository Ownership
|
|
|
|
- `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.
|
|
- Scriptorium and selected framework sources: read-only release contracts.
|
|
- All other roles, assets, collection, and consumer repositories: unchanged.
|
|
|
|
## Constraints and Settled Decisions
|
|
|
|
Follow the [Ansible](../../ansible.md), [testing](../../testing.md), and
|
|
[planning](../../planning.md) policies and [MVP architecture](../mvp.md).
|
|
Keep the generic standalone role independent of D&D deployment policy.
|
|
|
|
The public v0.16.0 tag resolves to application commit
|
|
`0fa538c336fd64be51bc355fd53d3ca19f104d68`; the public repository URL used by
|
|
the role was verified during release review. Use the released contract rather
|
|
than later branch changes. Existing suite pins keep selecting the earlier role
|
|
until the final coordinated integration work.
|
|
|
|
## Simplest Viable Implementation
|
|
|
|
Change version/toolchain defaults and the existing build command, then replace
|
|
the obsolete defaults/spec/template entries with native fields. Reuse the same
|
|
Git, binary stat/build, file, and template task flow. Update the existing test
|
|
fixtures and CLI invocations in place. No new production task, helper module,
|
|
configuration-assembly facts, or persisted role-private state is needed.
|
|
|
|
## Acceptance Criteria
|
|
|
|
- An explicitly selected v0.16.0 source build reports that identifier through
|
|
native `scriptorium version`. The assertion supplies its version rather than
|
|
testing which version happens to be the current default.
|
|
- The minimal managed configuration passes native offline validation. Explicit
|
|
null omission and representative native definitions render correctly, with
|
|
supported falsey values such as retry zero and HTTP-limit zero preserved.
|
|
- A representative caller-owned fragment composes through `config.imports`;
|
|
native inspection can resolve supplied profiles/prompts, including a
|
|
namespaced resource, without contacting a provider. Exercise these through
|
|
existing cases rather than adding an exhaustive framework test matrix.
|
|
- Empty lists/mappings selected by callers are serialized rather than treated
|
|
as omission. Tests protect supplied values and role composition, not default
|
|
catalog contents, whole-document snapshots, or module postconditions.
|
|
- Immediate repeated convergence reports no changes. Existing missing-binary
|
|
recovery with a caller-supplied Go executable and dependency management
|
|
disabled remains covered using the supported native interface.
|
|
- Repository syntax, production-profile lint, and relevant offline integration
|
|
checks pass. No provider, HTTP listener, production controller, or actual
|
|
pipeline host is required. Local tooling setup follows the existing workspace
|
|
test workflow; upstream release/candidate checks are not additional gates.
|
|
- Documentation and the public variable/spec/template interface agree, and
|
|
completion records the role revision for later integration. Suite application
|
|
selections and dependency pins remain unchanged.
|
|
|
|
## Dependencies and Follow-up Work
|
|
|
|
The feature roadmap and staged implementation plan are approved. The plan at
|
|
[implementation.md](../implementation.md) is ready for execution.
|
|
The implementation environment needs Go 1.27+; provisioning the supported
|
|
toolchain for authorized local tests is ordinary setup, not an application blocker.
|
|
|
|
Audita adoption follows independent review and closeout. 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
|
|
guidance. This feature does not claim end-to-end D&D compatibility by itself.
|
|
|
|
## Upstream References
|
|
|
|
- [v0.16.0 release notes](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/releases/v0.16.0.md)
|
|
- [Configuration](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/config.md)
|
|
- [CLI migration](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/consumers/upgrading-cli.md)
|
|
- [PromptKit migration](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/v0.16.0/docs/consumers/upgrading-promptkit.md)
|
|
- [ReleaseKit runtime version](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/runtime-version.md)
|