npm bulk whole-package cascade owes the tags_count reset the single arm dispatches
The npm single-package delete arm resets tags_count when its package tombstones (NpmPackageTagsCountMaintainer, landed on feat(managementapi): serve the npm arm of the v... (!1535 - merged) • Hayley Swimelar • 19.3's round). The bulk whole-package cascade (NpmPackageManagementDeleter, reached through the merged npm bulk worker) dispatches no reset, so the same logical delete moves the counter on one surface and not the other.
While the npm bulk routes are unmerged the divergent path is unreachable end to end; once the packages bulk route lands, a bulk whole-package delete leaves tags_count stale where the single delete zeroes it. Dispatch the reset in the cascade, mirroring the single arm's maintainer pattern, with the reset pinned by the same two-row test shape (non-zero row rejects decrement-instead-of-reset, zero row rejects a count-gated reset). Land before or with the npm bulk routes MR.
Raised by vespian_gl on feat(managementapi): serve the npm arm of the v... (!1535 - merged) • Hayley Swimelar • 19.3 and routed here on the operator's ruling.
The bulk cascade's reset lands via fix(managementapi): reset tags_count in the npm... (!1630 - merged) • Hayley Swimelar • 19.4. This issue stays open past that merge: the management single-package route (npmPackageDelete) still dispatches no reset, so one arm of the divergence remains. The follow-up shape is recorded in that MR's review thread — dispatch in npmPackageDelete with its own tests, plus the composer-comment and ResetNpmPackageTagsCount enumeration true-ups.
The closing MR also carries five refinements committed in fix(managementapi): reset tags_count in the npm... (!1630 - merged) • Hayley Swimelar • 19.4's round-3 review threads, in the reviewer's own shapes:
- The dispatch-site logger wrap (
bulkNpmScopeFields+artifact_id, mirroringsettleVersionsPass) so a failed reset's Warn line carries tenant and package attribution, with a fields test. - The shed-condition comment restores at the dispatch site and
npm_packages.go(the "sheds nothing" wording overstates a conditional), plus a no-signal-until-registration sentence;versions.go's sibling claim joins the sweep if touched. - Scoping the "no correctness rides the column" clause to the reset arm, and recording the shed-decrement-at-the-1000-cap scenario (stranded over-count, spurious 422s).
- The
TagsCountsfield doc naming both dispatch shapes (per-pass versions, per-entry packages). - The
artifact_write.goheader's stale "still wait on the handlers" claim.
Related to #313 (closed)