Skip to content

feat(workspace): add branch-types knob (DEVKIT_BRANCH_TYPES) and CI branch-name gate - #1437

Merged
c-vigo merged 3 commits into
devfrom
feature/1432-branch-types-knob
Aug 12, 2026
Merged

c-vigo merged 3 commits into
devfrom
feature/1432-branch-types-knob

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Two halves, one SSoT (#1432, folding in #1430's enforcement gap per #1430 (comment)):

  1. DEVKIT_BRANCH_TYPES knob — comma-separated full replacement of the issue-numbered branch-type set (<type>/<issue>-<slug>) in the no-commit-to-branch guard; the chore/, renovate/ ([FEATURE] feat(hooks): allow renovate/* branches in the default no-commit-to-branch guard #1433), and worktree/ clauses stay fixed. Rendered into all three surfaces from one key: the scaffolded YAML (anchored BRE sed), the flake consumer surface (branchNamePatternFor gains a types parameter; mkProjectShell gains branchTypes ? null with a loud eval-time charset assert; the template flake.nix reads the key from .vig-os and forwards it under a functionArgs guard — pre-[FEATURE] feat(workspace): scaffold-time branch-types knob (DEVKIT_BRANCH_TYPES) for the branch guard + mkProjectShell branchTypes #1432 consumer flakes hand-port the block, documented in MIGRATION.md), and CI (below). Defaults are byte-identical everywhere (drift gate + zero-hooks parity).
  2. CI branch-name gate (A fresh clone does not enforce devkit's own commit rules until scripts/init.sh runs #1430) — a commit-checks step validating the env-routed PR head ref against the same resolved type set (new branch-types resolve-toolchain output, fail-safe to stock on bad values). The allowed set is a commented superset of the local guard's: main|dev, chore/<slug> (also covers sync-main-to-dev + devkit-upgrade bot branches), <type>/<issue>-<slug>, worktree/<n>, renovate/*, release/X.Y.Z. The same step lands in devkit's own bespoke ci.yml with the stock set inline — the repo that defines the standard now enforces it on itself (the A fresh clone does not enforce devkit's own commit rules until scripts/init.sh runs #1430 incident: feat/rust-language-pack from an un-initialised clone is now caught at PR time).

The trunk workflow special-case in the consumer render generalizes to one effectivePattern != branchNamePattern comparison — workflow (#1224) and branch types feed a single computation.

Companion (cross-repo, pre-train prerequisite)

The allowance inventory surfaced that devkit-smoke-test's deploy PRs ride chore/deploy-<tag> with dotted tags (chore/deploy-1.7.1-rc1), which the gate rejects. Fixed at the source per the established dot-free lane-branch convention: vig-os/devkit-smoke-test PR (linked in a comment below) must merge to smoke-test main (the dispatch listener runs from the default branch) before the 1.7.1 train's smoke stage.

Test evidence

  • TDD RED: 24 test_ci_runner.py failures (KeyError: 'branch-types', missing step), flake fixture unexpected argument 'branchTypes', 4 bats failures — all for the right reasons before the implementation commit
  • GREEN: test_ci_runner.py 50 passed; test_flake_hooks.py 45 passed (incl. drift gate + default-parity + eval-rejection tests); bats 6/6; full pytest: 1290 passed (2 failures proven pre-existing on clean dev: stale local image + container gh-auth); just precommit fully green
  • Gate acceptance pinned in tests: release/1.7.1, renovate/lock-file-maintenance, chore/foo-bar, feature/12-x, worktree/9, record/54-x (custom types) accepted; feat/rust-language-pack (the A fresh clone does not enforce devkit's own commit rules until scripts/init.sh runs #1430 literal) and random-branch rejected

Refs: #1432

@c-vigo
c-vigo merged commit 706c2e6 into dev Aug 12, 2026
14 checks passed
@c-vigo
c-vigo deleted the feature/1432-branch-types-knob branch August 12, 2026 07:07
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