Validate and publish source-only candidates

This commit is contained in:
2026-12-05 21:05:56 +00:00
parent 0f9923d230
commit 3b925231d5
18 changed files with 291 additions and 56 deletions

View File

@@ -10,7 +10,11 @@ The current profile fields are:
| Field | Required | Behavior |
| --- | --- | --- |
| `product` | Yes | Product name used by release operations. |
| `module_dir` | No | Repository-relative physical Go module directory with its own `go.mod`; omission selects `.` (the repository root). |
| `module_dir` | No | Repository-relative physical directory; in the legacy model it selects a Go module and defaults to `.`. |
| `source` | No | Explicit source selection with optional `dir` and `tag_prefix`. |
| `go` | No | A non-null object selects Go capability in the explicit model. |
| `publication` | No | Explicit publication `mode`: `source` or `go-module`. |
| `version` | No | Explicit identifier `format` and `prefix`. |
| `remote` | No | Selected Git remote; defaults to `origin`. |
| `expected_push_url` | No | Exact effective push URL required by `publish`; ignored by local `check`. |
| `checks` | No | Ordered additional child commands, each with an argument vector and optional environment map. |
@@ -25,6 +29,22 @@ live either at `integrations/core` or `integrations/core/v2`, while both use the
same full release tag. Root-only profiles can omit `module_dir` and do not need
a module map.
When all four selection objects are absent or null, the legacy selection uses
Go module publication and prefixed stable semantic versions. Any non-null
selection object chooses the explicit model: `source.dir` defaults to `.` or
the supplied `module_dir`, `go` defaults to disabled, and `publication.mode`
defaults to `source`. If both directory fields are supplied they must resolve
to the same physical directory. Go module publication requires `go: {}`.
`version.format` defaults to `semver` and also accepts `date` and `year-month`;
`version.prefix` accepts `v` or an empty string, defaulting to `v` for SemVer
and empty for calendar formats. `source.tag_prefix` overrides the physical
source directory used as the source-tag prefix; an explicit empty string
selects an unprefixed tag. Go module publication requires prefixed SemVer and
rejects tag-prefix overrides that conflict with Go's module tag rules. The Go
facade's `Check` and `Publish` support these
selections; the current CLI version argument is restricted as described in the
[command reference](cli.md).
Each check requires a nonempty `args` array whose first element names the
executable. Arguments are passed directly to the child process; ReleaseKit does
not parse a shell command string. Select a shell explicitly when a check needs
@@ -45,9 +65,11 @@ exist in the candidate, even when no file checks are enabled. Paths are literal,
repository-relative files with no glob semantics and may select a file outside
the chosen module. ReleaseKit deduplicates them with module inputs by path. This
field does not enable any checks or expand Go test, vet, or package-compilation
scope. Automatic file inputs stop at independent nested-module boundaries;
vendored files remain included. Reference inspection can read destinations
elsewhere in the captured repository without adding them to those inputs.
scope. For Go selections, automatic file inputs stop at independent
nested-module boundaries; source-only selections treat nested `go.mod` files
as data. Vendored files remain included. Reference inspection can read
destinations elsewhere in the captured repository without adding them to those
inputs.
`validation.go.race` enables the race detector for the single standard Go test
suite. `validation.go.full_vet` runs a separate native `go vet` pass after that
suite succeeds; ReleaseKit disables test-time vet for that suite to avoid
@@ -59,6 +81,8 @@ This source compatibility check does not name or produce binaries, run a target
executable, or create an artifact manifest. Omitted or empty `compile_targets`
selects no package-compilation pass. When `full_vet` is omitted or false, the
test command keeps its existing vet behavior. These settings are independent.
For source-only selections, Go execution checks and nonempty build targets are
configuration errors; explicitly selected file checks remain available.
`validation.go_format` checks regular committed Go blobs with the Go formatter
used to build ReleaseKit. It uses the selected file inputs, including vendor and
explicit shared files, and ignores