Files
releasekit/docs/roadmap/next-release.md

445 lines
24 KiB
Markdown

# Next release proposals
## Status and purpose
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, setup-readiness validation, and an
end-to-end Woodpecker delivery rehearsal are adopted as the planned direction.
The release-purpose distinction, calendar formats, caller-selected identifiers,
and application tag conventions in item 4 are also adopted. Implementation is
pending; support for repositories without Go modules remains open. This document
adds no implementation or release gates.
The objectives are to make local hosted delivery straightforward, expose useful
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.
## Current baseline
- Hosted delivery already accepts `delivery.token_file` and `delivery.token_env`.
A nonblank environment value wins; the file is a fallback. The default
environment variable is `RELEASEKIT_GITEA_TOKEN`. Missing credentials and
unreadable or blank selected files produce errors. See
[configuration](../config.md) and [delivery guidance](../consumers/delivery.md).
- `PreflightDelivery` verifies authenticated repository access through read-only
requests. `Deliver` runs it automatically. It cannot establish that every
subsequent write will succeed. [ADR 0006](../adr/0006-neutral-forge-delivery-and-preflight.md)
records that boundary.
- `check` validates a committed candidate and runs the offline Go suite and
selected checks. The CLI has no `validate` or live workflow-test command.
Source publication uses native Git authentication independently of the hosted
API token. See the [CLI contract](../cli.md).
- `internal/versioncontract`, CLI parsing, and `internal/releaseidentity` require
stable `vMAJOR.MINOR.PATCH` identifiers. Identity derivation also enforces Go
module-path major compatibility and determines full tags and note paths.
Builds, delivery, receipts, recovery records, and CI launchers consume that
identity. The [package inventory](../internal/overview.md) describes ownership.
## 1. Select local and CI credentials explicitly
Recent releases completed the Git tag push but failed hosted delivery because
the expected token environment variable was unavailable. Persistent local file
credentials and automatic CI secret injection should make setup routine.
Adopt separate local and CI credential declarations in one shared profile.
Ordinary local delivery reads the configured local token file directly.
`ci-deliver` reads the configured environment variable inside the CI delivery
job. The invocation selects the context explicitly; ambient environment values
do not choose the context or override local file credentials. Each context
reports problems with its own selected source, without falling back to the other.
Illustrative profile fragment; exact field spelling remains to be finalized:
```json
{
"delivery": {
"credentials": {
"local": {
"token_file": ".releasekit/gitea-token"
},
"ci": {
"token_environment_variable": "RELEASEKIT_DELIVERY_TOKEN"
}
}
}
}
```
Local setup consists of saving the token once and configuring its path.
ReleaseKit reads it on each local invocation, including after workstation
reboots. This workflow requires no manually exported workstation variable,
shell startup configuration, or consumer-owned credential-loading script.
Preserve repository-root-relative and absolute file paths and whitespace
trimming. Missing, unreadable, or blank selected files are errors.
Woodpecker stores the CI token persistently and injects it into each delivery
job. Maintain an explicitly commented mapping such as:
```yaml
# Woodpecker supplies this variable inside the CI delivery job.
# Workstation environment setup is unnecessary.
environment:
RELEASEKIT_DELIVERY_TOKEN:
from_secret: GITEA_RELEASE_TOKEN
```
Here `GITEA_RELEASE_TOKEN` names a Woodpecker stored secret;
`RELEASEKIT_DELIVERY_TOKEN` names the variable available to ReleaseKit inside
that job. An unset or blank selected CI variable is an error. Consumers can
reference an existing suitable secret. The local token file stays on the
workstation; CI uses its stored secret. ReleaseKit owns the
maintained workflow integration. Secret-registration automation is outside
this work.
Keep loading in the CLI and pass the resolved token explicitly through
`DeliveryDestination`. The library remains independent of ambient credentials.
Errors identify the execution context and selected source without including
secret contents. The existing `forbidden_files` check remains available to
exclude the local token path from committed candidates; explain its use
alongside Git ignore rules.
Update local examples, CI templates, adoption guidance, and the maintainer
runbook together. Explain the migration from today's `delivery.token_file`,
`delivery.token_env`, and environment-over-file precedence to context-specific
selection. Use the terms “local token file,” “Woodpecker stored secret,” and
“CI delivery job environment variable” consistently. A shared profile carries
both declarations; consumers maintain their paths and secret references.
## 2. Add configuration and input readiness validation
Provide an optional setup-readiness diagnostic, provisionally named
`releasekit validate`. It loads the selected profile, checks required inputs,
and verifies read-only remote access by default. This gives developers useful
configuration and credential evidence before preparing a final release
candidate. An explicit `--offline` option limits the run to offline checks.
### Operation and context selection
Default to the operations configured in the selected profile, with an explicit
operation selector for narrower investigations. Define and document the mapping
from profile declarations to operations. List the selected operations before
their results. Each operation checks its own requirements: source publication
uses native Git authentication, and hosted delivery checks hosted credentials.
Page-only delivery needs no binary-build inputs.
Default to local execution context and provide explicit CI context selection.
The maintained Woodpecker workflow supplies the CI selection when invoking
validation inside the job. Reuse delivery's context-specific credential
resolver: local delivery reads its token file directly; CI delivery reads the
variable injected into the running job. Keep execution context independent
of network use. Both contexts support online verification and offline checks.
A workstation invocation can inspect CI declarations and configured Woodpecker
access. Verification of actual CI secret injection takes place inside the job
or through the rehearsal. Report that evidence as unverified when unavailable.
### Readiness scope
- Reuse profile parsing and operation-specific validation for module selection,
build settings, delivery destination, and publication endpoint expectations.
- Check the selected local token file for availability, readability, and
nonblank content, or check the selected CI variable inside the job. Identify
the source and context without exposing secret contents.
- Validate relevant source and build inputs at setup time. Permit outputs that
the configured build will generate to be absent. When callers explicitly
supply existing artifacts for delivery, validate those inputs too.
- Use native Git and SSH configuration for Git authentication. Support
SSH agents, hardware-backed keys, custom commands, and HTTPS credentials.
Check an explicitly selected key file when applicable; describe other
authentication evidence by the operation actually exercised.
- Perform read-only remote verification by default, reusing hosted preflight
and native Git reads. Successful reads establish authentication and access
evidence for those requests. The rehearsal supplies write and workflow
execution evidence.
- Allow validation before a version-matched release note or final candidate
exists. Keep it independent of the candidate test suite and artifact builds.
It performs no publication, remote writes, or candidate checkout changes.
### Reporting and completion
Collect independent failures in one run and mark dependent checks as skipped
when their prerequisites fail. Distinguish malformed configuration, unavailable
required inputs, rejected credentials, and remote verification failures.
Identify the selected operations, context, credential source, destinations,
checks completed, and evidence still missing.
Return an unsuccessful result when a selected check fails or cannot complete.
An explicitly offline run can succeed within its declared scope; mark remote
access as unchecked. Distinguish checks omitted by scope from selected checks
that could not complete, so partial verification remains visible.
Share validation and credential resolution with execution paths. Actual
operations continue checking their requirements when run. Validation remains
an optional convenience with no required pre-release invocation. Exact command
syntax, profile-to-operation mapping, and report representation remain design
details to finalize.
## 3. Rehearse the end-to-end Woodpecker delivery workflow
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.
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.
### Rehearsal flow
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.
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.
### Credentials and execution contexts
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 application and Go module release identities
Separate release purpose from version format. Preserve today's Go module
release behavior for profiles that omit the new selection. Application
releases can use SemVer or the selected calendar formats.
### Release purpose and Go distribution
A Go module release retains semantic version validation, module-path major
compatibility, and Go-specific tag derivation. These constraints also matter
for executables distributed through versioned Go installation commands.
For example, `v2026.12.3` denotes major version 2026, while `2026-12-05` is
not a canonical Go module release version. See the
[Go versions reference](https://go.dev/ref/mod#versions) and
[major-version suffix rules](https://go.dev/ref/mod#major-version-suffixes).
An application release uses an application identifier while retaining a selected
Go module for builds and validation when releasing a Go application. Its
application tag makes no claim to publish a Go module version. One source
revision can have separate, explicitly identified application and Go module
releases. Coordinated publication of both identities requires a separate
consumer need.
Support for repositories without Go modules remains an open scope decision.
The Go application model described here establishes the agreed module-backed
behavior; further discussion will determine the additional source, validation,
build, and tool-selection conventions needed for other repositories.
### Version formats and selection
Provide named, documented formats with these conventions:
| Format | First release | Subsequent release in the period |
| --- | --- | --- |
| Full date | `2026-12-05` | `2026-12-05.1` |
| Year/month with revision | `2026.12.0` | `2026.12.1` |
Define valid dates, padding, and numeric revision rules precisely. Treat an
optional leading `v` as a profile-level convention so spelling stays consistent.
CalVer encompasses multiple conventions; ReleaseKit's documentation owns the
exact supported grammars. See [CalVer's scheme guidance](https://calver.org/#scheme).
Callers supply the identifier. ReleaseKit validates its format and checks the
intended tag's availability. The selected date follows the consumer's release
convention and need not equal the machine's current date. Preserve the selected
identifier throughout an attempt and its recovery. Automatic date selection,
incrementing, ordering, configurable layouts, and custom public strategy
interfaces require separate justification.
### Application tags and module scope
Retain module-scoped builds and validation for Go applications. Default the
application tag prefix to the selected module's repository-relative directory,
with an explicit override for product naming:
| Selection | Application tag |
| --- | --- |
| Repository-root module | `2026-12-05` |
| Module in `apps/editor` | `apps/editor/2026-12-05` |
| Explicit product prefix `editor` | `editor/2026-12-05` |
Application tag derivation uses the selected physical directory by default,
including a physical `/vN` directory when present. Go module releases retain
Go's major-version directory and tag-prefix rules. The application version
does not determine the selected module's import-path major version.
Resolve release purpose, version format, selected identifier, module selection,
and complete tag identity once. Carry that identity through CLI and API
validation, builds, publication, hosted delivery, and recovery. Preserve the
identifier in notes, injected runtime versions, artifact names, receipts, and
saved evidence. Validate complete refs with Git's rules and review consumers
of the identity for filename and numeric-triple assumptions.
### Implementation and adoption
Extend identity handling across all supported operations, including the
Woodpecker rehearsal, CI tag dispatch, selected-tool bootstrap, note matching,
and stored evidence. Keep existing SemVer integrations simple and document
migration where public or stored contracts change. Record the release-purpose
and module-identity decision in an ADR; finalize exact format grammars and
configuration fields through the implementation design.
ReleaseKit's own release policy continues to select SemVer. Consumer support
for application formats leaves that policy unchanged.
## Work outline and regression coverage
1. Settle the open decisions and describe the selected CLI, configuration, and
identity contracts. Keep unchanged SemVer integrations simple.
2. Consolidate credential selection and operation-specific validation. Implement
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 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.
5. Update canonical references, maintained examples, adoption guidance, and next
release notes. Review the assembled implementation and run appropriate
offline checks, including compiled facade and dependency-boundary checks.
Regression coverage should address local file loading with workstation token
variables absent or set to conflicting values; CI variable loading with the
local file absent; context-specific missing-input errors; and shared resolution
across delivery, readiness, and exercises. Verify that diagnostics identify
context and evidence limits without exposing token contents. Cover default
online verification and explicit offline scope in each context, profile-driven
operation selection and narrowing, setup checks before generated outputs exist,
and validation of explicitly supplied artifacts. Verify aggregation of
independent failures, skipped dependent checks, and unsuccessful outcomes for
selected checks that cannot complete. Cover agent-based Git authentication;
diagnostic collisions, partial creation, lost acknowledgments, cancellation,
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, revision and leading-prefix conventions, application
versus module tag derivation, physical major-version directories, and explicit
application prefix overrides. Verify identity consistency across operations
and stored formats, including the rehearsal. 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
### Credential schema and migration
Explicit local and CI selection is decided in item 1. Finalize the field names,
diagnostic context-selection syntax, and migration handling for existing flat
credential fields. Keep the common local-file and CI-secret workflow in one
profile and provide actionable migration diagnostics. The illustrated
`RELEASEKIT_DELIVERY_TOKEN` name requires coordinated workflow and profile
updates if adopted.
### Readiness interface and operation mapping
Item 2 settles online verification by default with an offline option, selection
of profile-configured operations with explicit narrowing, local context by
default with explicit CI selection, setup-readiness scope, and reporting
behavior. Finalize command syntax, the profile-to-operation mapping, handling
of explicitly supplied artifacts, report representation, and exit-code mapping.
Keep the selected defaults and evidence boundaries consistent across these
interfaces.
### Rehearsal interface and recovery
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.
### Versioning interfaces and repositories without Go modules
Item 4 settles the release-purpose distinction, supported calendar formats,
caller-supplied identifiers, and application tag-prefix defaults and overrides.
Finalize configuration fields and exact format grammars, including padding
and numeric revision rules, while preserving those selected conventions.
Support for repositories without Go modules remains undecided. Discuss whether
this release includes source-only or externally built non-Go applications and,
if so, their source selection, validation, build ownership, and ReleaseKit tool
bootstrap. Keeping this release focused on Go applications and modules remains
an alternative for discussion, rather than an adopted scope limit.