Skip to content

feat(workspace): fold the release just recipes into the release feature group - #1664

Merged
c-vigo merged 2 commits into
devfrom
feature/1656-release-group-just-recipes
Sep 21, 2026
Merged

c-vigo merged 2 commits into
devfrom
feature/1656-release-group-just-recipes

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

Summary

DEVKIT_FEATURES_DISABLED=release now takes the release just recipes with it.

Since #1651 the root CHANGELOG.md follows the release feature group, so
just reset-changelog in a release-disabled consumer failed on a missing
file rather than a missing workflow. The rest of the set was already dead in
kind: prepare-release, prepare-hotfix, finalize-release,
promote-release, publish-candidate, abandon-release and
changelog-preview all dispatch workflows the same group copy-excludes, so they
could only fail at dispatch time.

Decision: option (a) — the recipes follow the feature group

The issue offered (a) prune the recipes with the group, or (b) make each recipe
fail fast with a "release feature disabled" message. I took (a), in its
rendered/pruned justfile.gh section form rather than as a new managed file.

Why, judged against how the machinery in assets/init-workspace.sh actually
works:

  • DISABLED_FEATURES is the SSoT, and it lives at scaffold time. Every
    existing consumer of the knob (feature_paths copy-excludes/prunes,
    render_actionlint_optout, the sync-issues contradiction notice) resolves it
    once in init-workspace.sh and bakes the result into the tree. Option (b)
    would teach eight recipe bodies in a managed file to re-parse .vig-os at
    runtime — the same knowledge copied into the scaffold output, in a second
    language, in a file the consumer must never edit. That is the DRY/SSoT
    violation the render functions exist to avoid.
  • The precedent for a partial prune of this exact file already exists.
    render_workflow_model drops the prepare-hotfix recipe from
    .devcontainer/justfile.gh under DEVKIT_WORKFLOW=trunk ([FEATURE] Port the hotfix release lane to the workspace scaffold (copy-exclude under trunk) #1625, Trunk render leaves sync-main-to-dev prose mentions in promote-release.yml #1233:
    "no recipe dispatching a workflow the repo does not have"). [FEATURE] Release-disabled consumers keep release-only just recipes that assume a CHANGELOG #1656 is the same
    rule with release as the axis instead of the workflow model.
  • render_actionlint_optout ([FEATURE] Ship actionlint to consumers: the workflow-lint hook plus a managed actionlint.yaml config #1660) is the shape to copy: a
    feature_disabled-guarded, sentinel-bracketed, idempotent block excision for
    the half of a feature group that a path prune cannot reach. Implemented here
    as render_release_optout with the same # >>> devkit:release /
    # <<< devkit:release markers.
  • A whole-file feature_paths entry was not available. justfile.gh also
    carries gh-issues / gh-log / gh-branch, which are not release
    machinery — so the group takes the section, not the file.
  • A separate managed justfile.release was rejected as over-build. It is
    the conceptually cleanest variant (a pure feature_paths entry, like
    worktree's .devcontainer/justfile.worktree) but it changes managed-file
    shape: a new template file, a new import? in the scaffold root justfile, a
    new scripts/manifest.toml entry, a retired-path entry so the recipes do not
    ride along twice through an upgrade, and churn in every consumer's
    .devcontainer/. The issue is effort:small; the sed excision buys the same
    user-visible behaviour for ~35 lines.
  • justfile.gh is MANAGED, unlike the preserved .pre-commit-config.yaml
    the actionlint excision cuts: the template copy is rewritten on every upgrade,
    so the excision is re-applied each run, costs nothing when the feature is on,
    and clearing the key restores the recipes on the next --force.

Net effect: just --list in a release-disabled repo offers only commands the
repo can actually run.

Two implementation details worth review:

  • The sentinels are added to the root justfile.gh (the SSoT); the
    scaffold copy is regenerated by scripts/sync_manifest.py. The <<< marker
    sits after reset-changelog, so the manifest's existing RemoveBlock of the
    devkit-only pull recipe leaves it as the derived file's last line.
  • The block is the file's tail, so the excision also drops the now-trailing
    blank line (sed '${/^$/d}'). Without it the managed file would end on a
    double newline, end-of-file-fixer would rewrite it in the consumer's repo,
    and the next upgrade would put it back — a perpetual one-line diff.

Declined: the gh-templates changelog prose

The issue's secondary question — the changelog references in
.github/pull_request_template.md and the six ISSUE_TEMPLATE/*.yml forms —
is deliberately not addressed here. Reasons:

  1. Those surfaces already degrade gracefully; the just surface did not.
    Every issue form's changelog-category dropdown carries an explicit
    No changelog needed option, and the PR template says in so many words
    "If no changelog update is needed, write 'No changelog needed' and explain
    why." Nothing in the scaffold's CI gates either. They are advisory prose a
    human answers, not a command that exits non-zero — which is exactly the
    distinction the issue itself draws when it grades the question "more weakly".
  2. The fix is not small there. Scrubbing it means removing a structural
    - type: dropdown block (with its id, attributes, options) from six
    GitHub issue-form schemas plus two sites in the PR template — a
    cross-group render (release mutating gh-templates files) whose failure
    mode is shipping an invalid issue form to consumers. Doing only the PR
    template would reproduce the very inconsistency the issue complains about,
    so it is all-or-nothing and well past effort:small.
  3. It is a separate decision about what template prose should say, not about
    what a feature group owns. Happy to file a follow-up if you want it.

Testing

  • tests/bats/init-workspace.bats: four new tests (TDD — the test: commit
    is red on three of them, the fourth is the enabled-path guard).
    • the opt-out drops all eight release recipes;
    • it keeps gh-issues / gh-log / gh-branch, the file still parses under
      real just, and it does not end on a blank line;
    • a default scaffold still ships every release recipe (the sentinels are
      inert when the feature is on);
    • the excision is idempotent across two consecutive --force upgrades.
  • Full local evidence: just lint clean, just precommit (prek, all files)
    green end to end, tests/bats/ green, pytest tests green excluding
    test_image (lagging local :dev image, unrelated to this branch — CI
    covers it).

Refs: #1656

@c-vigo
c-vigo merged commit e6b4d5c into dev Sep 21, 2026
12 checks passed
@c-vigo
c-vigo deleted the feature/1656-release-group-just-recipes branch September 21, 2026 12:12
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