• turbo 2.10.12 • Packages in scope: @bb/app • Running test in 1 packages • Remote caching disabled, using shared worktree cache @bb/templates:generate:templates: cache miss, executing a5d9e682883fef75 //:ensure-native-modules: cache bypass, force executing 035cae289af3b16b @bb/plugin-build:generate: cache miss, executing cc2c1ee3bbc10667 @bb/templates:generate:plugin-scaffold: cache miss, executing b6b6c860c32b6ee0 //:ensure-native-modules: //:ensure-native-modules: > bb@ ensure-native-modules CHECKOUT/base //:ensure-native-modules: > node scripts/ensure-native-modules.mjs //:ensure-native-modules: @bb/plugin-build:generate: @bb/plugin-build:generate: > @bb/plugin-build@0.0.1 generate CHECKOUT/base/packages/plugin-build @bb/plugin-build:generate: > node ./scripts/generate-plugin-theme.mjs && node ./scripts/generate-runtime-export-manifest.mjs @bb/plugin-build:generate: @bb/templates:generate:plugin-scaffold: @bb/templates:generate:plugin-scaffold: > @bb/templates@0.0.1 generate:plugin-scaffold CHECKOUT/base/packages/templates @bb/templates:generate:plugin-scaffold: > node ./scripts/generate-plugin-scaffold.mjs @bb/templates:generate:plugin-scaffold: @bb/templates:generate:templates: @bb/templates:generate:templates: > @bb/templates@0.0.1 generate:templates CHECKOUT/base/packages/templates @bb/templates:generate:templates: > node ./scripts/generate-templates.mjs @bb/templates:generate:templates: @bb/plugin-build:generate: plugin-theme.generated.ts up to date @bb/plugin-build:generate: wrote CHECKOUT/base/packages/plugin-build/src/generated/runtime-export-manifest.generated.ts (react@19.2.4) @bb/app:test: cache miss, executing c88033ba2ff82be2 @bb/app:test: @bb/app:test: > @bb/app@0.0.1 test CHECKOUT/base/apps/app @bb/app:test: > node scripts/generate-pwa-icons.mjs --check && vitest run --config vitest.config.ts "src/lib/ui-preferences/ui-preferences-sync.test.ts" @bb/app:test: @bb/app:test: @bb/app:test: RUN v4.1.1 CHECKOUT/base/apps/app @bb/app:test: @bb/app:test: ❯ |@bb/app:isolated| src/lib/ui-preferences/ui-preferences-sync.test.ts (22 tests | 3 failed) 280ms @bb/app:test: × retains a local section order when the initial cache lacks its entry 4ms @bb/app:test: × keeps edits local without an error notification when the server lacks the entry 2ms @bb/app:test: × records an acknowledged write after its cached entry disappears 1ms @bb/app:test: ✓ keeps writes local when no sync context has started 0ms @bb/app:test: ✓ adopts the server value over local state once it has a revision 0ms @bb/app:test: ✓ uploads a legacy browser value once when the server has no revision yet 1ms @bb/app:test: ✓ does not upload a legacy value that equals the default 0ms @bb/app:test: ✓ writes with the cached revision and records the new entry 0ms @bb/app:test: ✓ fetches the current revision when nothing is cached 1ms @bb/app:test: ✓ re-applies a functional update on top of the server value after a conflict 1ms @bb/app:test: ✓ retries a plain value write with the fresh revision after a conflict 0ms @bb/app:test: ✓ adopts the server value when the retry also conflicts 0ms @bb/app:test: ✓ coalesces writes issued while one is in flight and skips reconcile meanwhile 53ms @bb/app:test: ✓ composes functional updates queued behind an in-flight write into one request 0ms @bb/app:test: ✓ skips a write whose value already matches the server 0ms @bb/app:test: ✓ toasts once and invalidates the query on a non-conflict failure 0ms @bb/app:test: ✓ never retries a migration against a newer revision 0ms @bb/app:test: ✓ does not let a delayed write response roll back a newer cached revision 53ms @bb/app:test: ✓ re-applies every queued functional update when their write conflicts 53ms @bb/app:test: ✓ evaluates a functional update against the server value when local state is stale 1ms @bb/app:test: ✓ applies a queued functional update on top of a conflicting in-flight write 51ms @bb/app:test: ✓ reconciles the mirror to the cached entry once the pending write settles 55ms @bb/app:test: @bb/app:test: ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 3 ⎯⎯⎯⎯⎯⎯⎯ @bb/app:test: @bb/app:test: FAIL |@bb/app:isolated| src/lib/ui-preferences/ui-preferences-sync.test.ts > ui preferences sync > retains a local section order when the initial cache lacks its entry @bb/app:test: TypeError: Cannot read properties of undefined (reading 'revision') @bb/app:test: ❯ reconcileUiPreference src/lib/ui-preferences/ui-preferences-sync.ts:140:13 @bb/app:test: 138| if (state.pending !== null || state.inFlight !== null) return; @bb/app:test: 139| const entry = response.preferences[key]; @bb/app:test: 140| if (entry.revision === 0 && !state.migrationAttempted) { @bb/app:test: | ^ @bb/app:test: 141| state.migrationAttempted = true; @bb/app:test: 142| const legacy = readLegacyLocalUiPreference(key); @bb/app:test: ❯ reconcileUiPreferences src/lib/ui-preferences/ui-preferences-sync.ts:127:5 @bb/app:test: ❯ Module.startUiPreferencesSync src/lib/ui-preferences/ui-preferences-sync.ts:111:29 @bb/app:test: ❯ src/lib/ui-preferences/ui-preferences-sync.test.ts:119:5 @bb/app:test: @bb/app:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯ @bb/app:test: @bb/app:test: FAIL |@bb/app:isolated| src/lib/ui-preferences/ui-preferences-sync.test.ts > ui preferences sync > keeps edits local without an error notification when the server lacks the entry @bb/app:test: AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times @bb/app:test: @bb/app:test: Received: @bb/app:test: @bb/app:test: 1st vi.fn() call: @bb/app:test: @bb/app:test: Array [ @bb/app:test: "Couldn’t sync sidebar preferences", @bb/app:test: Object { @bb/app:test: "description": "Cannot read properties of undefined (reading 'revision')", @bb/app:test: }, @bb/app:test: ] @bb/app:test: @bb/app:test: @bb/app:test: Number of calls: 1 @bb/app:test: @bb/app:test: ❯ src/lib/ui-preferences/ui-preferences-sync.test.ts:139:34 @bb/app:test: 137| expect(store.get(orderAtom)).toEqual(["threads"]); @bb/app:test: 138| expect(mocks.set).not.toHaveBeenCalled(); @bb/app:test: 139| expect(mocks.toastError).not.toHaveBeenCalled(); @bb/app:test: | ^ @bb/app:test: 140| expect(hasPendingUiPreferenceWrite("sidebar.sectionOrder")).toBe(f… @bb/app:test: 141| }); @bb/app:test: @bb/app:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯ @bb/app:test: @bb/app:test: FAIL |@bb/app:isolated| src/lib/ui-preferences/ui-preferences-sync.test.ts > ui preferences sync > records an acknowledged write after its cached entry disappears @bb/app:test: AssertionError: expected undefined to deeply equal { revision: 1, value: [ 'threads' ] } @bb/app:test: @bb/app:test: - Expected: @bb/app:test: { @bb/app:test: "revision": 1, @bb/app:test: "value": [ @bb/app:test: "threads", @bb/app:test: ], @bb/app:test: } @bb/app:test: @bb/app:test: + Received: @bb/app:test: undefined @bb/app:test: @bb/app:test: ❯ src/lib/ui-preferences/ui-preferences-sync.test.ts:160:8 @bb/app:test: 158| @bb/app:test: 159| expect(getCachedUiPreferences(queryClient)?.preferences["sidebar.s… @bb/app:test: 160| .toEqual({ revision: 1, value: ["threads"] }); @bb/app:test: | ^ @bb/app:test: 161| expect(mocks.toastError).not.toHaveBeenCalled(); @bb/app:test: 162| expect(store.get(orderAtom)).toEqual(["threads"]); @bb/app:test: @bb/app:test: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯ @bb/app:test: @bb/app:test: @bb/app:test: Test Files 1 failed (1) @bb/app:test: Tests 3 failed | 19 passed (22) @bb/app:test: Start at 03:07:18 @bb/app:test: Duration 1.68s (transform 393ms, setup 81ms, import 603ms, tests 280ms, environment 615ms) @bb/app:test: @bb/app:test:  ELIFECYCLE  Test failed. See above for more details. @bb/app#test: ERROR command (CHECKOUT/base/apps/app) WORK/bin/pnpm run test src/lib/ui-preferences/ui-preferences-sync.test.ts exited (1) Tasks: 4 successful, 5 total Cached: 0 cached, 5 total Time: 5.57s Failed: @bb/app#test ERROR run failed: command exited (1)