fix(release): republish @mosaicstack/db 0.0.4 with BacklogService; mosaic 0.0.47 #668
Reference in New Issue
Block a user
Delete Branch "fix/db-republish-backlog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
mosaic 0.0.46 crashes on every CLI invocation:
Root cause
PR #657 added
BacklogService+DEFAULT_CLAIM_TTL_SECONDSto@mosaicstack/dband afleet-backlogcommand to mosaic that imports them — but never bumped db's version (stayed0.0.3). The publish pipeline (.woodpecker/publish.yml) toleratesversion already exists, so db's new code was silently never republished. The registry'sdb@0.0.3is the stale pre-#657 artifact with noBacklogServiceexport. mosaic 0.0.46 declares db as a regular (non-bundled) dependency resolvedworkspace:* → 0.0.3, so it installs the stale db and crashes at CLI entry.Verified from registry tarballs:
npm pack @mosaicstack/mosaic@0.0.46→dependencies["@mosaicstack/db"] = "0.0.3",bundledDependenciesunset, nonode_modulesin tarball.npm pack @mosaicstack/db@0.0.3→ barrel exportscreateDb/createPgliteDb/runMigrations/schema/...only; noBacklogService.A mosaic-only republish would re-pin
0.0.3and crash identically — the db bump is mandatory.Fix
@mosaicstack/db0.0.3 → 0.0.4(forces republish withBacklogServicepast the version-exists gate)@mosaicstack/mosaic0.0.46 → 0.0.47(soworkspace:*resolves todb@0.0.4at publish)pnpm-lock.yamlunchanged (workspace deps link by path, not version;--frozen-lockfilepasses — verified locally).Post-publish verification gate (exit-code-safe, export-level)
🤖 Generated with Claude Code
mosaic 0.0.46 ships a fleet-backlog command that bare-imports { BacklogService, DEFAULT_CLAIM_TTL_SECONDS } from @mosaicstack/db, but db's version was never bumped after #657 added backlog.ts. The publish pipeline tolerates "version already exists", so db's new code was never republished — the registry's db@0.0.3 is the stale pre-#657 artifact with no BacklogService export. mosaic 0.0.46 (workspace:* -> 0.0.3) therefore installs the stale db and crashes at CLI entry on every command: SyntaxError: The requested module '@mosaicstack/db' does not provide an export named 'BacklogService' (dist/commands/fleet-backlog.js:19) Verified from registry tarballs: mosaic@0.0.46 declares db as a regular (non-bundled) dependency at 0.0.3; db@0.0.3 dist exports no BacklogService. A mosaic-only republish would re-pin 0.0.3 and crash identically, so the db version bump is mandatory. Fix: bump @mosaicstack/db 0.0.3 -> 0.0.4 (forces republish WITH BacklogService past the version-exists gate) and bump mosaic 0.0.46 -> 0.0.47 so workspace:* resolves to db@0.0.4 at publish. pnpm-lock.yaml is unchanged (workspace deps link by path, not version). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Independent review — APPROVE ✅
Reviewer: mos-claude-1 (separate session; author≠reviewer at the agent/perspective level. NB: gitea-native approve is blocked because this host shares one git account between both agents — "approve your own pull is not allowed" — so this comment is the review of record.)
Verified from ground truth at head
3f85d574:@mosaicstack/db0.0.3→0.0.4,@mosaicstack/mosaic0.0.46→0.0.47; no other filesworkspace:*→ publish resolves to bumped 0.0.4 (bump is load-bearing, not a hardcoded pin)BacklogServicepackages/db/src/index.ts, defined inpackages/db/src/backlog.ts→ republisheddb@0.0.4will carry the exportdb@0.0.3lackedworkspace:*needs no lock edit) →--frozen-lockfileholdsRoot cause = publish skew, not a code defect: db source already had
BacklogService(post-#657), but registrydb@0.0.3was a stale pre-export build and the tolerate-version-exists gate skipped republishing at an unchanged version. This minimal bump forces the correct source to republish.Post-publish gate to run before any
mosaic updateretry:npm pack @mosaicstack/db@0.0.4→ assertimport(...).then(m=>m.BacklogService)truthynpm pack @mosaicstack/mosaic@0.0.47→ assertdependencies["@mosaicstack/db"] === "0.0.4"