SyntaxError: The requested module '@mosaicstack/db' does not provide an export named 'BacklogService'
at dist/commands/fleet-backlog.js:19
Root cause
PR #657 added BacklogService + DEFAULT_CLAIM_TTL_SECONDS to @mosaicstack/db and a fleet-backlog command to mosaic that imports them — but never bumped db's version (stayed 0.0.3). The publish pipeline (.woodpecker/publish.yml) tolerates version already exists, so db's new code was silently never republished. The registry's [email protected] is the stale pre-#657 artifact with no BacklogService export. mosaic 0.0.46 declares db as a regular (non-bundled) dependency resolved workspace:* → 0.0.3, so it installs the stale db and crashes at CLI entry.
Verified from registry tarballs:
npm pack @mosaicstack/[email protected] → dependencies["@mosaicstack/db"] = "0.0.3", bundledDependencies unset, no node_modules in tarball.
## Problem
mosaic **0.0.46** crashes on every CLI invocation:
```
SyntaxError: The requested module '@mosaicstack/db' does not provide an export named 'BacklogService'
at dist/commands/fleet-backlog.js:19
```
## Root cause
PR #657 added `BacklogService` + `DEFAULT_CLAIM_TTL_SECONDS` to `@mosaicstack/db` and a `fleet-backlog` command to mosaic that imports them — but **never bumped db's version** (stayed `0.0.3`). The publish pipeline (`.woodpecker/publish.yml`) tolerates `version already exists`, so db's new code was **silently never republished**. The registry's `[email protected]` is the stale pre-#657 artifact with **no `BacklogService` export**. mosaic 0.0.46 declares db as a regular (non-bundled) dependency resolved `workspace:* → 0.0.3`, so it installs the stale db and crashes at CLI entry.
Verified from registry tarballs:
- `npm pack @mosaicstack/[email protected]` → `dependencies["@mosaicstack/db"] = "0.0.3"`, `bundledDependencies` unset, no `node_modules` in tarball.
- `npm pack @mosaicstack/[email protected]` → barrel exports `createDb/createPgliteDb/runMigrations/schema/...` only; **no `BacklogService`**.
A mosaic-only republish would re-pin `0.0.3` and crash identically — **the db bump is mandatory**.
## Fix
- `@mosaicstack/db` `0.0.3 → 0.0.4` (forces republish *with* `BacklogService` past the version-exists gate)
- `@mosaicstack/mosaic` `0.0.46 → 0.0.47` (so `workspace:*` resolves to `[email protected]` at publish)
- `pnpm-lock.yaml` unchanged (workspace deps link by path, not version; `--frozen-lockfile` passes — verified locally).
## Post-publish verification gate (exit-code-safe, export-level)
```
npm pack @mosaicstack/[email protected] && unpack && node --input-type=module \
-e 'import("./pkg/dist/index.js").then(m=>{if(!m.BacklogService)process.exit(1)})'
npm pack @mosaicstack/[email protected] && unpack && \
node -e 'console.log(require("./pkg/package.json").dependencies["@mosaicstack/db"])' # must print 0.0.4
```
🤖 Generated with [Claude Code](https://claude.com/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 [email protected] 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: [email protected] declares db as a regular
(non-bundled) dependency at 0.0.3; [email protected] 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 [email protected] at publish. pnpm-lock.yaml is
unchanged (workspace deps link by path, not version).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
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:
Check
Result
Diff scope
Exactly 2 version fields — @mosaicstack/db 0.0.3→0.0.4, @mosaicstack/mosaic 0.0.46→0.0.47; no other files
mosaic→db dep
workspace:* → publish resolves to bumped 0.0.4 (bump is load-bearing, not a hardcoded pin)
db source exports BacklogService
Yes — re-exported in packages/db/src/index.ts, defined in packages/db/src/backlog.ts → republished [email protected] will carry the export [email protected] lacked
Lockfile
Unchanged (workspace:* needs no lock edit) → --frozen-lockfile holds
Root cause = publish skew, not a code defect: db source already had BacklogService (post-#657), but registry [email protected] was 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 update retry:
## 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`:
| Check | Result |
|---|---|
| Diff scope | Exactly 2 version fields — `@mosaicstack/db` 0.0.3→0.0.4, `@mosaicstack/mosaic` 0.0.46→0.0.47; no other files |
| mosaic→db dep | `workspace:*` → publish resolves to bumped **0.0.4** (bump is load-bearing, not a hardcoded pin) |
| db source exports `BacklogService` | **Yes** — re-exported in `packages/db/src/index.ts`, defined in `packages/db/src/backlog.ts` → republished `[email protected]` will carry the export `[email protected]` lacked |
| Lockfile | Unchanged (`workspace:*` needs no lock edit) → `--frozen-lockfile` holds |
**Root cause = publish skew, not a code defect:** db *source* already had `BacklogService` (post-#657), but registry `[email protected]` was 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 update` retry:**
- `npm pack @mosaicstack/[email protected]` → assert `import(...).then(m=>m.BacklogService)` truthy
- `npm pack @mosaicstack/[email protected]` → assert `dependencies["@mosaicstack/db"] === "0.0.4"`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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's[email protected]is 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/[email protected]→dependencies["@mosaicstack/db"] = "0.0.3",bundledDependenciesunset, nonode_modulesin tarball.npm pack @mosaicstack/[email protected]→ 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 to[email protected]at 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 [email protected] 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: [email protected] declares db as a regular (non-bundled) dependency at 0.0.3; [email protected] 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 [email protected] at publish. pnpm-lock.yaml is unchanged (workspace deps link by path, not version). Co-Authored-By: Claude Opus 4.8 <[email protected]>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→ republished[email protected]will carry the export[email protected]lackedworkspace:*needs no lock edit) →--frozen-lockfileholdsRoot cause = publish skew, not a code defect: db source already had
BacklogService(post-#657), but registry[email protected]was 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/[email protected]→ assertimport(...).then(m=>m.BacklogService)truthynpm pack @mosaicstack/[email protected]→ assertdependencies["@mosaicstack/db"] === "0.0.4"