Skip to content

feat: port the hotfix release lane to the workspace scaffold - #1632

Merged
c-vigo merged 7 commits into
feature/1626-promote-latest-guardfrom
feature/1625-scaffold-hotfix-lane
Sep 14, 2026
Merged

c-vigo merged 7 commits into
feature/1626-promote-latest-guardfrom
feature/1625-scaffold-hotfix-lane

Conversation

@c-vigo

@c-vigo c-vigo commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Description

Phase 2 of #1621: ports the hotfix release lane (#1623) to the workspace scaffold so gitflow consumers get prepare-hotfix.yml and just prepare-hotfix X.Y.Z before they need it — workflow_dispatch only works once the file is on the consumer's default branch, so the lane cannot be adopted and used in the same emergency.

The scaffold copy is written in the scaffold dialect: every job runs on the mode-aware devkit toolchain (resolve-toolchain + setup-devkit-toolchain, no uv run), the latest-tag lookup and the collision check honour DEVKIT_TAG_PREFIX, every checkout sets persist-credentials: false, and prepare-release-extension.yml stays the only project-specific seam. The lane is gitflow-only: copy-excluded under DEVKIT_WORKFLOW=trunk and pruned on a gitflow → trunk upgrade, the same mechanism as sync-main-to-dev.yml — the two now share one TRUNK_EXCLUDED_WORKFLOWS list in init-workspace.sh instead of a sixth special case.

The scaffold release-core.yml validate job switched from grepping for the bare ## [X.Y.Z] - TBD heading to prepare-changelog validate --version, so a seeded-but-unfilled hotfix section cannot ship downstream (the --version flag ships in the same devkit release, so the toolchain contract holds).

Stacked on #1631 (#1626), which is stacked on #1630 (#1627): all three rewrite the same hotfix runbook paragraphs and workflow validate jobs. Once #1631 merges, this branch gets rebased onto dev so the diff shrinks to the commits listed below.

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/workspace/.github/workflows/prepare-hotfix.yml (new) — the scaffold lane: resolve-toolchain → validate (patch increment of the latest main tag, single-train refusal, empty-Unreleased refusal via prepare-changelog) → prepare (cut from main, seed the ## [X.Y.Z] - TBD section) → extension hook → open-pr (draft, targets main) → rollback (deletes only the release branch). dry_run gates every job but validate.
  • zizmor.yml (root + scaffold) — baseline the managed basename for github-app, secrets-inherit and unpinned-images; artipacked not needed.
  • assets/workspace/.github/renovate-default.json — the new managed basename joins the trailing enabled: false rule (drift gate test_renovate_preset_managed_exclusion).
  • assets/init-workspace.sh — TRUNK_EXCLUDED_WORKFLOWS list + trunk_excluded() replacing the five sync-main-to-dev.yml special cases (preview classifier, upgrade deletions, rsync exclude, post-copy prune, preserved-class carve-out); the hotfix lane joins the release feature group; the prepare-hotfix recipe is stripped from justfile.gh under trunk only.
  • scripts/manifest.toml — drop the RemoveBlock that stripped just prepare-hotfix from the scaffolded justfile.gh; assets/workspace/.devcontainer/justfile.gh regenerated.
  • assets/workspace/.github/workflows/release-core.yml — Verify CHANGELOG has TBD entry now runs prepare-changelog validate --version "$VERSION".
  • Tests — tests/test_workflow_prepare_hotfix.py parametrised over both copies plus scaffold-only pins (toolchain, tag-prefix awareness, release-core.yml content gate, recipe present); tests/test_workflow_model.py pins gitflow-has / trunk-lacks and the upgrade prune; tests/test_workflow_zizmor_baseline.py covers the baseline entries; tests/test_workflow_prepare_extension.py adds the scaffold lane to the callers.
  • Docs — docs/DOWNSTREAM_RELEASE.md (+ mirror) hotfix-lane runbook and trunk carve-out, docs/MIGRATION.md workflow lists and release group, docs/RELEASE_CYCLE.md consumer-scaffold paragraph; CHANGELOG.md (+ mirror), including dropping the "devkit-only for now" note from the feat: add the hotfix release lane cut from main #1623 entry.

Changelog Entry

Added

  • Hotfix release lane in the consumer scaffold
    (#1625)
    • assets/workspace/.github/workflows/prepare-hotfix.yml (Phase 2 of
      #1621): the same lane in the scaffold dialect — every job runs
      on the mode-aware devkit toolchain (resolve-toolchain +
      setup-devkit-toolchain, no uv run), the latest-tag lookup and the
      collision check honour DEVKIT_TAG_PREFIX, and every checkout drops its
      git credential. just prepare-hotfix X.Y.Z now reaches consumers too
    • Gitflow only: copy-excluded under DEVKIT_WORKFLOW=trunk and pruned on a
      gitflow → trunk upgrade exactly like sync-main-to-dev.yml (the two now
      share one TRUNK_EXCLUDED_WORKFLOWS list in init-workspace.sh), with
      the recipe dropped from the trunk justfile.gh; part of the release
      feature group
    • The scaffold release-core.yml now gates on prepare-changelog validate --version (content, not just the ## [X.Y.Z] - TBD heading), so a
      seeded-but-unfilled hotfix section cannot ship downstream
    • zizmor.yml baselines the managed basename for github-app,
      secrets-inherit and unpinned-images only; consumer runbook in
      docs/DOWNSTREAM_RELEASE.md (Hotfix lane)

Testing

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

Manual Testing Details

  • uv run pytest tests/test_workflow_prepare_hotfix.py tests/test_workflow_model.py tests/test_workflow_zizmor_baseline.py tests/test_workflow_prepare_extension.py tests/test_promote_release.py tests/test_promote_latest_guard.py: 148 passed. The new cases were RED before the scaffold file landed (commit 564ebad).
  • Full suite: 1608 passed, 1 skipped. Excluded: 201 errors in test_image.py / test_integration.py / test_install_script.py (no local ghcr.io/vig-os/devcontainer:dev image, environmental) and 4 packages/vig-utils CLI e2e cases that fail only under the Nix devshell's PYTHONPATH (store build shadows the venv; 143 passed with PYTHONPATH unset). The one real red, test_renovate_preset_managed_exclusion, caught the new lane missing from the preset's disabled list — fixed in commit 32cbfa1.
  • just precommit (prek run --all-files): green.
  • zizmor over assets/workspace/.github/workflows/ with the shipped baseline: the only unsuppressed findings are self-repository (an audit newer than the CI-pinned 1.25.2) and they hit every existing managed workflow identically, so the new lane adds nothing against the baseline. CI's pinned run is the authority.
  • Smoke-test rehearsal on devkit-smoke-test (prepare → fix PR → candidate → abandon) is post-merge: it needs a devkit release to ship the asset and devkit-upgrade to adopt it. Tracked on [FEATURE] Port the hotfix release lane to the workspace scaffold (copy-exclude under trunk) #1625.

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 (feat: refuse a regular release train while another release branch exists #1630, feat: refuse a promote that would move :latest backwards #1631 pending)

Additional Notes

Acceptance criteria not closable in this PR: the smoke-test rehearsal (see Testing).

Refs: #1625

@c-vigo
c-vigo merged commit e44e897 into feature/1626-promote-latest-guard Sep 14, 2026
1 check passed
@c-vigo
c-vigo deleted the feature/1625-scaffold-hotfix-lane branch September 14, 2026 14:26
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