9.7 KiB
Package and capability inventory
Public Go contracts are defined in declarations and GoDoc. ReleaseKit supports two Go facades and a command-line interface:
- The root
releasekitpackage is the orchestration facade.Checkvalidates one local candidate,Publishvalidates and publishes its exact annotated source tag,Buildcompiles selected application targets, andDeliverdelivers a tagged note page and any declared assets.PrepareTaggedCheckoutandPrepareBuildDependenciesprovide explicit local CI preparation. buildinfois the small runtime facade.Versionreports the injected application version, the main-module version when available, ordev.cmd/releasekitis the executable interface. Itsversion,check,publish,build,deliver, andci-delivercommands adapt profiles and command output to the supported library operations.
See the CLI contract, configuration reference, candidate check guide, source publication guide, build guide, delivery guide, and runtime version guide for task-oriented use. Go declarations and GoDoc remain the owners of exact exported contracts.
Module and dependencies
The module is gitea.maximumdirect.net/eric/ReleaseKit, with Go language
version 1.25.0. go.mod has no required third-party modules; packages use the
standard library and first-party ReleaseKit packages. go list ./... reports
these implemented packages:
| Package | Responsibility |
|---|---|
releasekit |
Public orchestration facade and consumer-owned request/result types. |
buildinfo |
Public runtime version accessor. |
cmd/releasekit |
Executable entry point, command routing, output, and exit status. |
cmd/releasekit/internal/cli |
Command parsing, strict JSON profile loading, configured checks, and private build receipts. |
internal/apicheck |
Compiled-export and import-boundary checks run during development. |
internal/artifact |
Shared build-target normalization, artifact declarations, filename rules, and checksum-manifest naming. |
internal/build |
Candidate-build coordination, selected Go target compilation, version injection, native smoke check, and artifact digests. |
internal/candidate |
Stable-version, note, repository-state, candidate capture, and post-validation checks. |
internal/delivery |
Tagged-source and release-note checks, managed builds in disposable storage outside the checkout, prebuilt artifact validation, manifest assembly, and hosted delivery coordination. |
internal/git |
Git command boundary, committed-tree and blob reads, push-destination resolution, exact ref inspection, tagged checkout preparation, and tag operations, including captured-endpoint verification during recovery. |
internal/gitea |
Gitea API transport, hosted release pages, asset inspection, manifests, and uploads. |
internal/gotool |
Effective Go configuration discovery, shared native-validation and static-build environments, and network-capable dependency preparation; see Go command environments. |
internal/tempdir |
Disposable system temporary storage outside source worktrees. |
internal/process |
Cancellable child-process execution with per-command environment overlays and removals. |
internal/preparation |
Coordination for expected-commit tag checkout and Go module dependency preparation. |
internal/validation |
Shared default Go validation, structured check failures, and lazy committed-file access for captured candidates; internal/candidate retains capture, callback sequencing, and local-state rechecks. |
internal/publish |
Publication guards, one validation run, annotated tag creation, push, and recovery state. |
internal/runtimeinfo |
Private version lookup used by the runtime facade. |
internal/versioncontract |
Shared stable-version rules and linker-symbol identity. |
The buildinfo facade depends only on its small runtime implementation. The
root facade forwards to internal implementation packages. The CLI adapter is
owned under cmd/releasekit/internal; implementation packages do not import
either public facade. internal/apicheck verifies exported type ownership and
dependency direction with go run ./internal/apicheck. These constraints are
also recorded in ADR 0001 and the
architecture policy.
Candidate checking captures and validates one clean committed source revision
in internal/candidate. Its validation bridge calls internal/validation for
the default offline Go suite, then runs product-specific checks once. The
candidate package owns post-validation builds and local-state rechecks;
publication owns endpoint guards, tag creation, push, and recovery around that
same candidate validation path. internal/validation.CandidateTree reads
committed blobs lazily and resolves local destinations from committed entries;
it does not consult neighboring files or traverse submodule checkouts.
Capability owners and behavioral evidence
The following tests are representative evidence from the current offline suite, not a separate release matrix:
| Capability | Implementation owner | Existing evidence |
|---|---|---|
| Runtime version lookup and injected application version | buildinfo, internal/runtimeinfo, internal/versioncontract, internal/build |
TestVersionInConsumerExecutable, TestVersion |
| Candidate capture, shared validation, public diagnostics, additional checks, and rechecks | releasekit.Check, releasekit.Publish, internal/candidate, internal/validation, cmd/releasekit/internal/cli |
TestCheckCapturesCandidateAndCallsAdditionalChecksOnce, TestCheckReturnsPublicValidationError, TestPublishPushesOnlyTheCapturedAnnotatedTag, TestPublishFailedStandardSuiteSkipsAdditionalChecksAndTagCreation, TestPublishAdditionalCheckFailurePreservesCauseAndPreventsTagCreation, TestCheckCommandBindsConfiguredChecksToCapturedCandidate, TestPublishCommandPublishesConfiguredCandidate |
| Shared Go settings for validation and builds | internal/gotool, internal/process, internal/candidate, internal/build |
TestDefaultValidationDoesNotInheritGOFLAGSRunFilter, TestNativeAndStaticCommandsUseOwnedBaseline, TestPersistentSettingsPreserveCachesAndNativeCTools, TestBuildIgnoresAmbientAndPersistentArchitectureTuning |
| Authoritative endpoint and exact annotated tag publication | releasekit.Publish, internal/publish, internal/git |
TestPublishPushesOnlyTheCapturedAnnotatedTag, TestResolveUsesPushURLAndQueriesWithoutMutation |
| Publication partial and uncertain recovery | internal/publish, internal/git |
TestPublishRejectedPushKeepsLocalTagAndReportsNotPublished, TestPublishLostAcknowledgmentConfirmsExactRemoteObject, TestPublishLostAcknowledgmentWithChangedEndpointRemainsUnknown, TestPublishUnavailableReconciliationRemainsUnknownAndPreservesPushError |
| Cross-builds, version smoke checks, empty target sets, and partial outputs | releasekit.Build, internal/build, buildinfo |
TestBuildCreatesSelectedTargetsAndInjectsVersion, TestBuildWithNoTargetsDoesNotInvokeCompiler, TestBuildReturnsPartialArtifactsAfterTargetFailure |
| Page-only and managed or prebuilt binary delivery | releasekit.Deliver, internal/delivery, internal/gitea, CLI |
TestDeliverPageOnlySkipsBuildAndHostedAssets, TestDeliverManagedBuildUploadsArtifactsAndCleansTemporaryOutput, TestDeliverBinaryConsumerWithBuildinfoAndSelectedTargets, TestDeliverPrebuiltArtifactsRemainCallerOwned, TestDeliverManagedBuildFailureCleansTemporaryOutputBeforeHostedWrites, TestDeliverManagedBuildCancellationCleansTemporaryOutput, TestDeliverBuildsTaggedArtifactsAndReusesAssets, TestDeliverRejectsTamperedAssetsAndStaleReceiptBeforeRemoteWrites |
| Tagged checkout and build dependency preparation | releasekit.PrepareTaggedCheckout, releasekit.PrepareBuildDependencies, internal/preparation, internal/git, internal/gotool |
TestPrepareTaggedCheckoutFetchesExpectedCommitAndDetaches, TestPrepareTaggedCheckoutRejectsWrongCommitBeforeCheckout, TestPrepareTaggedCheckoutReportsLocalCheckoutConflict, TestPrepareTaggedCheckoutReportsConflictingLocalTag, TestPrepareBuildDependenciesPreservesPreparationEnvironment, TestPrepareBuildDependenciesPropagatesCommandFailure, TestPrepareBuildDependenciesPropagatesCancellation |
| Page, manifest, asset comparison, and additive retry outcomes | internal/gitea |
TestEnsureReleaseCreatesMissingPageFromCommittedNote, TestInspectAssetsDetectsSameNameAndSizeWithDifferentBytes, TestUploadMissingPartialFailureThenRerunOnlyMissingAssets |
| CLI profiles and prepared Woodpecker sequences | cmd/releasekit, cmd/releasekit/internal/cli, examples/woodpecker/ |
TestLoadSettingsRejectsInvalidProfiles, TestWoodpeckerTagDeliveryTemplate, TestReleaseKitSourceDeliveryWorkflowFromTaggedCheckout |
Run the complete suite with go test ./.... The public API and import boundary
check is go run ./internal/apicheck. Local HTTP and Git fixtures exercise
publication and delivery without real credentials or a hosted service.
Integration references
The Gitea integration guide owns the HTTP contract and hosted response handling. The Woodpecker examples are prepared integrations; their YAML is not active in this repository, and no live Woodpecker runner, configured secret, or hosted delivery has been used. A read-only PromptKit and Narratio migration review and projected deletion estimates are recorded in the product roadmap; actual consumer migrations and measurement of realized savings remain future adoption work.