Skip to content

feat: add DEVKIT_LICENSE and fold the changelog into the release group - #1655

Merged
c-vigo merged 5 commits into
devfrom
feature/1651-license-changelog-optout
Sep 21, 2026
Merged

c-vigo merged 5 commits into
devfrom
feature/1651-license-changelog-optout

Conversation

@c-vigo

@c-vigo c-vigo commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

install.sh --force adds two files a consumer lacks, and neither is a neutral default for a private, release-less repo:

  • LICENSE — the Apache-2.0 template. On a proprietary repo that actively mislabels confidential material as openly licensed, with no way to ship an all-rights-reserved notice instead.
  • CHANGELOG.md — release machinery. Only the release workflows read it, so a repo with DEVKIT_FEATURES_DISABLED=release never writes one.

Both are add-if-absent PRESERVE_FILES, so deleting them was not durable: the next forced scaffold put them back, and the deletion had to be repeated at every upgrade.

Closes #1651.

Type of Change

  • feat -- New feature

Changes Made

The changelog follows the release feature group (no new knob). Within the template tree the root CHANGELOG.md is referenced only by release-group workflows (prepare-release, prepare-hotfix, release-core, release-publish, sync-main-to-dev) — nothing in ci.yml or the hook stack touches it. A separate changelog group would have invented an invalid combination (release enabled + changelog disabled breaks prepare-release's freeze step) and the contradiction guard to police it. So:

  • CHANGELOG.md joins feature_paths release — the copy-exclude is root-anchored, so devkit's own .devcontainer/CHANGELOG.md mirror is untouched;
  • an existing changelog is preserved-class: left in place with a notice, never pruned — it is the repo's own history;
  • the scaffolded skeleton no longer ships a templated ## Unreleased entry pointing at an upstream devkit issue.

The license gets its own key, because the choice is a text, not an on/off — DEVKIT_LICENSE:

Value Effect
apache-2.0 Default (empty resolves here); byte-for-byte today's behavior.
proprietary Renders assets/licenses/PROPRIETARY (a new file outside the scaffold tree, so the copy can never blind-ship it), {{ORG_NAME}} resolved by the normal substitution pass. Written only when LICENSE is absent or is still the untouched Apache scaffold copy — the repair path for a repo that already received Apache. A hand-edited file is left in place with a notice; a re-render is a silent no-op.
none Devkit manages no LICENSE at all: never added, so a one-time delete sticks.

Neither non-default value ever deletes a license file — removing one stays the consumer's own act, like the changelog. An unknown value aborts loudly (mirrors the DEVKIT_REFS_POLICY guard) and the key round-trips across --force upgrades like every other manifest knob. --preview names the selection, since LICENSE is then absent from the ADDED report.

Not reused: DEVKIT_UPGRADE_EXCLUDE (the issue's option 3). It resets paths with git checkout -- after the scaffold, which cannot remove a newly re-added untracked file.

Docs: docs/MIGRATION.md (knob table row, the release group bullet, and a new "A private consumer: license and changelog" section) and docs/SOLO_ADOPTION.md (a solo repo is often a private one).

Changelog Entry

### Added

- **`DEVKIT_LICENSE`: choose the license the scaffold ships**
  ([#1651](https://github.com/vig-os/devkit/issues/1651))

### Changed

- **The `release` feature group now covers the root `CHANGELOG.md`**
  ([#1651](https://github.com/vig-os/devkit/issues/1651))

(full entries with sub-bullets are in CHANGELOG.md under ## Unreleased)

Testing

  • Tests pass locally (just test)

tests/bats/init-workspace.bats (13 new, all green):

  • a release-disabled fresh scaffold ships no root CHANGELOG.md while .devcontainer/CHANGELOG.md stays;
  • a deleted changelog stays deleted across an upgrade; an existing one survives with the preserved notice;
  • the default DEVKIT_LICENSE still scaffolds Apache-2.0 with {{ORG_NAME}} resolved;
  • none: absent on a fresh scaffold, a delete sticks, the key round-trips, and an existing LICENSE is never deleted;
  • proprietary: replaces the stock Apache copy, resolves the org placeholder, is quiet and stable on re-upgrade, and leaves a hand-edited LICENSE alone with a notice;
  • proprietary on a fresh scaffold renders straight away (no Apache ever lands) and the result is writable — the scaffold assets are read-only store files in the image;
  • --preview names the selection and the outcome: what will be created, what will be replaced, what is left in place — the copy-exclude keeps LICENSE out of the classified listings, so the report has to say it explicitly.

Plus rows in the three generic knob loops (ships-empty, write-back, invalid-value ⇒ loud abort), DEVKIT_LICENSE in tests/test_vig_os_manifest.py, and the new asset in tests/test_image.py's image-contents list.

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
  • I have updated CHANGELOG.md in the [Unreleased] section
  • My changes generate no new warnings or errors
  • I have added tests that prove my feature works
  • New and existing unit tests pass locally with my changes

Follow-up (not in this PR)

.devcontainer/justfile.gh still ships reset-changelog / changelog-preview to a release-disabled consumer, which now reference a file the scaffold no longer provides. That is a pre-existing question about what the release feature group owns on the just surface (the whole release-dispatch recipe set already ships to repos whose release workflows were pruned) — filed as #1656 rather than scoped in here.

@c-vigo
c-vigo merged commit 452f384 into dev Sep 21, 2026
12 checks passed
@c-vigo
c-vigo deleted the feature/1651-license-changelog-optout branch September 21, 2026 06:53
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