Loading
test(npm): npm hosted step 20, part 3 of 3 — unpublish atomicity + counter tests
Part 3 of 3 of the npm hosted plan — Step 20: whole-package unpublish + inline cascade.
🗂️ Stacked MRs
Split into 3 stacked MRs to keep each within the review size limit (~600 ideal reviewable LoC). Each part targets the previous one (part 1 → main); review and merge bottom-up.
- feat(npm): npm hosted step 20, part 1 of 3 — un... (!699 - merged) • David Fernandez • 19.2
- feat(npm): npm hosted step 20, part 2 of 3 — un... (!700 - merged) • David Fernandez • 19.2
- test(npm): npm hosted step 20, part 3 of 3 — un... (!701 - merged) • David Fernandez • 19.2
👈
🧪 What this part adds
Completes the whole-package unpublish integration coverage with the atomicity, cascade-correctness, timing, and repository-counter tests, plus the counter-only fixture helpers.
✅ Spec coverage
| Acceptance criterion / case | Test |
|---|---|
| Atomicity — rollback mid-cascade leaves package, versions, files, tags, metadata all unchanged | TestUnpublishPackageIntegration_Atomicity |
AC 59 — npm_tags cascade (hard-delete) |
TestUnpublishPackageIntegration_TagsCascaded |
AC 59 — npm_files cascade (soft-delete) |
TestUnpublishPackageIntegration_FilesCascaded |
| Timing — 5000-version commit within bound (< 30 s) | TestUnpublishPackageIntegration_LargePackage_CommitsWithinBound |
Counters — artifacts_count / size_bytes decrement + GREATEST(...,0) clamp |
TestUnpublishPackageIntegration_RepositoryCountersDecremented |
📚 References
- Plan: https://gitlab.com/gitlab-org/ops/artifact-registry/-/blob/main/docs/plans/2026-05-11-npm-hosted.md
- Spec: https://gitlab.com/gitlab-org/ops/artifact-registry/-/blob/main/docs/specs/S11-npm-hosted.md
Related to #138 (closed)
Edited by David Fernandez