Skip to content

feat(tag): add [tag] mode = bump-only (#17) - #19

Merged
tizz98 merged 4 commits into
mainfrom
claude/issue-17-options-4ecda7
Jul 14, 2026
Merged

feat(tag): add [tag] mode = bump-only (#17)#19
tizz98 merged 4 commits into
mainfrom
claude/issue-17-options-4ecda7

Conversation

@tizz98

@tizz98 tizz98 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a [tag] mode = "full" | "bump-only" config to meta tag, the mechanism that reconciles meta tag with a CI-owns-tag release.yml (issue #17).

  • full (default) is unchanged: bump + commit + create + push the tag.
  • bump-only: bump + commit + push the branch, but do not create or push a tag — a CI workflow (release.yml) creates the tag on merge and builds + publishes. This removes the silent no-op where meta tag pushing its own tag made release.yml's prepare job skip build + publish (which shipped nothing for v0.4.0).

Scope note — this repo's adoption is deferred

This PR ships the feature only (parser + command + tests). It does not switch ai-meta's own .meta/meta.toml to bump-only, because CI runs the pinned ./meta shim (.meta/version = 0.4.0), and that released binary — with deny_unknown_fields — can't parse a [tag] table it predates. A repo's meta.toml can only use fields the pinned release already understands, so dogfooding [tag] has to wait until a release ships this parser and .meta/version is bumped. Tracked in #20 (and the underlying self-hosting-CI gap in #21).

How it works

  • A TagMode enum is resolved onto EffectiveConfig.tag_mode, parsed once in config::load_from_str and threaded through merge (mirroring the ProfileKind precedent). An invalid mode string is a hard load error, not a silent fall back to full — a silent fallback would re-introduce the bug.
  • meta tag derives a pure, unit-tested ReleasePlan { create_tag, push_tag, enforce_branch } from the mode and branches its git orchestration on it. In bump-only: no tag created/pushed, and the "must be on main" branch guard is relaxed (the release PR is cut from a feature branch). Full mode is byte-identical to before.
  • Composes with Implement configurable lifecycle hooks in meta.toml #16 (lifecycle hooks): once Implement configurable lifecycle hooks in meta.toml #16 lands, a post_tag hook can run gh pr create for full automation. No hook logic in this PR.

Test plan

  • cargo test --workspace — config parse (full / bump-only / invalid) + both ReleasePlan selections. (process::tests::which_finds_sh fails on the Windows sandbox only — no sh on PATH; passes on Linux CI.)
  • cargo clippy --all-targets -- -D warnings clean; cargo fmt --all -- --check clean.
  • ./meta check --strict (pinned shim, as CI runs it) — passes.
  • cargo run -- tag patch --dry-run with a local [tag] mode = "bump-only" shows [bump-only] + the bump-only note and no branch refusal off main.

Follow-ups

Addresses #17 (provides the reconciliation mechanism); this repo's adoption tracked in #20.

🤖 Generated with Claude Code

tizz98 added 4 commits July 14, 2026 10:31
Add a TagMode enum resolved onto EffectiveConfig.tag_mode from a new
[tag] table. Default Full (local-owns-tag). Invalid mode is a hard load
error rather than a silent fall-back.
Parse [tag] mode once in load_from_str and pass the typed value into
merge, matching the ProfileKind precedent, so a bad mode can't silently
default to Full. Plus minor polish: bare Result, bare TagMode in tests,
and cover the bump_only alias + case-insensitivity.
Derive a ReleasePlan from the tag mode. In bump-only, skip tag creation
and tag push and relax the branch guard, pushing only the bump commit so
CI owns tagging + publish. Full mode is unchanged.
Full-struct equality so a future ReleasePlan field can't silently go
uncovered by the mode-mapping tests.
@tizz98
tizz98 force-pushed the claude/issue-17-options-4ecda7 branch 2 times, most recently from 3fd0595 to 3e6b300 Compare July 14, 2026 15:29
@tizz98 tizz98 changed the title feat(tag): add [tag] mode = bump-only to reconcile meta tag with release.yml (#17) feat(tag): add [tag] mode = bump-only (#17) Jul 14, 2026
@tizz98
tizz98 merged commit 62c4fe3 into main Jul 14, 2026
4 checks passed
@tizz98
tizz98 deleted the claude/issue-17-options-4ecda7 branch July 14, 2026 15:33
tizz98 added a commit that referenced this pull request Jul 14, 2026
Ships the [tag] mode = full|bump-only feature (#17, PR #19). Version
bump only; release.yml creates the v0.5.0 tag on merge and builds +
publishes.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
tizz98 added a commit that referenced this pull request Jul 14, 2026
Now that v0.5.0 ships the [tag] parser, dogfood it: bump .meta/version +
framework_version to 0.5.0 and set [tag] mode = bump-only so this repo's
meta tag defers tagging to release.yml. Restore the bump-only wording in
docs/releasing.md (reverted out of PR #19 until the parser shipped).

Closes #20.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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