feat: reserve release version-override location pointer#234
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andReleaseConfigalready owns release settings):ReleaseConfig.VersionOverrides *VersionOverridesConfig(version_overrides, omitempty).VersionOverridesConfigwith a single reserveddirpointer (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.components.path: reject absolute or..-bearing dirs, but only when the block is present, so a manifest valid without it is never rejected.releaseConfiggainsversion_overridesreferencing a new closedversionOverridesConfigdef (additionalProperties: false). All three on-disk copies stay byte-identical.Reserved shape only: parse + structural validation, no generator/state/runtime behavior, no
schema_versionbump.Verification
go build ./cmd/... ./internal/...,go test ./...(1512 passed),golangci-lint run ./...(clean).go build ./...+go vet ./...clean.version_overridesyields output byte-equal to the absent case (guarded against a vacuous empty comparison).TestPlan_MatchesGeneratedBytesstays green; the generator and version calculation are untouched.Closes #178