Skip to content

Lock in release-notes configuration and bundle behaviour with snapshots - #4877

Merged
Mpdreamz merged 2 commits into
mainfrom
snap/release-notes
Nov 17, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
snap/release-notes

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

Adds snapshot tests that record how changelog.yml loading, bundle loading, amend merging, entry validation and lifecycle inference behave today, so the domain-model refactor in #4530 can show it changes nothing.

Affects: Release notes, Configuration

Prompt summary: Add behaviour-locking snapshot tests for release-notes configuration and bundles ahead of #4530. Product code stays untouched.

Why

The refactor in #4530 must not change behaviour, but the loaders and mergers have few tests that pin their full output. Long Should() chains cover a few properties each.

What

changelog.yml loading

85 snapshots, one per YAML shape (pivot, products, rules, bundle profiles, filename strategies, lenient lists, unknown keys, wrong types, empty file, the shipped example). Each records the whole loaded model (dumped by reflection, so a new property appears automatically), the diagnostics in order, and any exception. The existing tests stay.

Bundle loading and amend merging

26 snapshots run each file set through folder loading, content loading and merge-by-target. They cover same-target bundles in both path orders, amends out of order, repeated and re-added, notes sidecars, description patches, and invalid entries.

Validator and inference tables

Text snapshots for ChangelogEntryValidator (37 cases in 5 contexts, plus filename parsing) and VersionLifecycleInference.

Out of scope: Some recorded behaviours look unintended, for example a config error that still returns a configuration and a few odd lifecycle inferences. They are recorded, not fixed.

Verify

mise run test
mise run lint
mise run snap:orphans

Each new class failed when the product code it covers was changed on purpose, then passed again after the revert. The fixtures use synthetic names only.

Adds 85 changelog.yml loading snapshots, 26 bundle loading and amend merge
snapshots, and tables for entry validation and lifecycle inference. They
record what the code does today, ahead of the domain-model refactor in #4530.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner November 16, 2026 20:54
@Mpdreamz Mpdreamz added the chore label Nov 16, 2026
@Mpdreamz
Mpdreamz requested a review from reakaleek November 16, 2026 20:54
@github-actions

Copy link
Copy Markdown
Contributor

On Windows the mock file system reports bundle paths with a drive and
backslashes, and the raw string fixtures carry CRLF, which moves the
character offsets in YAML error messages.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz merged commit aca3c44 into main Nov 17, 2026
62 of 63 checks passed
@Mpdreamz
Mpdreamz deleted the snap/release-notes branch November 17, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant