Plan end-to-end Woodpecker delivery rehearsals

This commit is contained in:
2026-12-05 17:12:12 +00:00
parent 7def1fd840
commit eed068bd22

View File

@@ -5,11 +5,12 @@
Initial planning document for the next release after v0.10.0. These proposals
capture the requested direction and recommended design work. Recommendations
remain proposals until adopted; the release number and exact API are unassigned.
Explicit local and CI credential selection is adopted as the planned direction;
implementation is pending. This document adds no implementation or release gates.
Explicit local and CI credential selection and an end-to-end Woodpecker delivery
rehearsal are adopted as the planned direction; implementation is pending.
This document adds no implementation or release gates.
The objectives are to make local hosted delivery straightforward, expose useful
readiness diagnostics, exercise configured delivery capabilities on demand,
readiness diagnostics, rehearse the actual Woodpecker delivery workflow on demand,
and support release identifiers beyond stable Semantic Versioning. Keep routine
consumer configuration small and put reusable work behind ReleaseKit's existing
facades.
@@ -152,61 +153,101 @@ requirements when run. `validate` is an optional convenience and adds no require
pre-release invocation. Exact operation selection and network defaults remain
open below.
## 3. Exercise remote publication and hosted delivery
## 3. Rehearse the end-to-end Woodpecker delivery workflow
Consider an explicitly invoked `releasekit test` command that pushes a temporary
tag, creates a temporary hosted release, verifies the selected operations, and
removes the resources it created. This provides write evidence beyond read-only
preflight. It is a live operation using real credentials and remote resources.
Provide an explicitly invoked rehearsal that runs the actual tag-triggered
Woodpecker delivery workflow, generates the application's configured artifacts,
verifies hosted delivery, and cleans up temporary release resources. This
addresses failures that appear after a successful production tag push, including
missing CI credentials, failed builds, and missing uploads. The rehearsal uses
real CI and forge services without consuming a production release version.
Select local or CI context explicitly and reuse delivery's credential resolver
and readiness checks. A local exercise reads the local token file directly.
An exercise invoked inside Woodpecker reads the job's injected variable.
Report the context and credential source alongside capability outcomes. Success
on a workstation establishes evidence for local delivery; CI credential
write verification uses an exercise in the CI job. Provide maintained examples
for both contexts so consumers can repeat diagnostics without a production
release version or credential-export scripts.
ReleaseKit owns the reusable coordination and maintained workflow integration.
Consumers adopt the updated workflow and supply their profile, destinations,
and credential references. One local invocation should start the rehearsal,
observe its outcome, and report verification and cleanup results. The exact
command name and flags remain to be selected.
Recommend an isolated diagnostic tag namespace and a clearly marked hosted
release, distinct from production version tags. Existing release immutability
continues to apply to actual releases. The command should use the configured
Git push endpoint and hosted destination, report mismatches, and avoid changing
the current branch, index, or worktree. Before the first write, check local
configuration and credentials and record the intended diagnostic resources.
### Rehearsal flow
The design must account for these concrete outcomes:
1. Select an exact committed source revision and module/profile. Check the
required local inputs and record the intended diagnostic resources before
the first write. Preserve the workstation's branch, index, and worktree.
2. Create and push a uniquely named diagnostic tag, such as
`releasekit-test/<unique-id>`, to the configured publication endpoint.
The maintained delivery workflow accepts that namespace alongside production
tags. Verify the tag's commit and correlate the resulting Woodpecker run
with the recorded attempt.
3. Run the ordinary tool bootstrap, checkout verification, dependency
preparation, configured builds, and artifact generation inside Woodpecker.
Use the same profile, build targets, job image, secret mapping, and shared
delivery implementation as production releases.
4. Create a clearly marked temporary hosted page in the configured forge
repository and upload the actual declared artifacts. ReleaseKit supplies a
diagnostic identity and temporary note; consumers need no version bump or
production release note.
5. Observe the exact CI run through completion. Verify that the expected
delivery workflow executed, the configured artifacts were generated, and
the declared uploads are complete. Read back hosted artifact contents and
compare them with build evidence from that run. Page-only profiles verify
the page and report their declared scope.
6. Remove the attempt's temporary hosted page, assets, and tag after
verification or failure. Report workflow execution, artifact generation,
hosted verification, and cleanup outcomes separately, with links to the CI
run and actionable failure details.
- Unique names and exact object/resource identity allow concurrent runs and
prevent an existing release or tag from becoming a cleanup target.
- A lost acknowledgment may leave creation uncertain. Observe the exact remote
resource before deciding whether creation or removal succeeded.
- Cleanup runs after successful and failed exercises, with a bounded attempt
independent of an already canceled operation. A process crash or unavailable
service can leave resources behind. Retain enough local evidence for a later
cleanup attempt and report remaining or uncertain resources and exact recovery
instructions. Report exercise and cleanup outcomes separately.
- Tag deletion and release deletion require permissions that ordinary release
creation may not require. Explain this in setup and report the precise failing
capability.
- Tag events can trigger CI, notifications, webhooks, and downstream automation.
Deletion cannot retract those effects. Document trigger filtering and the
scope of the diagnostic namespace.
A successful rehearsal establishes evidence for the selected source, profile,
CI environment, diagnostic namespace, and destination at that time.
Production-tag-specific rules and future service availability remain separate
considerations. CI history and any notifications or webhook effects persist
after temporary release resources are removed.
Creating a tag and page proves only those operations and cleanup. If asset
delivery is selected, recommend a small diagnostic attachment with read-back
verification to exercise that path too. This does not certify an asynchronous
CI workflow, every application build, or future availability. Report artifact
generation separately from upload verification; a diagnostic attachment
establishes upload evidence only. Evidence from the diagnostic tag namespace
also has that scope; production tag rules may differ. Settle the command's
advertised scope in Open Decisions.
### Credentials and execution contexts
Implement reusable coordination internally with a proportionate facade API;
keep CLI parsing, credential loading, reporting, and process exits in the CLI.
Introduce diagnostic deletion capabilities at the forge boundary as needed,
leaving ordinary delivery's matching and retry semantics intact. This command
remains opt-in and outside default tests and routine publication gates.
Reuse item 1's explicit credential selection and item 2's readiness checks.
The local coordinator uses native Git authentication to push the diagnostic
tag and reads the configured local forge token file for its forge operations.
Woodpecker supplies its stored secret to the actual delivery job, which uses
the CI credential declaration. Successful local authentication does not stand
in for verifying the job's injected credential.
Observing Woodpecker requires its server/repository identity and authorization
to inspect the relevant pipeline and workflow results. Keep that authorization
distinct from the Gitea delivery token. Local Woodpecker credentials follow
the persistent-file model; ReleaseKit loads them directly. Consumers maintain
no workstation environment exports or credential-loading scripts.
### Shared implementation and recovery
Add explicit diagnostic identity support to CI preparation, builds, delivery,
and relevant evidence formats. Today's `ci-deliver` requires a module-derived
stable semantic tag. Diagnostic tags need a supported path through those
operations, including module selection and workflow dispatch. Keep the normal
build and delivery mechanics shared; diagnostic mode supplies the temporary
identity, note, and resource lifecycle.
Use unique attempt names and exact tag, commit, pipeline, and hosted-resource
identities to scope verification and deletion. Observe uncertain remote writes
before classifying their outcome. Cleanup follows successful and failed runs,
with bounded attempts independent of an already canceled local invocation.
Coordinate cleanup with CI execution so an active job cannot recreate resources
after cleanup is reported complete. When the job or remote state remains
uncertain, retain recovery evidence and report cleanup as pending or unknown.
Persist enough attempt information to resume observation and cleanup after
interruption, process failure, or service unavailability. Recovery targets only
the recorded diagnostic resources and preserves existing releases. Document
the deletion permissions required for cleanup and report remaining resources
with exact recovery instructions.
Implement reusable orchestration behind a proportionate facade API, with
Woodpecker integration and diagnostic forge operations behind internal
boundaries. The CLI owns argument parsing, credential loading, reporting, and
exit status. Update maintained workflows and adoption guidance with the
feature. The rehearsal remains opt-in and outside default offline tests and
routine publication gates. Ordinary source publication still completes at the
successful production tag push; the rehearsal waits for CI because verifying
that workflow is its purpose.
## 4. Support additional versioning schemes
@@ -255,8 +296,10 @@ change that policy.
explicit local and CI credential declarations and context selection across
delivery, readiness validation, and the delivery exercise. Align Woodpecker
secret mappings and document migration from the existing fields.
3. Add live diagnostic coordination, narrowly scoped backend operations, outcome
reporting, and cleanup recovery.
3. Add diagnostic identity support and Woodpecker tag dispatch to the shared
CI build and delivery path. Implement rehearsal coordination, exact-run
observation, generated-artifact verification, diagnostic deletion, and
recovery. Provide maintained workflow and persistent-credential examples.
4. Extend version identity and carry it through publication, builds, delivery,
stored formats, and launchers. Update affected schema versions when their
interpretation changes and document consumer migration.
@@ -271,11 +314,14 @@ across delivery, readiness, and exercises. Verify that diagnostics identify
context and evidence limits without exposing token contents. Cover offline
versus online validation in each context and agent-based Git authentication;
diagnostic collisions, partial creation, lost acknowledgments, cancellation,
and cleanup failures; and version/date boundaries and identity consistency across
operations
and stored formats. Use temporary Git remotes and local HTTP fixtures in the
default suite. Real forge exercises stay explicitly opt-in. This outline has
no pilot releases or intermediate external review gates.
and cleanup failures. Exercise exact pipeline correlation, missing or skipped
delivery jobs, build failures, missing or mismatched artifacts, and cleanup
while CI is active or its status is unknown. Verify that rehearsal and
production paths share configured builds and delivery mechanics. Cover
version/date boundaries and identity consistency across operations and stored
formats. Use temporary Git remotes and local HTTP fixtures for Woodpecker and
forge behavior in the default suite. Live rehearsals stay explicitly opt-in.
This outline has no pilot releases or intermediate external review gates.
## Open Decisions
@@ -301,20 +347,14 @@ option. This gives stronger immediate readiness evidence but makes a routine
configuration check depend on service availability and credentials for every
selected remote operation.
### Live exercise scope
### Rehearsal interface and recovery
**Recommendation:** Exercise Git tag push, hosted-page creation, selected asset
upload, and cleanup directly, with accurate capability reporting. This gives
useful write evidence in one invocation using the selected context's credentials.
Run the CI-context exercise inside the CI job to verify secret injection.
It adds cleanup state and deletion permissions and cannot establish
asynchronous CI success.
**Alternative:** Run the exercise in a dedicated sandbox repository through
the actual CI workflow. This can cover automation while isolating production
events, but needs additional setup and tests different repository permissions
and configuration. It is useful integration evidence rather than equivalent
proof of access to the production destination.
The end-to-end Woodpecker scope in item 3 is decided. Finalize the command
syntax, diagnostic tag/module mapping, Woodpecker connection and credential-file
settings, and attempt-record format. Define how callers resume observation and
cleanup, how interruption and observation timeouts are reported, and how the
coordinator obtains build evidence for remote artifact verification. Keep these
mechanics in ReleaseKit and its maintained workflow.
### Version formats and Go module identity