Skip to content

fix(init-workspace): preserve tag-scheme keys across upgrades - #1123

Merged
c-vigo merged 3 commits into
devfrom
bugfix/1116-preserve-tag-scheme-keys
Jul 15, 2026
Merged

c-vigo merged 3 commits into
devfrom
bugfix/1116-preserve-tag-scheme-keys

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

An install.sh --force upgrade reset DEVKIT_TAG_PREFIX and DEVKIT_FLOATING_TAGS in a consumer's .vig-os manifest back to the empty template defaults, silently discarding consumer-set values. Action-publishing consumers set DEVKIT_TAG_PREFIX=v / DEVKIT_FLOATING_TAGS=major,minor; after an upgrade the next release cut bare X.Y.Z tags and stopped moving floating tags — a silent release-integrity regression, observed on the vig-os/commit-action 1.2.0 → 1.2.1 upgrade (vig-os/commit-action#80).

Closes #1116

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • assets/init-workspace.sh: read DEVKIT_TAG_PREFIX / DEVKIT_FLOATING_TAGS from the consumer's .vig-os before the template rsync overwrite (alongside the existing MODE/identity/DEVKIT_MODULES reads) and conditionally write them back in the final persist block, mirroring the DEVKIT_MODULES preservation pattern (feat(flake): modular capability shells — opt-in vigos capability modules (native, geant4, rust, …) on top of mkProjectShell #884). Written back bare, matching the template's unquoted form. Persist-block comment updated.
  • tests/bats/init-workspace.bats: new regression test — scaffold, seed both keys, --force upgrade, assert both survive (the preservation gap had no coverage, which is how this regressed).

Changelog Entry

Fixed

  • Preserve tag-scheme keys across --force upgrades (#1116)
    • init-workspace.sh read back DEVKIT_MODE/identity/DEVKIT_MODULES before the managed-template overwrite of .vig-os, but not DEVKIT_TAG_PREFIX or DEVKIT_FLOATING_TAGS, so an upgrade silently reset a consumer's release tag scheme to the empty template defaults (observed cutting bare tags and stalling floating tags on the commit-action 1.2.0 → 1.2.1 upgrade).
    • Both keys are now read before the overwrite and written back (bare, matching the template's unquoted form) when the consumer set them.

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

  • TDD: the new bats test was committed failing (RED — DEVKIT_TAG_PREFIX reset to empty after upgrade), then the fix turned it GREEN.
  • Full tests/bats/init-workspace.bats: 199 tests, 0 failures, exit 0 (verified twice — implementation run and an independent review run).
  • uv run pytest tests/test_release_tag_prefix.py tests/test_floating_tags.py: 9 passed.
  • prek run --all-files: green.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Part of the commit-action-deployment bug batch (#1116, #1117, #1118, plus #1111/#1112). Merge order: this PR first (priority high), the others rebase on top.

Refs: #1116

c-vigo added 3 commits July 15, 2026 15:28
Read DEVKIT_TAG_PREFIX and DEVKIT_FLOATING_TAGS before the managed-template
overwrite of .vig-os and write them back when set, mirroring the DEVKIT_MODULES
restore. Without this an upgrade reset a consumer's release tag scheme to the
empty template defaults, cutting bare tags and stalling floating tags.

Refs: #1116
@c-vigo c-vigo self-assigned this Jul 15, 2026
@c-vigo
c-vigo merged commit a08e0ab into dev Jul 15, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1116-preserve-tag-scheme-keys branch July 15, 2026 14:05
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