Complete rehearsal guidance and integrated verification

This commit is contained in:
2026-12-05 23:48:37 +00:00
parent 3524d8bbb6
commit dd9e177420
23 changed files with 739 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
# Command line
ReleaseKit currently provides eight commands. The exit statuses below belong
The exit statuses below belong
to the native executable. `go run` examples are convenient for source execution,
but the Go driver maps a nonzero child exit status to 1. Use the built executable
or `./scripts/release` for publication when distinct statuses are needed.
@@ -368,3 +368,40 @@ consumers without a declared
ReleaseKit module dependency can use the separately installed-tool command.
See the [delivery guide](consumers/delivery.md#woodpecker-tag-workflows) for
compatible Go environments, retries, and preparation details.
## Rehearsal and recovery
```sh
releasekit test [--repo DIR] [--config FILE] [--ref REF] [--record-dir DIR] [--timeout DURATION] [--cleanup-timeout DURATION] [--json]
releasekit test-resume --record FILE [--token-file FILE] [--woodpecker-token-file FILE] [--timeout DURATION] [--cleanup-timeout DURATION] [--json]
releasekit test-cleanup --record FILE [--token-file FILE] [--woodpecker-token-file FILE] [--cleanup-timeout DURATION] [--json]
```
`test` captures `HEAD` or `--ref`, reads the profile from that commit, and
pushes a temporary annotated diagnostic tag. It observes the selected
Woodpecker delivery step, verifies its recorded page and artifact evidence,
and attempts cleanup only after matching CI runs are quiescent. It does not
require a clean checkout, choose a production version, or cancel CI. The
observation timeout defaults to 30 minutes; `--timeout 0` waits until the
context is canceled. Cleanup defaults to two minutes and its timeout must be
positive.
The command reports the exact private record path. Recovery always requires
that explicit path; it never selects a newest attempt. Local credentials come
from the recorded commit's profile unless file overrides are supplied. With
both overrides, recovery can load credentials without the recorded profile;
the checkout remains necessary for Git operations. `test-resume` observes and
then cleans; `test-cleanup` reports cleanup independently of prior verification.
Human output uses the current durable executable in its recovery commands when
available. If it was a temporary Go-run executable, use a supported ReleaseKit
tool with the same record after that executable disappears.
The [rehearsal guide](consumers/rehearsal.md) covers permissions and the limits
of the result.
With `--json`, each command emits one `schema_version: 1` object with safe
identity, workflow, build, verification and cleanup outcomes, resource links,
remaining resources and diagnostics. Status 0 means verification and cleanup
succeeded for `test` or `test-resume`, or cleanup succeeded for `test-cleanup`.
Status 2 denotes usage, configuration or required input failure before effects;
1 denotes a known failure or reporting error; 3 denotes unresolved CI or
remote state or pending cleanup. An error can accompany useful partial results.