Repository navigation
Commit 5a46489
committed
fix(ci): the registry version guard read page one and called it latest
The publish job resolves three versions — package.json, npm, and the MCP
registry — and skips whichever target is already current. The registry half
was reading the wrong number.
`/v0/servers?search=...` paginates at 30 and returns `isLatest=false` on every
row of the page, so the `.find(isLatest) || a[a.length-1]` fallback landed on
the last row of PAGE ONE: 0.32.8, published in July and never moved since.
Adding `&version=latest` makes the endpoint return exactly one row — the real
latest, isLatest=true — and the fallback becomes unnecessary.
This was wrong on every run, but only visible on some. A real release has a
genuinely new version, so `pkg != reg` came out true for the wrong reason and
the publish succeeded regardless. It only bites when package.json changes
WITHOUT a version bump, which is what the fast-uri/ip-address pin in 1f534ef
did: npm was correctly skipped, then the registry step fired on the stale
comparison and got `400 invalid version: cannot publish duplicate version`.
A red release job with nothing actually wrong underneath it.
Verified against the live endpoint: reg now resolves 0.40.1, matching
package.json, so both publish steps take their skip branch.1 parent 1f534ef commit 5a46489
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| |||
0 commit comments