Commit 9dc5642
fix(gates): an RC tag would have hijacked the metamodel-version baseline
`check-metamodel-version.mjs` diffs `expected-registry.json` against the last
release tag, chosen with `git tag --list 'v[0-6].*' --sort=-version:refname`.
git's version sort has no notion of a semver pre-release unless
`versionsort.suffix` is configured, and this repo configures none — measured in a
scratch repo, the descending order of four tags is:
v1.0.1, v1.0.0-rc.5, v1.0.0, v0.25.0
So `v1.0.0-rc.5` sorts ABOVE the release it is a candidate for. The repo has
carried no pre-release tag until now, which is the only reason this has never
bitten; cutting a tagged RC introduces one, and from the 1.0 cut until the next
tag the gate would diff the vocabulary against a CANDIDATE rather than against
what adopters resolve.
The baseline is now the last STABLE tag. The exclusion is derived from the tag
string — a semver pre-release is exactly "a `-` after the version core" — not a
list of RC spellings, so any future pre-release scheme is covered by construction.
`pickBaselineTag` is extracted and exported so the gate's own test drives it
without git. Six cases, fed git's real output order; three go red with the filter
removed. The first case is deliberately the post-cut list `[v1.0.0-rc.5, v1.0.0,
v0.25.0]` and not one led by a higher stable tag, which would have passed either
way and proved nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTcEKXTQMYt84fAjuw5A2M1 parent ecda2fa commit 9dc5642
2 files changed
Lines changed: 50 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
284 | 291 | | |
285 | | - | |
| 292 | + | |
286 | 293 | | |
287 | 294 | | |
288 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
289 | 301 | | |
290 | 302 | | |
291 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
338 | 369 | | |
339 | 370 | | |
0 commit comments