Skip to content

feat: reserve release version-override location pointer#234

Merged
joshua-temple merged 1 commit into
mainfrom
feat/reserve-version-overrides
Jun 21, 2026
Merged

feat: reserve release version-override location pointer#234
joshua-temple merged 1 commit into
mainfrom
feat/reserve-version-overrides

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

cascade derives the next version from conventional commits. Some version intent (forcing a pre-release line, pinning an exact release version) cannot be expressed that way. The manifest had no reserved addressing shape for maintainer-committed override files carrying that intent, so adopting it later would mean a non-additive schema change.

Fix

Enrich release: with a reserved location-pointer sub-field rather than introducing a top-level block (the override location is a release-policy knob, and ReleaseConfig already owns release settings):

  • ReleaseConfig.VersionOverrides *VersionOverridesConfig (version_overrides, omitempty).
  • New VersionOverridesConfig with a single reserved dir pointer (relative, no .. segments). Only the addressing shape is frozen; file format and the fold-into-version-calculation behavior are additive and post-1.0, mapping onto the existing version primitives (bump level and pre-release line) with no parallel enum.
  • Structural validation mirrors components.path: reject absolute or ..-bearing dirs, but only when the block is present, so a manifest valid without it is never rejected.
  • JSON schema regenerated: releaseConfig gains version_overrides referencing a new closed versionOverridesConfig def (additionalProperties: false). All three on-disk copies stay byte-identical.
  • Docs (versioning, configuration) and an e2e scenario added.

Reserved shape only: parse + structural validation, no generator/state/runtime behavior, no schema_version bump.

Verification

  • go build ./cmd/... ./internal/..., go test ./... (1512 passed), golangci-lint run ./... (clean).
  • e2e module: go build ./... + go vet ./... clean.
  • Generator byte-identity test proves a populated version_overrides yields output byte-equal to the absent case (guarded against a vacuous empty comparison). TestPlan_MatchesGeneratedBytes stays green; the generator and version calculation are untouched.
  • Schema drift test confirms the three schema copies match.

Closes #178

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple enabled auto-merge (squash) June 21, 2026 05:15
@joshua-temple joshua-temple merged commit 8e47e4a into main Jun 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: override files for releases conventional commits cannot express

1 participant