Document the native ReleaseKit workflow
This commit is contained in:
@@ -37,6 +37,7 @@ a model. For complete invocation and output behavior, see the
|
|||||||
- [Framework configuration inspection](docs/cli.md#framework-configuration-inspection)
|
- [Framework configuration inspection](docs/cli.md#framework-configuration-inspection)
|
||||||
- [HTTP API reference](docs/api.md)
|
- [HTTP API reference](docs/api.md)
|
||||||
- [Operations guide](docs/operations.md)
|
- [Operations guide](docs/operations.md)
|
||||||
|
- [Release procedure](docs/release.md)
|
||||||
- [Consumer integration overview](docs/consumers/api.md)
|
- [Consumer integration overview](docs/consumers/api.md)
|
||||||
- [Migration from the former Go package](docs/consumers/migrating-to-promptkit.md)
|
- [Migration from the former Go package](docs/consumers/migrating-to-promptkit.md)
|
||||||
- [Native CLI migration](docs/consumers/upgrading-cli.md)
|
- [Native CLI migration](docs/consumers/upgrading-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
|
Native `--show-tokens` requests a diagnostic usage/cost summary; quiet mode
|
||||||
suppresses it. Explicit smoke tests may contact providers and incur cost.
|
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
|
## Generation
|
||||||
|
|
||||||
`run` requires one positional prompt ID and uses the native profile, session,
|
`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
|
[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
|
[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
|
||||||
|
|||||||
@@ -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,
|
The earlier [PromptKit upgrade](upgrading-promptkit.md) covers framework formats,
|
||||||
not a compatibility layer for this interface.
|
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
|
## Replace Commands And Selections
|
||||||
|
|
||||||
| Former interface | Current interface |
|
| Former interface | Current interface |
|
||||||
|
|||||||
@@ -65,7 +65,9 @@ import a PromptKit `internal` package.
|
|||||||
The module graph can include upstream maintainer tools such as ReleaseKit and
|
The module graph can include upstream maintainer tools such as ReleaseKit and
|
||||||
their dependencies even though those graph-only packages are not linked into
|
their dependencies even though those graph-only packages are not linked into
|
||||||
the Scriptorium runtime; use `go list -deps ./cmd/scriptorium` to distinguish
|
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
|
## Baseline Validation
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ own their external contracts and boundaries.
|
|||||||
|
|
||||||
## CLI Composition And Acquisition
|
## 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,
|
`app.go` composes application run/serve declarations with native configuration,
|
||||||
PromptKit, completion, help, and version support. CommandKit owns parsing,
|
PromptKit, completion, help, and version support. CommandKit owns parsing,
|
||||||
declaration-input checks, reporting selection, presentation, and finalization.
|
declaration-input checks, reporting selection, presentation, and finalization.
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ public behavior belongs in the linked contracts.
|
|||||||
|
|
||||||
| Component | Implemented responsibility | References |
|
| 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/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/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/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/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) |
|
| `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
|
dependencies, not local framework packages. There is no custom CLI formatter
|
||||||
package or compatibility dispatch surface.
|
package or compatibility dispatch surface.
|
||||||
|
|||||||
187
docs/release.md
187
docs/release.md
@@ -1,164 +1,71 @@
|
|||||||
# Release Procedure
|
# Release Procedure
|
||||||
|
|
||||||
The [release policy](policy/release.md) owns versioning, compatibility,
|
The [release policy](policy/release.md) owns versioning, compatibility,
|
||||||
publication completion, and immutability. This runbook supplies Scriptorium's
|
publication completion, and immutability. This runbook gives Scriptorium's
|
||||||
commands; release notes under `docs/releases/` are historical summaries. The
|
local selections; [ReleaseKit v0.10.0][adoption] owns release mechanics.
|
||||||
[OSS policy](policy/oss.md#discoverability) owns license and attribution
|
|
||||||
discoverability requirements.
|
|
||||||
|
|
||||||
## Prepare The Candidate
|
## Prepare
|
||||||
|
|
||||||
Use a POSIX shell, Git with a configured tagger identity and access to
|
Use a POSIX shell, Git with a configured tagger identity, Go 1.27.4, and the
|
||||||
`origin`, and the selected release toolchain, Go 1.27.4. The native host must
|
native race detector's C compiler prerequisites. If tags are signed, arrange
|
||||||
support Go's race detector and have its required C compiler. If Git is
|
the signing tool and key. Work from the repository root on `main`; the
|
||||||
configured to sign tags, its signing tool and key must be available. Run from the
|
authoritative `origin` push endpoint is currently
|
||||||
repository root. The [developer guide](development.md#baseline-validation)
|
`ssh://git@forge.maximumdirect.net:22222/eric/scriptorium.git`. The Go consumer
|
||||||
explains the separate Go consumer minimum; selecting a release toolchain does
|
minimum is separate; see the [developer guide](development.md).
|
||||||
not raise that minimum.
|
|
||||||
|
|
||||||
Install Go 1.27.4 from the [official downloads](https://go.dev/dl/) or an
|
Select Go 1.27.4 and prepare public dependencies before offline validation:
|
||||||
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:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
release_go_root=/path/to/go1.27.4
|
|
||||||
export PATH="$release_go_root/bin:$PATH"
|
|
||||||
export GOTOOLCHAIN=local
|
|
||||||
go version
|
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
|
GOWORK=off go mod download
|
||||||
```
|
```
|
||||||
|
|
||||||
Choose an unused stable version under the release policy. Commit its note as
|
Choose an unused stable version and commit its note at
|
||||||
`docs/releases/<version>.md`, beginning with a title such as
|
`docs/releases/<version>.md`, beginning with `# Scriptorium <version>`. Include
|
||||||
`# Scriptorium v0.14.0` (an example, not an instruction to select that version).
|
the relevant compatibility impact and upgrade actions. For the eventual
|
||||||
Include a concise summary and relevant compatibility impact or upgrade action.
|
ReleaseKit adoption release, mention the new maintainer entry point and the
|
||||||
End the note with the following footer, replacing `<version>` in all three absolute
|
loss of separately injected revision metadata. End the note with immutable
|
||||||
URLs with the selected version tag (for example, `v0.14.0`):
|
links, substituting the chosen tag in all three locations:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
[COPYRIGHT](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/<version>/COPYRIGHT) | [LICENSE](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/<version>/LICENSE) | [ATTRIBUTION](https://gitea.maximumdirect.net/eric/scriptorium/src/tag/<version>/docs/oss/attribution.md)
|
[COPYRIGHT](https://forge.maximumdirect.net/eric/scriptorium/src/tag/<version>/COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/eric/scriptorium/src/tag/<version>/LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/eric/scriptorium/src/tag/<version>/docs/oss/attribution.md)
|
||||||
```
|
```
|
||||||
|
|
||||||
Check that all three URLs name files in the candidate tree at that tag. The tag may
|
Publish the intended `main` commit to `origin` before publishing its tag.
|
||||||
not resolve online until publication. The checked-in note is copied unchanged
|
The checked-in note supplies the complete hosted release body 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.
|
|
||||||
|
|
||||||
Finish and commit the intended candidate on `main`, then publish that branch:
|
## Publish And Deliver
|
||||||
|
|
||||||
|
From the module root, substitute the selected version:
|
||||||
|
|
||||||
```sh
|
```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`,
|
The module-selected tool uses [releasekit.json](../releasekit.json) for product,
|
||||||
not a potentially stale remote-tracking ref. If a separate push URL is
|
race testing, Linux amd64/arm64 builds, and delivery selections. Native `check`
|
||||||
configured, it is authoritative for both checks and publication. Configure one
|
is an optional diagnostic, not a required step before `publish`. See the
|
||||||
publication URL; multiple push endpoints cannot be validated as one remote.
|
[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-<version>-linux-amd64`, `scriptorium-<version>-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
|
For delivery retries and partial or unknown outcomes, follow the upstream
|
||||||
the selected version:
|
[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
|
[adoption]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/adoption.md
|
||||||
sh scripts/release.sh v0.14.0
|
[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
|
||||||
The command validates a clean worktree and index on `main`, an unused local and
|
[publication]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/publish.md
|
||||||
remote version, exact agreement with authoritative remote `main`, and a
|
[delivery]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/delivery.md
|
||||||
checked-in note whose first-level title contains Scriptorium and the exact
|
[runtime]: https://forge.maximumdirect.net/base-layer/releasekit/src/commit/82bac1a3ab935beddd4b8789d1e07f52135d4243/docs/consumers/runtime-version.md
|
||||||
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=<version> -X main.revision=<candidate-commit>`.
|
|
||||||
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-<version>-linux-amd64`;
|
|
||||||
- `scriptorium-<version>-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.
|
|
||||||
|
|||||||
@@ -351,6 +351,12 @@ tool-only Markdown and module tooling.
|
|||||||
|
|
||||||
## Stage 6: Rewrite The Maintainer Runbook And Align Canonical Documentation
|
## 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`,
|
**Primary files:** `docs/release.md`, `docs/development.md`, `docs/cli.md`,
|
||||||
`docs/internal/overview.md`, `docs/internal/adapters.md`, and relevant concise
|
`docs/internal/overview.md`, `docs/internal/adapters.md`, and relevant concise
|
||||||
guidance in `docs/consumers/upgrading-cli.md` and `README.md`.
|
guidance in `docs/consumers/upgrading-cli.md` and `README.md`.
|
||||||
|
|||||||
Reference in New Issue
Block a user