test: stop pinning the release version - #531
Conversation
The manifest moves on every release, so the assertion failed on the first release PR. Check the shape and that package.json agrees instead.
There was a problem hiding this comment.
Looks good, straightforward test change. Reviewed: the loosened assertion in tests/unit/release-config.test.ts now checks manifest version shape via a SemVer regex and confirms package.json still agrees with the manifest, replacing a hardcoded 0.1.0 check that would break on every release bump. The added comment explains the non-obvious rationale rather than restating the code, consistent with CLAUDE.md.
Extended reasoning...
Overview
The diff touches a single unit test file, tests/unit/release-config.test.ts. It renames a test case and replaces a hardcoded expect(manifest['.']).toBe('0.1.0') with a SemVer shape check (/^\d+\.\d+\.\d+$/) plus the existing agreement check between package.json and the manifest.
Security risks
None. This is a test-only change with no production code, no auth/crypto/permissions paths involved, and no external input handling.
Level of scrutiny
Low. The change is small, mechanical, and self-contained — a test assertion loosened to match the actual invariant (semver-shaped, files agree) instead of a specific number that release-please will change on every release. No CODEOWNERS concerns are apparent for a test file, and the PR description's stated verification (test passes on main and with bumped versions locally) matches the visible diff.
Other factors
The regex /^\d+\.\d+\.\d+$/ correctly matches typical semver core versions; it doesn't handle prerelease/build metadata suffixes, but that's consistent with how release-please-manifest.json versions are typically formatted for this repo and not a functional concern. The added comment explains the why (release-please moves the version every release) without restating the what, matching the repo's CLAUDE.md comment guidance. No prior review timeline entries or CHANGES_REQUESTED reviews are present to weigh against approval.
Summary
The release-config unit test asserted the manifest version is exactly 0.1.0, so it fails on every release PR, starting with #530. It now checks the version is SemVer-shaped and that package.json agrees with the manifest, which is the invariant we care about.
Verification
vitest run tests/unit/release-config.test.tspasses on main and with the manifest and package.json bumped to 0.2.0 locally.Unblocks #530. Sponsor: @svalleru.