From 1261e231859d85fe39f8bfa8648c60df8627fa70 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Mon, 23 Nov 2026 19:23:52 +0000 Subject: [PATCH] Document the native ReleaseKit workflow --- README.md | 1 + docs/cli.md | 6 + docs/consumers/upgrading-cli.md | 4 + docs/development.md | 4 +- docs/internal/adapters.md | 4 + docs/internal/overview.md | 4 +- docs/release.md | 187 ++++++++------------------------ docs/roadmap/implementation.md | 6 + 8 files changed, 73 insertions(+), 143 deletions(-) diff --git a/README.md b/README.md index fe9fa86..87c454d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ a model. For complete invocation and output behavior, see the - [Framework configuration inspection](docs/cli.md#framework-configuration-inspection) - [HTTP API reference](docs/api.md) - [Operations guide](docs/operations.md) +- [Release procedure](docs/release.md) - [Consumer integration overview](docs/consumers/api.md) - [Migration from the former Go package](docs/consumers/migrating-to-promptkit.md) - [Native CLI migration](docs/consumers/upgrading-cli.md) diff --git a/docs/cli.md b/docs/cli.md index 9e646d6..945d38e 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -24,6 +24,11 @@ Configuration-consuming commands accept `--config PATH` and `--overlay NAME`. Native `--show-tokens` requests a diagnostic usage/cost summary; quiet mode suppresses it. Explicit smoke tests may contact providers and incur cost. +The native version command receives its version from ReleaseKit's public +`buildinfo.Version()` accessor. See the [runtime version guide][runtime] for +build and fallback semantics. Scriptorium no longer supplies a separate +revision; CommandKit owns the structured version representation and options. + ## Generation `run` requires one positional prompt ID and uses the native profile, session, @@ -96,3 +101,4 @@ operation failure does not produce a synthetic result. [native]: https://forge.maximumdirect.net/base-layer/commandkit/src/commit/0b53a63648c536afe50c46f948159116f776adae/docs/cli.md [promptkit]: https://forge.maximumdirect.net/base-layer/promptkit/src/commit/207677e9948dc5699073a4d6620d21139033c72d/docs/consumers/pkg-promptkit.md +[runtime]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/runtime-version.md diff --git a/docs/consumers/upgrading-cli.md b/docs/consumers/upgrading-cli.md index 5c921dc..92cd28c 100644 --- a/docs/consumers/upgrading-cli.md +++ b/docs/consumers/upgrading-cli.md @@ -7,6 +7,10 @@ not select a release version or change historical release notes. The The earlier [PromptKit upgrade](upgrading-promptkit.md) covers framework formats, not a compatibility layer for this interface. +Version output no longer includes a separately injected revision. Maintainers +use the root ReleaseKit launcher instead of the former release script; see the +[release procedure](../release.md). + ## Replace Commands And Selections | Former interface | Current interface | diff --git a/docs/development.md b/docs/development.md index 8c13cfb..f6ed954 100644 --- a/docs/development.md +++ b/docs/development.md @@ -65,7 +65,9 @@ import a PromptKit `internal` package. The module graph can include upstream maintainer tools such as ReleaseKit and their dependencies even though those graph-only packages are not linked into the Scriptorium runtime; use `go list -deps ./cmd/scriptorium` to distinguish -the linked packages. +the linked packages. ReleaseKit v0.10.0 is a module-selected maintainer tool; +the application separately uses its public `buildinfo` package for version +identity. See the [release procedure](release.md) for the native workflow. ## Baseline Validation diff --git a/docs/internal/adapters.md b/docs/internal/adapters.md index 02c5b89..52f092b 100644 --- a/docs/internal/adapters.md +++ b/docs/internal/adapters.md @@ -6,6 +6,10 @@ own their external contracts and boundaries. ## CLI Composition And Acquisition +The executable supplies CommandKit's identity with ReleaseKit's public +version accessor and no separate revision; the [CLI contract](../cli.md) +links to upstream version semantics. + `app.go` composes application run/serve declarations with native configuration, PromptKit, completion, help, and version support. CommandKit owns parsing, declaration-input checks, reporting selection, presentation, and finalization. diff --git a/docs/internal/overview.md b/docs/internal/overview.md index 529b010..82cdb44 100644 --- a/docs/internal/overview.md +++ b/docs/internal/overview.md @@ -6,13 +6,13 @@ public behavior belongs in the linked contracts. | Component | Implemented responsibility | References | | --- | --- | --- | -| `cmd/scriptorium` | Build identity, signal-aware context, native status-to-process exit. | [CLI](../cli.md), [adapters](adapters.md) | +| `cmd/scriptorium` | ReleaseKit version handoff to CommandKit, signal-aware context, native status-to-process exit. | [CLI](../cli.md), [adapters](adapters.md) | | `internal/adapter/cli` | CommandKit composition, ckconfig/ckprompt acquisition, application loading, native request mapping, run/report effects, and HTTP process lifecycle. | [CLI](../cli.md), [adapters](adapters.md), [sources](sources.md) | | `internal/adapter/http` | Routes, strict DTO decoding, transport limits, public request/result/error mapping, and restricted artifact reader. | [HTTP API](../api.md), [adapters](adapters.md), [sources](sources.md) | | `internal/config` | Shared ConfigKit schema, secrets bootstrap, discovery/selection, and application definition callbacks. | [Configuration](../config.md), [sources](sources.md) | | `internal/defaults` | Application and HTTP default constants. | [Configuration](../config.md) | | `internal/report` | HTTP terminal-observation metadata projection. It is not used for CLI native result reports. | [HTTP execution report](../api.md#execution-report), [adapters](adapters.md) | -CommandKit, ckconfig, ckprompt, ConfigKit, and PromptKit are released upstream +CommandKit, ckconfig, ckprompt, ConfigKit, PromptKit, and ReleaseKit are released upstream dependencies, not local framework packages. There is no custom CLI formatter package or compatibility dispatch surface. diff --git a/docs/release.md b/docs/release.md index d5de15f..fd231ae 100644 --- a/docs/release.md +++ b/docs/release.md @@ -1,164 +1,71 @@ # Release Procedure The [release policy](policy/release.md) owns versioning, compatibility, -publication completion, and immutability. This runbook supplies Scriptorium's -commands; release notes under `docs/releases/` are historical summaries. The -[OSS policy](policy/oss.md#discoverability) owns license and attribution -discoverability requirements. +publication completion, and immutability. This runbook gives Scriptorium's +local selections; [ReleaseKit v0.10.0][adoption] owns release mechanics. -## Prepare The Candidate +## Prepare -Use a POSIX shell, Git with a configured tagger identity and access to -`origin`, and the selected release toolchain, Go 1.27.4. The native host must -support Go's race detector and have its required C compiler. If Git is -configured to sign tags, its signing tool and key must be available. Run from the -repository root. The [developer guide](development.md#baseline-validation) -explains the separate Go consumer minimum; selecting a release toolchain does -not raise that minimum. +Use a POSIX shell, Git with a configured tagger identity, Go 1.27.4, and the +native race detector's C compiler prerequisites. If tags are signed, arrange +the signing tool and key. Work from the repository root on `main`; the +authoritative `origin` push endpoint is currently +`ssh://git@forge.maximumdirect.net:22222/eric/scriptorium.git`. The Go consumer +minimum is separate; see the [developer guide](development.md). -Install Go 1.27.4 from the [official downloads](https://go.dev/dl/) or an -equivalent package source before validation. Set `release_go_root` to its -installation directory, replacing the illustrative path below, and select it -in the release shell: +Select Go 1.27.4 and prepare public dependencies before offline validation: ```sh -release_go_root=/path/to/go1.27.4 -export PATH="$release_go_root/bin:$PATH" -export GOTOOLCHAIN=local go version -``` - -The version output should identify `go1.27.4`. Keep this selection and the -hosted workflow's Go image in step when deliberately updating the release -toolchain. Ordinary contributor checks may use another compatible toolchain. - -Provision the module cache before offline validation; when dependencies are -not cached: - -```sh GOWORK=off go mod download ``` -Choose an unused stable version under the release policy. Commit its note as -`docs/releases/.md`, beginning with a title such as -`# Scriptorium v0.14.0` (an example, not an instruction to select that version). -Include a concise summary and relevant compatibility impact or upgrade action. -End the note with the following footer, replacing `` in all three absolute -URLs with the selected version tag (for example, `v0.14.0`): +Choose an unused stable version and commit its note at +`docs/releases/.md`, beginning with `# Scriptorium `. Include +the relevant compatibility impact and upgrade actions. For the eventual +ReleaseKit adoption release, mention the new maintainer entry point and the +loss of separately injected revision metadata. End the note with immutable +links, substituting the chosen tag in all three locations: ```markdown -[COPYRIGHT](https://gitea.maximumdirect.net/eric/scriptorium/src/tag//COPYRIGHT) | [LICENSE](https://gitea.maximumdirect.net/eric/scriptorium/src/tag//LICENSE) | [ATTRIBUTION](https://gitea.maximumdirect.net/eric/scriptorium/src/tag//docs/oss/attribution.md) +[COPYRIGHT](https://forge.maximumdirect.net/eric/scriptorium/src/tag//COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/eric/scriptorium/src/tag//LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/eric/scriptorium/src/tag//docs/oss/attribution.md) ``` -Check that all three URLs name files in the candidate tree at that tag. The tag may -not resolve online until publication. The checked-in note is copied unchanged -into the hosted release body by the existing workflow, so do not maintain a -second footer there. -Update affected canonical documentation with the change, and retire completed -roadmap material when appropriate while preserving deferred work and links. +Publish the intended `main` commit to `origin` before publishing its tag. +The checked-in note supplies the complete hosted release body unchanged. -Finish and commit the intended candidate on `main`, then publish that branch: +## Publish And Deliver + +From the module root, substitute the selected version: ```sh -git -c push.followTags=false push origin refs/heads/main:refs/heads/main +sh ./releasekit publish VERSION ``` -The publication command inspects the configured push endpoint of `origin`, -not a potentially stale remote-tracking ref. If a separate push URL is -configured, it is authoritative for both checks and publication. Configure one -publication URL; multiple push endpoints cannot be validated as one remote. +The module-selected tool uses [releasekit.json](../releasekit.json) for product, +race testing, Linux amd64/arm64 builds, and delivery selections. Native `check` +is an optional diagnostic, not a required step before `publish`. See the +[CLI][cli], [profile][profile], [build][build], and [publication and +reconciliation][publication] guides for command semantics and recovery. -## Publish +A successful tag push completes source publication; hosted delivery is +asynchronous and must be reported separately. The tag-triggered +[Woodpecker workflow](../.woodpecker/release.yml) delivers +`scriptorium--linux-amd64`, `scriptorium--linux-arm64`, and +`SHA256SUMS`. An operator must provision the Woodpecker repository secret +`releasekit_gitea_token`, mapped to `RELEASEKIT_GITEA_TOKEN`; source +publication itself needs no delivery token. Keep the earlier +`GITEA_RELEASE_TOKEN` secret for historical tagged workflows. -Invoke the single [publication command](../scripts/release.sh), substituting -the selected version: +For delivery retries and partial or unknown outcomes, follow the upstream +[delivery guide][delivery] and retain original build artifacts where rebuilding +could change bytes. Runtime version behavior is described by the +[runtime version guide][runtime]. -```sh -sh scripts/release.sh v0.14.0 -``` - -The command validates a clean worktree and index on `main`, an unused local and -remote version, exact agreement with authoritative remote `main`, and a -checked-in note whose first-level title contains Scriptorium and the exact -version. Ignored local files do not make the candidate dirty. - -The source-boundary guards reject committed workspaces, vendor trees, and -module replacements. - -It then runs the complete suite once with the race detector and builds Linux -amd64 and arm64 binaries using `CGO_ENABLED=0`, `-trimpath`, and linker flags -`-s -w -X main.version= -X main.revision=`. -The native test run uses the host platform and enables cgo. -Validation disables workspaces, uses read-only module mode, and disables module -and toolchain downloads. Missing dependencies must be provisioned separately; -fix the environment and rerun the command. No persistent validation cache is -maintained by the release tool. - -The command rechecks candidate and publication state, creates an annotated tag -from the committed note, and pushes only that tag's exact object to its explicit -ref. It does not push branches, follow other tags, force updates, or wait for -CI. Temporary notes and validation builds are removed on exit. The successful -summary identifies the source commit and tag object and reports binary -delivery separately as asynchronous and unverified. - -## Asynchronous Binary Delivery - -The tag-triggered [hosted workflow](../.woodpecker/release.yml) builds and -publishes: - -- `scriptorium--linux-amd64`; -- `scriptorium--linux-arm64`; and -- `SHA256SUMS`. - -The matching checked-in note supplies the hosted release body. The workflow -owns image selection, packaging, checksum generation, and upload configuration. -Its binaries receive the tag and source commit as the same version/revision -metadata used by local candidate builds. -Its upload step skips existing files and does not overwrite the release. -Source-publication success does not attest to workflow success or asset -availability. - -Workflow inspection, downloads, checksum verification, and a compatible-host -smoke test are optional delivery diagnostics. They must not delay or redefine -source-release completion. No polling or consumer-installation check is part -of the publication command. - -## Failure Recovery - -Before tag creation, correct and commit a failed candidate, publish `main`, -and invoke the publication command again. A changed candidate must pass its -own validation. - -After an unsuccessful push, the command queries the authoritative endpoint. -If it confirms the exact tag object and candidate, it reports source success. -Otherwise it exits unsuccessfully and preserves the local tag. It never retries -a push or deletes a tag automatically. If the endpoint is unavailable, the -publication status is unknown, not evidence that nothing was published. - -For manual diagnosis, select the affected version and compare the local tag -object and peeled commit with the authoritative remote: - -```sh -release_version=v0.14.0 -release_remote=$(git remote get-url --push origin) -git rev-parse "refs/tags/$release_version" "refs/tags/$release_version^{commit}" -git ls-remote "$release_remote" refs/heads/main \ - "refs/tags/$release_version" "refs/tags/$release_version^{}" -``` - -Do not retry while the outcome remains unknown. If the tag exists remotely, -do not move, recreate, or delete it. If the tag was never published or used by -any release channel, an explicitly authorized local cleanup may delete only -that unpublished tag; then rerun the command to validate and publish the -candidate. The command intentionally rejects an existing local tag rather than -assuming that a previous process validated it. - -For transient delivery failures, inspect what has already been uploaded before -retrying the same immutable tag. The upload step's skip behavior alone does not -prove checksum consistency. Add missing assets only if they match the tagged -source and any already-published manifest, without replacing existing contents. -Compare rebuilt bytes with published checksums when recovering a partial -upload; do not assume toolchain changes reproduce identical binaries. If safe -completion is impossible, or published source, notes, packaging, or artifact -contents need correction, leave the original release intact and publish a new -version from a corrected commit. +[adoption]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/adoption.md +[cli]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/cli.md +[profile]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/config.md +[build]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/build.md +[publication]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/publish.md +[delivery]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/delivery.md +[runtime]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/runtime-version.md diff --git a/docs/roadmap/implementation.md b/docs/roadmap/implementation.md index 917a1cd..98b45a3 100644 --- a/docs/roadmap/implementation.md +++ b/docs/roadmap/implementation.md @@ -351,6 +351,12 @@ tool-only Markdown and module tooling. ## Stage 6: Rewrite The Maintainer Runbook And Align Canonical Documentation +**Completed:** The runbook and current CLI, contributor, internal, migration, +and navigation guidance now describe the native path and version handoff. +Reviewed current documentation for obsolete script, injection, and mechanical +dependency-ban references; checked pinned guide paths and credential mapping. +`go mod download` and the harmless launcher version command succeeded offline. + **Primary files:** `docs/release.md`, `docs/development.md`, `docs/cli.md`, `docs/internal/overview.md`, `docs/internal/adapters.md`, and relevant concise guidance in `docs/consumers/upgrading-cli.md` and `README.md`.