Approve the Notarius upgrade roadmap

This commit is contained in:
2026-12-03 14:50:52 +00:00
parent 44c3412d47
commit b9cab22dbf
4 changed files with 267 additions and 11 deletions

View File

@@ -0,0 +1,253 @@
# Feature 0026: Adopt Notarius v0.10.0 in the Standalone Role
Status: ready
## Summary
Update the standalone Notarius role from v0.8.1 to v0.10.0, configuration schema
6, native PromptKit resources and imports, and the unified accepted-result cache
interface. Preserve generic installation and inventory composition. This follows
completed Scriptorium and Audita adoption in the
[agreed upgrade sequence](../application-upgrade-sequence.md).
## Problem or Opportunity
The intervening v0.9.0 replaces the old configuration wrappers, CLI, concurrency
controls, and split checkpoint/chunk-plan caches. v0.10.0 adds shared party and
glossary reference contracts. A version bump would leave the current schema 5
template, Go 1.26 selection, version linker flag, and CLI tests incompatible.
The new role must express native choices without preserving obsolete guarantees
or importing D&D deployment policy. The application owns pipeline execution,
reference validation, caching, and defaults; Ansible owns installation and the
declared configuration file.
## Scope
- Adopt v0.10.0, configuration version 6, Go 1.27, and ReleaseKit version identity.
- Replace retired configuration variables with native fields, retaining the
caller-composable pipeline map and supported output/debug directory settings.
- Expose native resources, imports, workers, and cache directory without choosing
provider, model, pipeline, cache-mode, or deployment-specific path defaults.
- Document the breaking migration and reference/cache consequences; adapt the
existing offline role tests and record the reviewed standalone role revision.
## Non-goals
- Changing upstream applications, other roles, suite/collection/consumer pins,
production/testing policy, or operational deployments.
- Migrating campaign documents or authoring the suite's production D&D pipeline,
prompt assets, reference bindings, or model selections.
- Live extraction, provider preflight/smoke tests, API keys, cache-hit/invalidation
simulations, or tests of Notarius's extraction and validation algorithms.
- Legacy configuration/state conversion, aliases, dual-schema templates,
production validation commands, secret loading, or new release publication.
- Managing arbitrary imported files, runtime overlays, output/cache/debug roots,
accounts, ACLs, or existing runtime state in the standalone role.
## Target End State
### Installation and schema
`notarius_version` defaults to `v0.10.0`, `notarius_config_version` to `6`, and
`notarius_go_snap_channel` to `1.27/stable`. Preserve repository URL, source and
binary paths, dependency management, configurable Go executable, configuration
path, and owner/group/mode defaults. The application requires Go 1.27.0 or newer;
dependency opt-out requires a compatible caller-provided toolchain.
Continue building `./cmd/notarius` directly from the selected checkout with the
existing build environment and installation metadata. Replace the retired
application-private version override with the selected ReleaseKit v0.10.0
version-injection contract, following the reviewed Scriptorium/Audita roles.
Rebuilding remains conditional on checkout change or missing binary, without
production version interrogation, post-build testing, or build-state files.
The role deliberately writes `version: 6` as its managed format marker. All
optional application settings default to null and are omitted; the minimal
document contains only that marker and passes offline configuration validation.
It does not invent a pipeline or imply readiness to perform extraction.
### Native public variables
Introduce these optional variables, all defaulting to null:
| Variable | Type | Native field |
| --- | --- | --- |
| `notarius_config_imports` | list of dictionaries | `config.imports` |
| `notarius_promptkit_backends` | list of dictionaries | `promptkit.backends` |
| `notarius_promptkit_profiles` | list of dictionaries | `promptkit.profiles` |
| `notarius_promptkit_prompts` | list of dictionaries | `promptkit.prompts` |
| `notarius_promptkit_collections` | dictionary | `promptkit.collections` |
| `notarius_promptkit_schema_root` | path | `promptkit.schema_root` |
| `notarius_concurrency_workers` | integer | `concurrency.workers` |
| `notarius_cache_directory` | path | `cache_directory` |
Retain `notarius_pipelines` as an optional dictionary, `notarius_output_directory`
as an optional string rendering `output.directory`, and `notarius_debug_directory`
as an optional string rendering `debug.directory`. Keep their null defaults.
Argument specifications and documentation describe these native interfaces
consistently, without restricting pipeline/resource records to a role-authored
subset of the application schema.
Use `is not none` and native serialization. Root null variables mean omission;
supported explicit empty values, zero, false, and nested nulls inside supplied
records remain intact. Emit an optional parent only when a supported descendant
is non-null. In particular, the new cache directory is a root scalar, not a
replacement nested `cache` object.
### Retired interface
Remove the following from active defaults, specs, templates, tests, and examples;
document their migration rather than translating values or retaining aliases:
| Retired variables | Replacement or intent |
| --- | --- |
| `notarius_configkit_imports` | `notarius_config_imports` at native `config.imports` |
| `notarius_promptkit_profile_dir`, `notarius_promptkit_profile_file` | native resources and caller-owned imports/companions |
| `notarius_promptkit_local_backend_endpoint`, `notarius_promptkit_local_backend_concurrency_limit` | native backend records |
| `notarius_promptkit_transient_retries` | retired application wrapper; native request overrides/resource contracts own supported retry choices |
| `notarius_concurrency_total_llm`, `notarius_concurrency_stage_workers_extract` | `notarius_concurrency_workers` plus independent native backend capacity |
| `notarius_cache_chunk_plans_mode`, `notarius_cache_chunk_plans_directory` | pipeline/binding `cache` selection and `notarius_cache_directory` |
| `notarius_cache_checkpoints_enabled`, `notarius_cache_checkpoints_directory` | ordinary accepted-result caching; no checkpoint switch or selective resume |
Do not infer a backend capacity from the old global LLM limit or copy an old
retry/checkpoint setting into a different native guarantee. No new root retry
or cache-mode variable is added where the application has no corresponding field.
### Pipelines and inventory composition
Keep one complete `notarius_pipelines` field. Inventory can define separate
pipeline dictionaries and combine them using ordinary Ansible expressions;
imports can instead refer to caller-managed fragments. The role does not
assemble pipeline facts, provide a parallel raw configuration override, or
deploy the imported content itself.
Native pipeline and binding records pass through unchanged, including ordered
steps, artifact handoffs, external reference objects and their `collections`
selections, `cache: auto|bypass|refresh`, producer `mode`, and
`max_additional_turns`. Nested null/empty selections retain application semantics.
All these remain optional native choices, not new concrete role defaults.
### Cache and filesystem boundary
`notarius_cache_directory: null` delegates location to the application; an
explicit empty string also selects its native user-cache location. The generic
role does not hard-code `/var/cache/notarius`. That existing FHS suite location
and its ownership/setgid/default ACL policy remain for coordinated integration.
The application creates accepted-result cache state under its native access
rules. The standalone role does not converge runtime ownership/modes, convert
old records, delete checkpoints, or add application-state manifests. Legacy
records remain ignored and untouched; new acceptance populates ordinarily.
Document that model, session, and policy changes alone do not invalidate accepted
results. Operators needing fresh inference/assessment use native refresh or
bypass; do not invent automatic model fingerprints or a testing-overlay cache
policy here. Narratio stage reuse is a separate integration concern.
### Operator guidance
README guidance explains the v0.8.1-to-v0.10.0 migration, including schema 6,
native resources and qualified IDs, imports/relative source paths, whole-record
replacement, and ConfigKit overlays versus PromptKit profiles. Native producer
turn allowances, strict/permissive outcomes, workers, transport retry, and
structural repair are distinct choices; the role does not promise numerical
equivalence with retired settings.
Link the maintained CLI migration: native `notarius version`, `pipeline
validate`, `config show`, `promptkit show`, `--overlay`, `--input-file`, and
native reporting replace the former spellings. The old receipt/index/manifest
sidecars are retired while durable lane filenames/artifact schemas remain
stable. Caller adaptation belongs in later Narratio/suite work.
Explain the new optional shared party/glossary reference documents and collection
selection, linking upstream for exact schema and preparation rules. Do not
deploy a roster or glossary merely to validate a configuration. Pipeline
validation is offline and does not read reference bytes; preflight may contact
providers and probe destinations and is a separate operator action. Debug
directory configuration alone does not enable capture; explicit empty disables
it, and `--debug` is a runtime selection rather than a new YAML flag.
## Repository Ownership
- `ansible-role-notarius`: generic source build/configuration interface,
migration guidance, and local tests.
- Workspace: feature roadmap, later staged plan, tracking, and review evidence.
- Notarius and selected framework sources: read-only released contracts.
- Other roles, assets, suite, collection, and consumer: unchanged.
## Constraints and Settled Decisions
Follow the [Ansible](../../ansible.md), [testing](../../testing.md), and
[planning](../../planning.md) policies and [MVP architecture](../mvp.md).
The upgrade sequence retains the current suite compatibility set until the
final coordinated integration feature; do not pair this update with the older
Narratio caller by changing a suite pin prematurely.
Public v0.10.0 resolves to `752c9b44d2c0bb3bfb1e02a5d4379f7cc5b6261e`, verified
through the repository URL used by the role. Use that release contract, not a
moving branch. Old-version configuration compatibility is not part of the new
interface; callers retaining schema 5 keep the earlier role revision.
## Simplest Viable Implementation
Change version/schema/toolchain defaults and the existing build command. Replace
retired defaults/spec/template fields with native ones and update README/test
fixtures in place. Keep the existing Git, binary stat/build, file, and single
template tasks. No additional production tasks, helper modules, state assembly,
fingerprints, migration machinery, or provider checks are needed.
## Acceptance Criteria
- Explicitly request v0.10.0 and verify native version output. Migrate the
existing v0.7.0 version-selection/recovery case to the supported new release
rather than adding a legacy build branch. Do not assert today's default version.
- The minimal managed schema 6 document validates offline. Tests of omission
explicitly supply null and the format marker rather than freezing defaults.
- Representative caller-supplied native resources, workers, output/cache/debug
settings, and pipeline records render and inspect correctly. Cover meaningful
falsey/nested-null values where supported; do not force invalid worker zero
or an empty output destination merely to fill a test matrix.
- Pipeline dictionaries composed from separate inventory variables and a small
caller-owned import resolve through the native interface. Validate an explicitly
supplied representative pipeline and inspect selected profiles without a
provider, transcript, reference bytes, or cache allocation.
- Preserve native cache/producer controls and reference collection selections
within supplied pipeline records. Assert role pass-through, not Notarius's
extraction quality, cache-hit logic, framework inheritance, or module internals.
- Missing-binary recovery uses the caller-selected Go executable with dependency
management disabled. Every role case has an immediate identical convergence
reporting no changes. Keep syntax/lint static checks and avoid module-state
re-verification, default catalog snapshots, or task trace assertions.
- Repository shell syntax, production-profile lint, native offline checks, and
relevant integration tests pass. Local tooling setup is ordinary preparation;
no remote controller, actual pipeline host, credentials, preflight, or full
upstream release suite is an additional gate.
- Defaults/spec/template/README agree. Documentation clearly distinguishes the
unified cache, reference formats, and runtime CLI controls. Completion records
the reviewed standalone role revision; suite/dependency/asset pins stay put.
## Dependencies and Follow-up Work
Scriptorium and Audita adoption are complete and provide reviewed native-field
and build-identity examples. This roadmap is approved. The next step is to prepare
the staged implementation plan at `docs/roadmap/implementation.md`.
Narratio adoption follows Notarius implementation, independent review, and
closeout. Later suite integration owns the D&D pipeline/tuning migration,
shared references, testing-overlay behavior, `/var/cache/notarius` provisioning,
new Notarius subprocess protocol, compatible asset revisions, coordinated pins,
and consumer handoff. No end-to-end D&D compatibility is claimed by this feature.
## Open Questions
None. The variable mapping and runtime-state boundary are approved decisions.
## Upstream References
- [v0.9.0 breaking changes](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/releases/v0.9.0.md)
- [v0.10.0 release](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/releases/v0.10.0.md)
- [Configuration](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/config.md)
- [Native migration](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/consumers/native-migration.md)
- [Shared reference inputs](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/integrations/shared-domain-inputs.md)
- [Cache and operational guidance](https://gitea.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/operations.md)