Remove completed roadmap documents
All checks were successful
ci/woodpecker/push/verify Pipeline was successful

This commit is contained in:
2026-11-23 19:13:10 +00:00
parent e7b266f908
commit 9fa179736b
4 changed files with 0 additions and 1024 deletions

View File

@@ -1,269 +0,0 @@
# Adopt ConfigKit v1.4 and native secrets startup
Status: implemented; the staged implementation is complete.
## Purpose
Adopt ConfigKit v1.4.0 and use its native configured-secrets bootstrap to reduce
Narratio-owned configuration machinery. Adopt the coordinated CommandKit v0.8.0
and `ckconfig` v0.11.0 releases in the same scope. Configure secrets startup through
the pipeline file; remove `--secrets-dir` and automatic secrets-directory probing.
ConfigKit owns configuration resolution through the final handoff; Narratio owns
startup ordering, domain interpretation, and execution, as defined by
[ADR 0003](../adr/0003-assign-configuration-ownership.md).
This roadmap records the target and completed changes. Audita adoption
and session layout remain in the separate [Audita](audita.md) and
[workspace](workspace.md) roadmaps.
## Reviewed Upstream Releases
ConfigKit v1.4.0 identifies commit
`4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3`. Its
[configuration contract](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md)
and [consumer guide](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/consumers/README.md)
own upstream semantics. The
[v1.3.0 notes](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.3.0/docs/releases/v1.3.0.md)
describe configured bootstrap; the
[v1.4.0 notes](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/releases/v1.4.0.md)
describe typed value access and focused inspection.
The coordinated CLI releases are:
| Module | Target | Upstream commit |
| --- | --- | --- |
| CommandKit | v0.8.0 | `0b53a63648c536afe50c46f948159116f776adae` |
| `ckconfig` | v0.11.0 | `cd5cf483a46caeff7ca0a91fb4747d57188a3888` |
The [CommandKit release notes](https://forge.maximumdirect.net/base-layer/commandkit/src/commit/0b53a63648c536afe50c46f948159116f776adae/docs/releases/v0.8.0.md)
describe invocation features and help-only preflight. The
[`ckconfig` v0.10.0 notes](https://forge.maximumdirect.net/base-layer/commandkit/src/commit/cd5cf483a46caeff7ca0a91fb4747d57188a3888/integrations/ckconfig/docs/releases/v0.10.0.md)
describe native subtree scopes, and the
[v0.11.0 notes](https://forge.maximumdirect.net/base-layer/commandkit/src/commit/cd5cf483a46caeff7ca0a91fb4747d57188a3888/integrations/ckconfig/docs/releases/v0.11.0.md)
describe help-only preflight integration. `ckconfig` v0.11.0 requires core v0.8.0
and ConfigKit v1.4.0.
All three modules retain the Go 1.27.0 consumer minimum and LGPL-3.0-or-later
licensing. Their license texts are unchanged relative to Narratio's pinned
versions. Existing command and scope assembly remains compatible.
## Current Baseline
- Narratio pins ConfigKit v1.2.1. Pipeline discovery, YAML composition, typed
credential resolution, validation, and provenance already use ConfigKit.
- CommandKit v0.7.0 owns CLI mechanics and reporting; `ckconfig` v0.9.0 exposes
native configuration operations. Narratio uses neither invocation features nor
the separate `ckprompt` integration.
- `internal/app/secrets_bootstrap.go` selects `--secrets-dir` or automatically
probes `/usr/local/etc/narratio/secrets`. It delegates file loading to
`LoadSecretsIntoEnvironment`, retains invocation-level completion, and renders
reports. Existing environment values win, including empty values.
- Pipeline source selection occurs separately from bootstrap. Narratio has no
configured-bootstrap handoff using a prepared ConfigKit source.
- Lazy configuration acquisition supports independent app, campaign, session,
and party scopes. Comparisons acquire their own results while sharing startup
bootstrap. Native inspection is exposed through `ckconfig`.
- Narratio derives separate domain catalogs, persisted configuration projections,
and semantic resume evidence. These serve application responsibilities rather
than replacing ConfigKit inspection.
The [configuration reference](../config.md#secrets-handling),
[configuration internals](../internal/configuration.md), and
[architecture policy](../policy/architecture.md#configuration) own current behavior.
## Targeted End State
### Configured startup
When acquiring a pipeline, Narratio passes its native `File` or
`SearchConfig` source to `LoadSecretsIntoEnvironmentFromConfig`. Operators can
declare:
```yaml
config:
secrets_dir: secrets
secrets_overwrite: false
```
Pass ConfigKit's returned prepared source to ordinary `Load` with Narratio's
schema, defaults, resolution callbacks, validation, imports, overlay, and supported
inspection overrides. Keep existing pipeline discovery choices. ConfigKit owns
main-document capture, bootstrap controls, path resolution, environment writes,
and credential lookup; use its
[configured-startup contract](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md#explicit-secrets-directory-bootstrap)
directly. Leave the helper's overwrite option unspecified so the main document
controls precedence.
Remove `--secrets-dir`, its direct-directory bootstrap route, and the automatic
fixed-directory fallback. Secrets-directory selection belongs in the pipeline
configuration. Environment-only deployments remain supported when no directory
is configured.
### Invocation lifecycle and inspection
Use one ordinary pipeline-acquisition path across execution, planning, and
inspection: select a native source, perform configured bootstrap, and load the
returned prepared source. Reuse the completed result within its acquisition
object. Each distinct pipeline acquisition follows that same path.
Acquisition owns explicit, lazy, fallible bootstrap before that pipeline's
credential resolution and adapter construction. Library loaders remain pure.
Keep only the local state needed for ordinary acquisition reuse and reporting.
Help, version, completion, and scope listing retain their current acquisition-free
behavior. Direct inspection of campaign, session, or party documents retains lazy
acquisition: configured pipeline bootstrap runs when that invocation actually
needs the pipeline. Direct document inspection does not acquire a pipeline solely
to bootstrap credentials.
Use CommandKit invocation features if they reduce local lifecycle or reporting
plumbing. Evaluate their native report timing and visibility against Narratio's
reporting needs. They need not perform bootstrap themselves: acquisition can
remain responsible for fallible work. Do not preserve existing buffers, wrappers,
or assembly solely to retain the current implementation structure.
### Best-effort configuration comparisons
Treat comparison as an operator convenience backed by native `ckconfig`
behavior. Each side uses ordinary acquisition with its own selections and loads
only the configuration it needs. Delegate loading order, comparison,
presentation, and error handling to the upstream integration.
Both acquisitions use the shared process environment. ConfigKit's native
preservation and overwrite behavior applies as each pipeline is acquired, so an
earlier bootstrap can affect a later load. Accept those ordinary upstream
effects. Use the same acquisition state and native pass-through as other
commands; comparison needs no additional startup or environment-management
layer.
### Reports, errors, and ownership
Keep the native `SecretsReport` separate from later configuration results and
retain the report on bootstrap failure. Present safe report contents and
`SecretsError` diagnostics through Narratio's CommandKit reporting boundary.
Preparation failures retain native `LoadError` evidence. Preserve native causes,
diagnostics, and useful operation context. Use upstream failure and partial-write
semantics without adding rollback or a local filesystem policy.
### Adoption boundaries
Keep configuration inspection delegated to `ckconfig` and preserve the app,
campaign, session, and party scopes. Preserve supported commands and workflows
except for the secrets-startup changes specified here; internal assembly may be
replaced or simplified. New inspection scopes, generic accessors, and `ckprompt`
adoption are outside this scope.
Domain catalogs, credential forwarding, persisted configuration projections, and
stage-owned resume fingerprints retain their current responsibilities. Diagnostic
inspection output is not substituted for reloadable configuration or semantic
reuse evidence.
### Documentation ownership
Narratio documents which libraries it uses and links to their canonical upstream
documentation for adopted library features. Local documentation owns Narratio's
schema, selected configuration sources and scopes, adapter wiring, domain rules,
and operator workflows. General library syntax, feature behavior, and API
semantics remain documented upstream.
## Required Changes
### Dependency and startup wiring
Update `go.mod` and `go.sum` together to ConfigKit v1.4.0, CommandKit v0.8.0,
and `ckconfig` v0.11.0. Keep other dependency versions unless dependency
resolution requires a related adjustment. Update all three attribution entries
and affected pinned contract links to their adopted revisions.
Connect native pipeline source selection, configured bootstrap, and prepared-source
loading through the application/configuration boundary. Remove duplicate startup
entry paths, the secrets-directory flag and selector wiring, the direct-directory
route, and the conventional-directory probe. Replace the blanket invocation-level
bootstrap guard with ordinary acquisition reuse. Native scope loader callbacks
create ordinary acquisitions for their selected configuration, including during
comparisons. Keep local state focused on acquisition reuse and reporting, and
remove comparison-specific startup bookkeeping made redundant by this wiring.
Adapt reporting to retain native reports and typed failures separately. Keep
existing CommandKit outcome handling and useful native diagnostic details.
### Policy, documentation, and operator migration
When implementation lands, update the architecture policy's startup wording to
affirm the native preparation, bootstrap, and final-load boundary. Replace its
once-per-invocation bootstrap requirement with ordinary acquisition reuse.
Describe environment precedence as the selected ConfigKit bootstrap policy.
ADR 0003's configuration ownership decision remains applicable.
Update the configuration reference, CLI reference, operations and troubleshooting
guidance, configuration internals, and affected maintained examples. Document
configured startup, ordinary acquisition for comparison sides with a shared
process environment, and removal of `--secrets-dir` and automatic
conventional-directory loading.
Link upstream for bootstrap control definitions and overwrite semantics. Replace
stale fixed-fallback and before-any-configuration-read language.
Follow the adopted
[dependency-documentation policy](../policy/documentation.md#upstream-dependencies).
Keep version-appropriate upstream links in the existing local owners; attribution
remains governed separately by the OSS policy.
Review the following existing documentation for duplicated upstream explanations:
- `docs/config.md`: replace general ConfigKit composition, import, inheritance,
presence, overlay, and secret-file processing descriptions with upstream links.
Retain Narratio's schema, discovery choices, resource interpretation, and
configured-startup wiring.
- `docs/cli.md`: link to CommandKit and `ckconfig` for generic parsing, reporting
controls, inspection operations, report fields, and pointer semantics. Retain
Narratio's command inventory, installed selectors and scopes, domain reports,
and application-specific behavior.
- `docs/internal/configuration.md`, `docs/internal/overview.md`, and
`docs/development.md`: identify imported libraries and link upstream for their
APIs; keep Narratio component ownership and integration wiring locally.
- `docs/operations.md`, `docs/troubleshooting.md`, affected integration documents,
and `examples/README.md`: keep Narratio workflows and minimal runnable examples;
replace repeated library guidance with links. Direct downstream configuration
guidance to the owning application's documentation. Describe PromptKit's role
accurately where downstream tools use it; this work adds no Narratio PromptKit
dependency.
Consolidate redundant prose and repair links while preserving useful operator
navigation and runnable examples. Provide a concise migration for both removed
secrets-directory selection mechanisms: remove the CLI flag from invocations and
declare the directory in the main pipeline file using native ConfigKit path rules.
For a pipeline adjacent to the former system-wide directory, `secrets_dir: secrets`
retains that selection. Other layouts may require relocating the directory or
supplying credentials through the process environment. Preserve existing
credential-protection guidance.
### Verification
Use focused offline behavioral tests covering native configured startup and
discovery, prepared-main handoff, configured path resolution, preservation and
explicit overwrite, removal of the flag and fallback, and environment-only
operation. Cover useful reports and typed errors on failure, including retained
partial effects, without duplicating ConfigKit's complete file-validation test
suite.
Exercise ordinary acquisition reuse, lazy non-pipeline inspection,
acquisition-free CLI paths, and bare `config explain` help. Use a few focused
comparison cases to verify ordinary acquisition, including when only one side
needs a pipeline and when configured directories differ. Assert native
pass-through with shared-environment behavior; keep generic comparison
semantics covered upstream.
Verify the existing command tree and native configuration operations against the
coordinated dependency versions. Retain existing tests for native inspection,
credential forwarding/redaction, separate domain derivation, and semantic reuse.
Update tests that deliberately encode the retired flag, directory fallback, or
environment precedence that is now operator-selectable.
Run the repository's normal tests, race tests, vet, build, maintained-example,
and documentation checks in proportion to the implemented change. Default tests
use temporary files and disposable environment values and remain independent of
sibling checkouts, real credentials, and live services.
Review documentation changes for clear ownership: generic library features link
upstream, Narratio-specific behavior remains discoverable locally, and rewritten
sections introduce no runtime requirement changes. Verify affected links and
maintained examples after removing duplicated descriptions.

View File

@@ -1,390 +0,0 @@
# ReleaseKit adoption implementation plan
## Scope and execution
Implement the target in [releasekit.md](releasekit.md). This plan is for a Luna
coding agent completing one end-to-end sprint. Execute Stage 1 through Stage 7
in order. Intermediate stages may leave scripts, callers, tests, or documentation
temporarily inconsistent. Reach the final native workflow directly; temporary
compatibility layers and repeated intermediate full-suite runs are unnecessary.
The baseline is Narratio commit
`0d0596b204ab3a374c522e7e9d8395b8b0b0ce8a`, which added the feature roadmap
without implementing it. This plan replaces the completed ConfigKit/CommandKit
implementation plan; those features remain part of the baseline.
Start each implementation prompt with `docs/development.md` and
`docs/policy/agents.md`. Read the release, architecture, testing, documentation,
and OSS policies where the stage affects their topics. Reuse unchanged policy
context. Follow graph-first code discovery. The file names below identify
current owners; their internal structure is not a preservation requirement.
Read the feature roadmap for scope and selections. Its pinned ReleaseKit v0.10.0
links are the canonical upstream references. A sibling checkout at
`../ReleaseKit` can supply those documents and templates after verifying commit
`82bac1a3ab935beddd4b8789d1e07f52135d4243`; the released module is the dependency.
Mark each stage completed here with a short outcome and relevant verification.
Follow the repository's focused-commit policy. Report intermediate validation
limitations accurately; a stage need not pass tests made obsolete by a later
stage. This sprint does not authorize an upstream push, real release tag,
hosted release, or live delivery.
### Decisions carried into implementation
- Adopt ReleaseKit v0.10.0 as both a registered CLI tool and the runtime
`buildinfo` dependency. Keep the existing Narratio module path, Go 1.27.0
consumer minimum, and selected Go 1.27.4 toolchain.
- Keep the root-module `main`/`origin` release workflow. Maintainers push the
candidate before native `publish`; publication pushes its annotated tag.
- Narratio owns the profile, release note, selected destinations and platforms,
and small invocation/integration wiring. ReleaseKit owns validation execution,
tag mechanics, native diagnostics and recovery, builds, and delivery.
- Keep native race, full vet, formatting, and local-replacement checks. Use the
selected application builds for platform verification. Remove custom release
gates and leave other optional validations unselected.
- Confirmed source-tag publication is completion. CI, hosted content, and
installation remain separate observations. Use native recovery on uncertainty.
- Keep the existing binary names, `SHA256SUMS`, and platform support. Map the
existing CI secret to ReleaseKit's environment variable.
- Keep shared-library documentation upstream. Local documentation owns
Narratio's selections and short, executable maintainer workflow.
- Historical tags and release records remain unchanged. ConfigKit, CommandKit,
application configuration, session behavior, and the Audita/workspace features
are outside this implementation scope.
## Stage 1 — Add ReleaseKit and adopt the native runtime version
Status: completed. ReleaseKit v0.10.0 supplies runtime version information and
the registered tool. Verified `go test ./internal/app` and `go build ./cmd/narratio`
with Go 1.27.4; reviewed module selection and attribution.
Read `go.mod`, `go.sum`, `internal/app/commands.go`,
`internal/app/version_test.go`, `internal/buildinfo/buildinfo.go`, and
`docs/oss/attribution.md`. Consult upstream consumer adoption, runtime-version,
and v0.10.0 release guidance, plus its COPYRIGHT and LICENSE.
1. Register the released tool with
`go get -tool go.maximumdirect.net/releasekit/cmd/releasekit@v0.10.0`.
Keep one module selection shared by the tool and runtime import. Use the
selected official Go toolchain; do not add a local module replacement.
2. In `newApplication`, import
`go.maximumdirect.net/releasekit/buildinfo` and supply `buildinfo.Version()`
to `commandkit.Identity`. Keep existing CommandKit commands and presentation.
3. Remove `internal/buildinfo/buildinfo.go` once its callers are replaced.
Replace the version test's global assignment/restoration with an assertion
that Narratio's structured version output has name `narratio` and the value
returned by the native accessor. Retain the invalid-argument test. Native
builder verification in Stage 7 covers injected release identifiers.
4. Run `go mod tidy` after the imports and tool directive are in place. Retain
dependency changes required by module selection and review any collateral
changes. Do not opportunistically upgrade the other native libraries.
5. Add a ReleaseKit attribution entry for v0.10.0 at the pinned full upstream
commit, preserving its copyright statement and LGPL-3.0-or-later expression.
Reuse the existing LGPL and GPL standard texts. Review relevant transitive
notice changes based on actual incorporation/distribution; membership in a
tool's module graph alone does not require attributing every tool dependency.
Stage 6 finalizes the copied-wiring scope after those files exist.
Validation: inspect the module diff and registered tool declaration. Run
`go test ./internal/app` and `go build ./cmd/narratio`. Existing script tests
and scripts still refer to the old linker variable until Stage 5; do not add a
version compatibility shim to accommodate them.
Completion: the application reads its version from ReleaseKit, and the released
CLI tool is retained by the module metadata.
## Stage 2 — Define the profile and minimal native launcher
Status: completed. Added the selected profile, host-target launcher, and dist
ignore rule. Shell syntax and normal and cross-target launcher invocations
passed; both reported ReleaseKit v0.10.0.
Read the roadmap's release selections, upstream adoption and profile references,
and `.gitignore`.
1. Create root `releasekit.json` with this complete initial selection:
```json
{
"product": "Narratio",
"remote": "origin",
"validation": {
"go": {
"race": true,
"full_vet": true
},
"go_format": true,
"module_distribution": {
"local_replacements": true
}
},
"build": {
"main_package": "./cmd/narratio",
"binary_name": "narratio",
"targets": ["linux/amd64", "linux/arm64", "darwin/arm64"]
},
"delivery": {
"forge": "gitea",
"base_url": "https://forge.maximumdirect.net",
"owner": "eric",
"repository": "narratio",
"token_env": "RELEASEKIT_GITEA_TOKEN"
}
}
```
Omit `module_dir` for the root module. Omit additional `checks`,
`expected_push_url`, `compile_targets`, workspace/file-size/Markdown checks,
token files, and other optional selections. The Git destination documented
by the runbook is the existing `origin` URL, not an extra profile guard.
2. Add an executable root `releasekit` file using the short forwarding launcher
from upstream adoption guidance: POSIX shell, native `GOHOSTOS`/`GOHOSTARCH`
selection, and a direct `exec` of the full registered tool package with
`"$@"`. Maintainers invoke it from the repository root. Preserve the native
exit status and argument forwarding.
3. Keep the launcher confined to tool invocation. Profile interpretation,
dependency preparation, validation, tag logic, records, and recovery use
native commands. Retain upstream environment and toolchain behavior.
4. Add `/dist/` to `.gitignore` for the native builder's default retained output.
Private publication records already live under Git's own directory. No local
delivery-token file or new credential-storage convention is needed.
Validation: run `sh -n ./releasekit` and `./releasekit version` after tool
dependency preparation. Confirm the selected tool reports v0.10.0. Also invoke
the launcher with an ambient cross target, such as
`GOOS=windows GOARCH=amd64 ./releasekit version`, to verify host selection; this
is a tool-launch check, not a change to supported Narratio platforms. Native
profile consumption is exercised by Stage 7.
Completion: profile selections are declarative and maintainers have a direct
entry point for native subcommands.
## Stage 3 — Adopt the upstream Woodpecker delivery workflow
Status: completed. Adopted the v0.10.0 root-module template with the existing
secret mapping and source comment. Compared it directly with the pinned template;
live CI and the obsolete workflow tests were not run at this boundary.
Read `.woodpecker/release.yml`, the v0.10.0 root-module tag-delivery template,
and the upstream delivery guide's Woodpecker section.
1. Replace `.woodpecker/release.yml` with the matching upstream template.
Keep its native matrix/list structure and `golang:1.27.4-bookworm` selection.
Adapt only Narratio-specific wiring and a concise source-version comment.
2. Map `RELEASEKIT_GITEA_TOKEN` from the existing `GITEA_RELEASE_TOKEN`
Woodpecker secret. Retain the template's tag event/filter and native
bootstrap, including Woodpecker's escaped runtime substitutions.
3. Preserve template handling for annotated tag objects, event-commit agreement,
detached tagged source, temporary module metadata, the selected full tool
package, host target, `GOWORK=off`, `GOTOOLCHAIN=local`, and
`ci-deliver --prepared`. Keep the tagged module files unchanged during tool
bootstrap. Use the upstream wiring rather than rewriting its mechanics.
4. Remove the separate validation, custom asset-build, and plugin-release steps.
Native `ci-deliver` prepares dependencies and builds/delivers from the tag;
it does not rerun the candidate suite or publish source refs. Leave
`.woodpecker/verify.yml` and `.woodpecker/shuffle.yml` unchanged.
Validation: compare the result directly with the pinned upstream template;
review the image, secret mapping, runtime escaping, and tag inputs. Existing
doccheck tests are expected to reject the list-shaped workflow or old-step
removal until Stage 4. A live Woodpecker run is not a sprint prerequisite.
Completion: tag CI uses the tagged ReleaseKit selection for asynchronous native
delivery, independently of source publication.
## Stage 4 — Refocus tests on Narratio's selections and integration
Status: completed. Integration tests cover the profile and delivery selections;
workflow decoding accepts and exercises both supported step shapes. Verified
`go test ./internal/doccheck ./internal/app` with Go 1.27.4.
Read `internal/doccheck/doccheck_test.go`, especially the workflow types,
`TestWoodpeckerWorkflowDependencies`,
`TestVerifyWorkflowUsesFullSuiteWithoutFocusedDuplicates`, and
`TestReleaseWorkflowRequiresValidation`. Read the profile and delivery workflow
created in Stages 2–3.
1. Replace the obsolete release-workflow test with small tests of Narratio-owned
integration: product identity, selected checks, package/binary and target
mapping, Gitea destination, token variable, selected CI image, secret mapping,
and native tool/`ci-deliver` entry point. Decode selected JSON fields with
`encoding/json`; ReleaseKit retains ownership of full profile validation.
Avoid a duplicate local profile schema or whole-file golden snapshot.
2. Adapt the test-only workflow loader to accept both existing named mappings
and the template's named-step sequence. A small `UnmarshalYAML` on the steps
collection can normalize both shapes to the existing map for dependency
checks. Add the step name and environment/matrix fields only as needed by
these tests. Do not force the upstream template into the old representation
or build a general Woodpecker interpreter.
3. Preserve meaningful undefined-dependency/cycle checks and the existing
verification-workflow assertions. Add a small fixture for each supported
YAML steps shape so the new decoder's purpose is covered.
4. Verify Narratio's selected wiring, without pinning every bootstrap shell
command, ordering detail, or upstream diagnostic. Native bootstrap,
publication guards, checksums, and Gitea algorithms are tested upstream.
Do not invoke native `check` from the default Go suite: it would recursively
run that same suite. No live network or real credential enters these tests.
Validation: run `go test ./internal/doccheck ./internal/app`. Old
`internal/releasecheck` assertions remain obsolete until Stage 5.
Completion: tests accept the native workflow and protect the small local
integration surface without recreating ReleaseKit's suite.
## Stage 5 — Remove the superseded release implementation
Status: completed. Removed the four release scripts and their dedicated test
package; no active code or workflow callers remain. Verified focused app and
doccheck tests and `go build ./...` with Go 1.27.4. Current maintainer prose is
updated in the next stage.
Read all four scripts and `internal/releasecheck/` to identify references and
fixtures exclusively owned by that implementation. Search code through the
graph and non-code references with the usual text tools.
1. Delete `scripts/release.sh`, `scripts/check-release-candidate.sh`,
`scripts/build-release-assets.sh`, and `scripts/release-lib.sh`.
2. Delete `internal/releasecheck/assets_test.go` and
`internal/releasecheck/publication_test.go`, including their fake tools,
transport fixtures, and helpers. Remove any other discovered fixtures used
only by the deleted implementation. Preserve unrelated tests and files.
3. Remove remaining active callers and imports of the old buildinfo variable,
script paths, and custom linker injection. Retain the native launcher rather
than adding legacy command aliases or a Go release orchestration package.
Validation: run `go test ./internal/app ./internal/doccheck` and
`go build ./...`. Review code/workflow references for the removed symbols and
scripts. Historical release documents and roadmap baseline descriptions may
still mention old tooling; current maintainer prose is addressed next.
Completion: Narratio maintains selections and wiring rather than release
algorithms and their dedicated test harness.
## Stage 6 — Align the policy, runbook, and notices with native adoption
Status: completed. Updated the release runbook, local policy and developer/CLI
guidance, attribution, and superseded roadmap links. Verified doccheck and
reviewed the profile, launcher, upstream workflow, and pinned notices.
Read `docs/release.md`, `docs/policy/release.md`, `docs/development.md`,
`docs/oss/attribution.md`, and the documentation/OSS policies. Use the roadmap's
pinned upstream references for shared semantics.
1. Rewrite `docs/release.md` as the short Narratio maintainer runbook. Identify
the `main` branch, authoritative `origin` at
`ssh://git@forge.maximumdirect.net:22222/eric/narratio.git`, hosted destination,
Git/POSIX shell/native race-toolchain prerequisites, and selected Go 1.27.4.
Preserve the `release-toolchain` heading anchor or repair its incoming links.
2. Provide concise commands for toolchain/module preparation, candidate
commit/push, and `./releasekit publish VERSION`. Prepare modules and the
native tool before offline validation. State that the native tool uses the
module-selected ReleaseKit version. Show native `check` only as optional
diagnosis, never a prerequisite that repeats publication validation.
3. Keep version choice and compatibility defined by the adopted release
policy. Retain version-matched release-note preparation and its immutable
`COPYRIGHT | LICENSE | ATTRIBUTION` footer, using the Narratio paths at
`https://forge.maximumdirect.net/eric/narratio/src/tag/<version>/...` for
future notes. Summarize annotated-tag publication and separate CI delivery.
Identify the existing three binary filenames and `SHA256SUMS` locally.
4. Give short links/entry points for native saved-record reconciliation and
native delivery retries, including older-tag tooling selection. Use upstream
behavior for uncertain pushes, partial delivery, and content conflicts.
Source-release completion stays at confirmed tag publication. No CI polling,
live credential probe, download, installation check, or human confirmation
becomes an added publication gate.
5. Replace only the Narratio-specific candidate-check wording in
`docs/policy/release.md`: native race/full-vet/formatting/local-replacement
checks and selected builds replace the custom checker, tidy, and whitespace
gates. Keep shared upstream wording, compatibility, immutability, and other
established rules. Update local date metadata where appropriate without
inventing a new upstream adoption revision or upgrading the policy suite.
6. In `docs/development.md`, identify ReleaseKit with its version-appropriate
consumer link and replace the statement that tag CI independently repeats
candidate validation with its delivery responsibility. Keep ordinary push/PR
and scheduled test guidance. Inspect other current docs for affected build
version/release statements; repair real stale references without rewriting
historical notes or copying upstream CLI/configuration guides.
7. Finalize the ReleaseKit attribution entry for the runtime import and copied
launcher/workflow, using the full adopted commit and actual upstream notices.
Reuse unchanged local license texts; retain Narratio's license grant.
8. Update roadmap/plan completion status only to the implemented boundary.
Remove obsolete links in the completed ConfigKit roadmap that imply this
now-replaced plan still contains its stages, retaining its completion
summary. Preserve other pending roadmaps. A future release-preparation task
can retire completed documents; this sprint does not require their deletion.
Write concise, factual policy statements and use affirmative phrasing. General
ReleaseKit features remain documented upstream; the runbook owns Narratio's
configuration choices and commands.
Validation: run `go test ./internal/doccheck` and inspect the actual launcher,
profile, and workflow against every affected command/selection in the runbook.
Review attribution links and unchanged grant/license scope. Publication and CI
availability are not documentation checks.
Completion: current documentation describes the implemented native workflow,
with one canonical owner per topic and no obsolete script procedure.
## Stage 7 — Verify the completed native integration and close the sprint
Status: completed. Go 1.27.4 module preparation and `go mod tidy -diff` passed.
After formatting existing imports with the selected toolchain, native
`./releasekit check v0.0.0` passed in a clean disposable candidate based on
`3185795`, including the race suite, full vet, formatting, local-replacement
inspection, three builds, and host version smoke check. The fixture remained
clean and created no tag. Final-source `go build ./...`, launcher syntax,
template comparison, and diff checks passed. No live delivery was exercised.
Read the completed changes and feature-roadmap completion criteria. Use
upstream candidate/build guides for their native preconditions.
1. Make the official Go 1.27.4 installation the active `go` command on PATH and
verify `go version`. Prepare dependencies and the tool separately. Run
`go mod tidy -diff` once as migration/module hygiene, not a new recurring
release gate. Confirm the registered ReleaseKit version and final module
metadata; review that required checks and targets match Stage 2.
2. After the implementation changes are committed, make a disposable clone of
that exact source under a task-specific `mktemp -d` directory outside this
worktree, without copying tags. In that clone only, use branch `main` and
create/commit a synthetic `docs/releases/v0.0.0.md` with title
`# Narratio v0.0.0`, an explicitly synthetic summary, and the footer shape
from the runbook. Confirm that version has no local tag. Keep synthetic
metadata and refs out of Narratio's real checkout and upstream.
3. In that clean disposable candidate, prepare modules/the tool and run
`./releasekit check v0.0.0`. Keep the production profile unchanged. This is
the full native integration verification: one race-enabled offline suite,
selected vet/format/distribution checks, all three release binaries, and
the real executable's injected-version smoke check. Inspect the result and
confirm it leaves the checkout clean and creates no tag. A check requires
neither Gitea credentials nor remote publication, so a live service is not
a fallback for a failing fixture.
4. Reuse that result for unchanged test/vet/build coverage rather than rerunning
the complete suite merely to satisfy another stage. Run `go build ./...` on
the final source if its Stage 5 result is no longer current. The fixture
verifies adoption; it is not evidence that a real future release candidate
has already passed its own publication-time validation.
5. Compare the final delivery YAML with the pinned template and confirm only
the documented consumer adaptations. Inspect executable mode and
`sh -n ./releasekit`. Default tests and direct review cover local wiring;
upstream tests cover generic tag bootstrap and hosted protocols. A live CI
run, live delivery, and a real tag push are not required for sprint closure.
6. Confirm all four scripts, the dedicated script-test package, old buildinfo
package, and active current-doc references are removed. Check that the
remaining release code is the small launcher plus native version integration
and test-only consumer wiring. Preserve historical material and useful
unrelated tests. Avoid an artificial LOC threshold or broad cleanup.
7. Review the final diff for unintended application/platform/Go-minimum changes
and additional gates. Run whitespace checks, update stage outcomes and
roadmap status accurately, and commit the focused remaining work. Report
tests, source revision, removals, and any external delivery not exercised.
Completion: all feature-roadmap criteria are satisfied, native integration has
passed on a committed disposable candidate, and the repository is clean and
ready for a separately authorized release sequence.
## Open Questions
None. The feature roadmap resolves the significant product and policy choices.
Upstream mechanics retain their native semantics; no new local release contract
or external service availability is required to complete this sprint.

View File

@@ -1,260 +0,0 @@
# Adopt ReleaseKit's native release workflow
Status: implemented and verified.
## Goal
Delegate release validation, source publication, binary construction, and hosted
delivery to ReleaseKit. Minimize Narratio-owned release code and document a
ReleaseKit-native maintainer workflow.
Narratio owns its release selections: product identity, source remote, build
targets, hosted destination, selected checks, release-note content, and selected
Go toolchain. ReleaseKit owns the release mechanics and their semantics. Local
documentation explains Narratio's selections and links to canonical upstream
guidance for shared behavior.
This document defines the desired end state and required changes. The
[implementation plan](implementation.md) owns the staged work and its progress.
This roadmap does not authorize publishing a release.
## Reviewed Baseline
Narratio was reviewed at commit
`abaa3c78df38c37c8f461a7d218f9fc6d99bf8bd`. Its release tooling consists of:
- `scripts/release.sh`: candidate and remote guards, validation, lightweight tag
creation, and tag publication.
- `scripts/check-release-candidate.sh`: release-note and module checks, module
hygiene, formatting and whitespace checks, tests, vet, and release builds.
- `scripts/build-release-assets.sh` and `scripts/release-lib.sh`: binary builds,
custom version injection and verification, and shared shell helpers.
- `internal/releasecheck/`: tests and fixtures for those scripts.
- `internal/buildinfo/buildinfo.go`: a mutable version variable populated by
Narratio-specific linker flags and supplied to CommandKit's identity.
- `.woodpecker/release.yml`: candidate validation, asset construction, and Gitea
delivery through the release plugin.
- `internal/doccheck/doccheck_test.go`: documentation and workflow checks,
including assertions requiring the current release workflow's structure.
The four scripts total 304 lines; their dedicated tests total 741 lines. These
figures identify the removable maintenance surface, rather than a required LOC
reduction target.
The current consumer minimum is Go 1.27.0 and the selected release toolchain is
Go 1.27.4. The existing [release procedure](../release.md) and
[release policy](../policy/release.md) remain authoritative until implementation.
## Upstream Selection
Adopt `go.maximumdirect.net/releasekit` v0.10.0, at commit
`82bac1a3ab935beddd4b8789d1e07f52135d4243`. The upstream tag was confirmed to
identify this source revision. Its Go 1.27.0 minimum fits Narratio's baseline.
Canonical upstream references for this adoption are:
- [Consumer adoption](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/adoption.md).
- [Profile configuration](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/config.md)
and [CLI contract](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/cli.md).
- [Candidate checks](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/check.md)
and [source publication](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/publish.md).
- [Binary builds](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/build.md)
and [runtime version](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/runtime-version.md).
- [Tagged-source delivery](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/delivery.md)
and the maintained [Woodpecker template](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/examples/woodpecker/tag-delivery.yml).
Use the released dependency and matching template together. Subsequent upgrades
review both the selected module and any locally copied upstream wiring.
## Targeted End State
### Native dependency and command boundary
Register `go.maximumdirect.net/releasekit/cmd/releasekit` as a Go tool dependency
and use the same selected module for the runtime `buildinfo` import. Commit the
resolved `go.mod` and `go.sum`. Review dependency selection changes without
coupling this adoption to unrelated upgrades.
Provide a small repository-root `releasekit` launcher based on the upstream
consumer example. It selects the Go host target and forwards arguments to the
full registered tool package. Maintainers invoke it from the repository root.
Release operations remain native subcommands, such as
`./releasekit publish vMAJOR.MINOR.PATCH`; the launcher contains only invocation
wiring.
### Declarative release selections
A root `releasekit.json` is the release profile. Its selections are:
| Concern | Narratio selection |
| --- | --- |
| Product | `Narratio` |
| Module | Root module; retain the current module path |
| Branch and remote | Native `main` workflow and `origin` |
| Authoritative Git destination | `ssh://git@forge.maximumdirect.net:22222/eric/narratio.git` |
| Main package and binary | `./cmd/narratio`, `narratio` |
| Build targets | `linux/amd64`, `linux/arm64`, `darwin/arm64` |
| Go validation | `validation.go.race: true`, `validation.go.full_vet: true` |
| Formatting | `validation.go_format: true` |
| Module distribution | `validation.module_distribution.local_replacements: true` |
| Hosted delivery | Gitea at `https://forge.maximumdirect.net`, owner `eric`, repository `narratio` |
| Delivery credential | `RELEASEKIT_GITEA_TOKEN` supplied by CI |
Retain Linux as the primary platform and macOS arm64 as best-effort support.
Cross-compilation continues to establish compilation rather than native runtime
coverage. Keep Go 1.27.0 as the consumer minimum and Go 1.27.4 as the selected
release toolchain.
The selected binary builds supply target verification, so a second
`validation.go.compile_targets` pass is unnecessary. Existing default-suite
documentation and example tests continue to run through the native full suite;
an additional ReleaseKit Markdown pass is unnecessary for this adoption.
Use the native remote selection without an additional exact-push-URL gate.
Workspace-file bans, file-size limits, token-file validation, and other optional
checks remain unselected. Existing workspace and vendor acceptance remains
unchanged.
Retire the custom tidy and whitespace release gates, fixed module-path check,
and exact release-note first-line check. Native readonly validation and
release-note validation provide the adopted behavior. Module preparation and
ordinary source hygiene remain normal development work. The profile initially
needs no product-specific `checks` commands.
### Source release lifecycle
Preparation retains version selection, a checked-in
`docs/releases/<version>.md` note with Narratio's licensing footer, ordinary
change review, and retirement of completed roadmap work. The maintainer commits
and pushes the candidate to `origin/main` before invoking native `publish`.
ReleaseKit validates that candidate, verifies the selected builds, creates an
annotated tag, and publishes the exact tag. Adopt its native release-note,
guard, diagnostic, exit-status, publication-evidence, and recovery behavior.
Annotated tags replace lightweight tags for future releases; historical tags
and published contents remain unchanged.
Confirmed source-tag publication completes the release command. CI status,
download availability, and consumer installation remain separate from that
completion point. Native bounded reconciliation handles ambiguous push results;
the runbook links to upstream recovery guidance and identifies its entry point.
ReleaseKit's private publication records retain their native location and
handling, without a Narratio-specific record format or retention service.
Native `check` remains an optional diagnostic command. Routine publication
performs its own validation once. Dependency and toolchain preparation occurs
before offline validation, following the upstream workflow.
### Runtime version
Supply `go.maximumdirect.net/releasekit/buildinfo.Version()` directly to
CommandKit's Narratio identity. Remove `internal/buildinfo` and the custom
linker-variable convention. Adopt upstream version discovery, including the
main-module version fallback for ordinary installed binaries and `dev` for
development builds without release metadata.
Keep Narratio's existing CommandKit version command and presentation. Adapt its
tests to the native accessor and integration boundary instead of mutating a
Narratio-owned global. ReleaseKit's builder supplies release-version injection
and the native binary version smoke check.
### Asynchronous hosted delivery
Replace the current release-plugin pipeline with the maintained root-module
Woodpecker tag-delivery template, customized for Narratio's selected Go image,
profile, and credential wiring. Map the existing `GITEA_RELEASE_TOKEN` repository
secret to the native `RELEASEKIT_GITEA_TOKEN` environment variable; this migration
does not require operators to rename that stored secret.
The tagged module selects the ReleaseKit version used for delivery. Native
`ci-deliver` verifies tagged source, prepares dependencies, builds the selected
targets, and delivers the checked-in note and assets. Tag CI becomes a delivery
workflow; the separate push/PR and scheduled verification workflows retain their
existing responsibilities.
Preserve the three `narratio-<version>-<goos>-<goarch>` binary names and
`SHA256SUMS`. Adopt native immutable page/asset comparison, conflict reporting,
and retry behavior. Hosted delivery has its own status and can be retried from
the same tagged source. Older releases retain their original tooling and
workflow; this cutover does not retrofit them.
## Required Changes
### Implementation and removal
- Add the tool registration, runtime dependency, root profile, and forwarding
launcher; update the CommandKit identity to use the native version accessor.
- Replace `.woodpecker/release.yml` with the matching native delivery wiring.
Keep the selected CI toolchain aligned with the maintainer runbook.
- Delete all four superseded release scripts and `internal/releasecheck/`.
Remove obsolete fixtures, helpers, and assertions that only exercised those
scripts. Remove `internal/buildinfo` after replacing its callers.
- Replace `TestReleaseWorkflowRequiresValidation` with proportionate checks of
Narratio's actual profile and delivery wiring. Adapt shared workflow parsing
where needed to accept the upstream template's native YAML shape. Retain
useful general documentation and workflow-dependency checks.
- Keep local tests focused on Narratio-owned selections and version integration.
Generic Git publication, checksum, recovery, and Gitea delivery algorithms
retain their upstream test owner.
### Policy and documentation
Rewrite `docs/release.md` as a concise ReleaseKit-native runbook. Keep Narratio's
versioning rules, product selections, preparation commands, canonical source and
hosted destinations, licensing-footer URLs, selected toolchain, native
publication command, and separately identified delivery workflow locally.
Provide short navigation to native checks, delivery retries, and publication
recovery. Link upstream for their full behavior and configuration contracts.
Revise the Narratio-specific candidate-check section in `docs/policy/release.md`
to reflect the selected native checks and removal of custom gates. Preserve the
adopted compatibility, immutability, and successful-publication completion
policy. Keep the upstream policy language unchanged except for necessary local
adaptations. This work does not include a general policy-set upgrade.
Update `docs/development.md` to identify ReleaseKit, link its version-appropriate
consumer documentation, and describe tag CI as delivery. Update any affected
current version/build or release guidance and repair references to deleted
scripts. Historical release notes remain historical records.
Add ReleaseKit's commit-pinned LGPL-3.0-or-later attribution for incorporated
runtime code and copied wiring under the [OSS policy](../policy/oss.md).
Review applicable transitive and copied-material notices, reuse the existing
standard license texts where appropriate, and keep Narratio's grant unchanged.
### Verification and migration boundaries
Verify native tool registration, profile loading, the existing target/name
mapping, and CommandKit version output. Exercise the native builder against
Narratio to establish that injected release versions reach the real executable.
Use a disposable local Git fixture when publication wiring needs verification;
real publication and live Gitea delivery are outside the default offline suite.
Run the relevant tests and builds, then use a prepared clean candidate or
disposable committed checkout to verify native candidate checks. Prepare
dependencies separately. Avoid introducing a second permanent release suite or
testing upstream implementation details locally. Any live delivery smoke check
is explicitly optional and separate from source-release completion.
Keep application pipeline configuration, session data, stage execution, and the
pending Audita/workspace roadmaps outside this scope. The migration is a direct
cutover for future releases; legacy script aliases and compatibility shims add
no value to the selected target.
## Completion Criteria
- ReleaseKit's registered tool, declarative profile, and native runtime accessor
replace Narratio's release algorithms and custom version injection.
- Native publication validates once and finishes at confirmed tag publication,
independently of CI or hosted delivery availability.
- Native tag delivery produces the existing binary and checksum set using the
ReleaseKit version selected by the tagged module.
- Superseded scripts, dedicated script tests, and old-workflow assertions are
removed. Remaining tests cover Narratio's integration and selections.
- Policy, runbook, contributor guidance, and attribution agree with the
implemented native workflow and link upstream for shared semantics.
- Existing releases, application behavior, platform support, and consumer Go
minimum retain their established scope.
The agreed native-adoption direction resolves the significant choices for this
roadmap. No additional operator decision or upstream feature is required.

View File

@@ -1,105 +0,0 @@
# Review remediation
Reviewed all ten implementation stages against committed baseline
`f04b6097b879bfa96cf188858988141c81933c77` and the agreed feature roadmap.
Also reviewed all seven ReleaseKit adoption stages against
`c893e1086a8ebf649b37723c7ddf9a8035f74c8d`. Item 1 records the configured-startup
finding and item 2 the ReleaseKit finding. Both findings are completed.
## 1. Make the pure-loader regression test detect accidental bootstrap
Status: completed. Priority: P2. Implementation stages: 2 and 6.
Completion: the test registers restoration of the original environment state,
unsets the variable, and uses `LookupEnv` to verify that pure loading leaves it
absent. Explicit bootstrap provides a positive control before the retained
prepared-source handoff assertions. The focused test passes normally and fails
at the purity assertion with bootstrap inserted through a temporary build
overlay. Full tests and configuration-package race tests pass. Production
loading behavior is unchanged.
Location: [pipeline_discovery_test.go](../../internal/config/pipeline_discovery_test.go#L99),
`TestPipelineSourceRetainsPreparedMainAndPureLoading`.
The original test set its credential variable to an empty string before calling
the ordinary library loader. ConfigKit's default bootstrap preserves existing
variables, including empty ones. Consequently, the environment assertion still
passed with bootstrap accidentally introduced into `LoadPipelineWithOptions`.
This was the only configuration-package test declaring a secrets directory, so
the intended guard against library-owned environment mutation was ineffective.
Confirmed with a temporary Go build overlay that inserted an actual
`LoadSecretsIntoEnvironmentFromConfig` call into `LoadPipelineWithOptions`:
the named regression test still passed. Repository source files were unchanged
by that diagnostic check. The production loader currently has the correct
pure-loading implementation; this finding concerns its regression coverage.
Required change: restore the test variable's original state during cleanup,
start the pure-loading assertion with the variable genuinely unset, and check
that it remains unset after loading. Keep the subsequent prepared-source
handoff check; an explicit native bootstrap can serve as a positive control that
the fixture would actually populate the variable. No production bootstrap or
loader behavior change is needed.
Validation: the focused test passes against current production code and fails
when an accidental bootstrap call is temporarily inserted via a scratch overlay.
Keep this as a small behavioral test rather than adding a permanent mutation-test
framework or retesting ConfigKit's complete secrets policy.
## 2. Allow literal environment values in workflow inspection tests
Status: completed. Priority: P2. Implementation stage: 4.
Completion: the test-only environment mapping now retains native values, and the
release wiring assertion inspects only the required token's `from_secret`.
Both workflow-step fixtures cover string/numeric literals alongside a secret
reference. The regression failed before the fix and passes afterward. A scratch
workflow with added literals passes; changing its required secret name still
fails the specific delivery assertion. Full tests and doccheck race tests pass.
Production code and CI configuration are unchanged.
Location: [doccheck_test.go](../../internal/doccheck/doccheck_test.go#L342),
`woodpeckerStep.Environment` and `TestReleaseWorkflowDelivery`.
The original test-only workflow model decoded every environment value into a
struct containing `from_secret`. Woodpecker also supports ordinary literal environment
values, as documented in its
[environment reference](https://woodpecker-ci.org/docs/usage/environment).
Consequently, adding a valid setting such as
`GOCACHE: /tmp/narratio-go-cache` made both
`TestWoodpeckerWorkflowDependencies` and `TestReleaseWorkflowDelivery` fail during
YAML decoding. This affected all workflows inspected by the shared helper, not
just the required release-token mapping. Before this change, unrelated
environment fields were ignored.
Reproduced in a disposable clone by adding only that literal under the release
step's `environment`. Both tests fail with `cannot unmarshal !!str ... into
struct { FromSecret string ... }`; the same focused tests pass on the unchanged
candidate. No production or workflow files in Narratio were changed by this
diagnostic.
This unintentionally strengthened the CI configuration contract: every inspected
environment value had to have an object shape compatible with a secret
reference, even though only the `RELEASEKIT_GITEA_TOKEN` mapping requires
inspection. The checked-in workflow worked, but normal CI configuration
changes could unnecessarily block the default suite and native release
validation.
Required change: retain environment values in a form that accepts native literal
and secret-reference values, such as YAML nodes or a small generic mapping.
Inspect the required token's `from_secret` separately. Keep general dependency
checks independent of unrelated environment contents; a general Woodpecker
schema or validator is unnecessary.
Validation: add focused coverage for mapping-shaped and sequence-shaped steps
containing both a literal value and a secret reference. Ordinary literal values
must decode successfully, while an incorrect required release-token mapping
must still fail its specific wiring assertion. Run `go test ./internal/doccheck`.
The review otherwise found the dependency, version accessor, profile, launcher,
native delivery template, removals, policy, and runbook aligned with the target.
The full race-enabled suite, vet, build, and tidy-diff checks passed. Native
ReleaseKit built all three declared binaries at the reviewed commit with Go
1.27.4 and passed its injected-version smoke check. No source tag, upstream push,
or live hosted delivery was attempted.