Repository navigation
Commit 238f548
fix(deps): git-semver update idempotency in build_update_plan (#2165)
* fix(deps): git-semver update idempotency in build_update_plan
`apm update` reported a spurious UPDATE on every run for git-source semver
dependencies already at their locked tag, and never converged: the lockfile
was rewritten with the identical SHA each time (only timestamps changed).
Root cause: the git-semver resolver rewrites `dep.reference` to the concrete
tag and computes its SHA, but stashes the result in
`ctx.git_semver_resolutions` (and the download result) without attaching it
back to `dep.resolved_reference`. At plan time `resolved_reference` is None, so
`build_update_plan` compares the locked commit against `None` and classifies
every git-semver dep as `update`.
Fix mirrors the registry idempotency fix in #1908, applied to the git-source
path: when a dep has no freshly-resolved commit, the locked entry pins an
immutable tag (`resolved_tag` set), and the ref is unchanged, borrow the locked
commit so the comparison sees `unchanged`. Scoped to tags -- a branch tip can
advance under a stable ref name, so branch deps (no `resolved_tag`) still
surface real updates.
Adds two regression tests: cached git-semver tag stays `unchanged`; branch-tip
advance still shows `update`.
* docs: clarify git-semver idempotency fix
Focus the release note on user-visible convergence and describe the locked SHA as the integrity anchor rather than treating git tags as immutable. Addresses panel follow-ups from OSS growth, docs, and supply-chain review.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Sjors Robroek <51440732+danielmeppiel@users.noreply.github.com>
Co-authored-by: danielmeppiel <danielmeppiel@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a29c049 commit 238f548
3 files changed
Lines changed: 91 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
223 | 237 | | |
224 | 238 | | |
225 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
238 | 312 | | |
239 | 313 | | |
240 | 314 | | |
| |||
0 commit comments