Skip to content

feat(taggrammar): canonical dependency-free tag grammar spec - #498

Merged
joshua-temple merged 2 commits into
mainfrom
feat/taggrammar-package
Jul 7, 2026
Merged

joshua-temple merged 2 commits into
mainfrom
feat/taggrammar-package

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

The shape of cascade's own release tags (vX.Y.Z, -rc.N, .hotfix.M, -dryrun.N) is duplicated across six Go sinks that must agree by hand. There is no single source of truth, so the parser and the git tag predicate can drift apart. This is the foundation for making the grammar configurable (#434).

Fix

Add a new leaf package internal/taggrammar with zero cascade imports (stdlib only): a Spec describing tag shape, Default() reproducing today's grammar byte-identically, and spec-driven IsVersionTag, Parse, and Format. No existing behavior changes; this is purely additive. Later milestones back internal/version and internal/git with this package so the sinks can no longer diverge.

Verification

  • go build ./... clean
  • go test ./... green (2469 tests, purely additive)
  • go test ./internal/taggrammar/ -race green
  • golangci-lint run ./internal/taggrammar/ clean

Relates to #434.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 4ed0743 into main Jul 7, 2026
20 checks passed
@joshua-temple
joshua-temple deleted the feat/taggrammar-package branch July 7, 2026 02:08
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.

1 participant