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

21 KiB

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 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, 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 and delivery guidance.
  • PreflightDelivery verifies authenticated repository access through read-only requests. Deliver runs it automatically. It cannot establish that every subsequent write will succeed. ADR 0006 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.
  • 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 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:

{
  "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:

# 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

Consider releasekit validate as a diagnostic command that loads the selected profile, validates its semantics, and checks inputs needed for the selected operations. It should distinguish malformed configuration, unavailable local inputs, and remote verification failures. Its report should identify both what was checked and the limits of that evidence.

Use the same explicit local or CI context and credential resolver as delivery. Default workstation diagnostics to local context and provide an explicit CI context selection for invocation inside the delivery job. Keep execution context separate from network use: local-context validation can contact the forge, and CI-context validation can perform offline checks.

Recommended scope:

  • Reuse profile parsing and operation-specific validation for module selection, build settings, delivery destination, and publication endpoint expectations.
  • For local delivery, check the selected file's availability, readability, and nonblank content. For CI delivery, check the named variable in the running job's environment. Credential requirements apply to the selected operation and context; source publication retains its independent Git authentication.
  • Report the context, selected credential source, destination, and checks completed, with secret values omitted. A workstation check can inspect a CI declaration, but verification of injected credentials requires execution inside the CI job. Mark that evidence as unverified when it is unavailable.
  • Check declared inputs for the requested preparation stage. Configuration readiness can precede generated artifacts; delivery using existing artifacts checks their availability. Report missing required inputs as errors.
  • Use native Git and SSH configuration for Git authentication. SSH agents, hardware-backed keys, custom commands, and HTTPS credentials are viable inputs; the existence of a conventional private-key file is not universal evidence of readiness. Check an explicitly selected key file when applicable and describe other authentication checks in terms of the operation actually exercised.
  • Separate local checks from optional network verification. Online verification can reuse hosted preflight and native Git reads. A successful read establishes read access; write access requires the live exercise described below.
  • Keep this command independent of the candidate test suite. It can run while preparing a release, before a version-matched note or final candidate exists. It performs no publication, remote writes, or candidate checkout changes.

Share validation and credential resolution with execution paths so diagnostics do not become a second implementation. Actual operations continue checking their requirements when run. validate is an optional convenience and adds no required pre-release invocation. Exact operation selection and network defaults remain open below.

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 additional versioning schemes

Introduce an explicit versioning choice while retaining today's SemVer behavior for profiles that omit it. Support calendar/date-based release identifiers and leave room for additional concrete schemes. Define DateVer's exact grammar locally rather than assuming the name specifies one universal format. CalVer itself describes multiple calendar-based conventions. See CalVer's scheme guidance.

Resolve the selected version and complete release identity once, then pass that identity through validation, builds, publication, delivery, and recovery. Keep format validation and tag derivation consistent across CLI and API entry points. Preserve the selected identifier in notes, hosted pages, injected runtime versions, artifact names, receipts, and recovery records. Check those consumers for assumptions about numeric triples, slashes, and filename-safe characters. Validate complete Git refs with Git's rules.

Go distribution introduces a separate constraint. Go module releases use semantic version tags and enforce major-version suffix rules. For example, v2026.12.3 has major 2026 and is incompatible with an ordinary unsuffixed module path; 2026-12-03 is not a canonical Go module release version. Supporting these as application release labels requires an explicit identity design. See the Go versions reference and major-version suffix rules.

Evaluate a distinct application release identity that can select a Go module for builds and tests without claiming its application tag is a Go module release. Inventory the impact on module-directory tag prefixes, physical /vN directories, CI tag dispatch, selected-tool bootstrap, note matching, receipts, and saved publication evidence. Keep existing Go module publication constraints for consumers publishing importable module versions.

Recommend validating caller-supplied identifiers first. Calendar support needs explicit padding, valid-date, optional prefix, and same-day revision rules. Automatic date selection, version incrementing, ordering, and custom public strategy interfaces require separate justification. ReleaseKit's own release policy continues to select SemVer; consumer support for other schemes does not change that policy.

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 offline versus online validation in each context and 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 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

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 selection and network use

Recommendation: Default validate to offline checks for the operations declared by the profile in the selected local or CI context, with explicit operation selection and online verification available. This supports offline preparation and narrower CI contexts. Report unchecked remote access and CI credential injection that has not been verified inside a job.

Alternative: Verify configured remote access by default, with an offline option. This gives stronger immediate readiness evidence but makes a routine configuration check depend on service availability and credentials for every selected remote operation.

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.

Version formats and Go module identity

Recommendation: Preserve Go-module SemVer publication and introduce an explicit application-release mode for non-SemVer tags. Begin with selected, documented calendar/date layouts and caller-supplied identifiers. This supports the requested labels while preserving Go distribution correctness, at the cost of another identity mode. Confirm the required layouts and whether non-Go repositories belong in this release's scope.

Alternative: Keep a single Go-module release identity and support calendar conventions only where their spelling satisfies SemVer and module-path rules. This reduces refactoring but excludes common date labels and can force year-based module-path changes. Supporting a separate application label and Go module version is another viable option, with two identifiers for consumers to maintain and an additional tag-mapping decision.