Fix nightly demand coverage campaign setup and time budget #2361
main fromrefs/pull/2361/head·merged by KyleAMathews 🎯 Changes#
The nightly persisted-demand coverage job failed before completing its intended checks: missing built package exports caused 19 source type errors, and tenfold campaigns retained the ordinary three-minute timeout. After those blockers, P22 also refused to run because its target matched two abort handlers.
Build the SQLite-core dependency graph through the same entry point as PR CI, scale campaign timeouts with the existing run multiplier, and target P22 specifically at the covered-demand wait. Default timeouts, history counts, required reach, comparisons, and the exactly-one-match guard remain unchanged. No production JavaScript changes.
🔬 Oracle Coverage#
Existing owner: persisted demand coverage, including packages/db-sqlite-persistence-core/tests/persisted-demand-coverage-campaign-oracle.test.ts. This change repairs campaign execution and mutant targeting; it preserves the existing model, history grammar, comparisons and reach requirements. P22 removes the covered-wait abort listener while retaining upstream promise settlement; an exact-target probe confirms it matches once and changes the source.
Validation at eb83d26e3:
- Reproduced all 19 missing-build type errors; the dependency build and subsequent TypeScript check pass.
- Reproduced the unchanged tenfold fixed campaign timing out at 180 seconds.
- Both repaired tenfold campaigns pass: fixed seed
2102and captured nightly seed-1145433908, 580 histories each, 1,160 total. All 15 reach requirements pass in both campaigns; the least frequent reached state occurs in 51 and 50 histories, respectively. Suite: 10 tests passed, no type errors, 1,790 seconds total. - Ordinary fixed/fresh campaigns and direct required-history replay pass.
- All 42 mutant outcomes match expectations: 30 rejected by named tests, 12 documented equivalent mutants survived. P22 fails the release-wait test. No missing targets, timeouts, or setup errors.
- Formatting, changed-file lint, and whitespace checks pass. All PR checks pass; CodeRabbit subsequently reviewed this head with no actionable comments. Its summary incorrectly described P22 as a no-op; the exact-target probe and completed mutant sweep establish the listener removal.
Reproduce the long campaign:
node scripts/ci-tests.mjs build sqlite-core
TANSTACK_DB_ORACLE_RUNS_MULTIPLIER=10 \
TANSTACK_DB_ORACLE_SEED=-1145433908 \
TANSTACK_DB_ORACLE_REACH_REPORT=1 \
pnpm --filter @tanstack/db-sqlite-persistence-core exec vitest run \
--coverage.enabled=false tests/persisted-demand-coverage-campaign-oracle.test.ts \
--disableConsoleIntercept
node scripts/demand-coverage-mutants.mjs
The earlier release test and benchmark runs were fixed by merged #2359. This PR addresses nightly run 42232862302. It repairs execution setup and time allowance without changing the persisted-demand law, model, histories, driver, or oracle judgment. The evidence covers the existing controlled-core histories and observations; it adds no provider, framework, or multi-tab coverage claim. The historical red runs remain red; replacement checks validate this head.
✅ Checklist#
- Tested the affected campaign locally, including both tenfold runs, replay and the complete mutant sweep. Full PR tests pass in CI.
🚀 Release Impact#
- This change is docs/CI/dev-only (no release). No package source changes or changeset required.
Summary by CodeRabbit#
- Tests
- Updated campaign test timing to use a shared timeout that adapts to the configured oracle run duration.
- Nightly verification now builds the SQLite core dependencies before running campaign and demand-coverage checks.
- Corrected a demand-coverage mutation case; it no longer changes the promise-settlement expression.
- 1
No actionable comments were generated in the recent review.
Walkthrough
-
The nightly workflow now builds
sqlite-corebefore running oracle checks. The campaign tests share a timeout computed withoracleRuns(180_000). Mutant P22 no longer targets the abort-event listener.Changes: Nightly oracle campaign
Layer / File(s) Summary Nightly oracle campaign execution
.github/workflows/oracle-nightly.yml,packages/db-sqlite-persistence-core/tests/persisted-demand-coverage-campaign-oracle.test.ts,scripts/demand-coverage-mutants.mjsThe workflow builds sqlite-corebefore the nightly checks. Both campaign tests use the sharedcampaignTimeoutMs. P22 now targets only the upstream-promise settlement expression and replaces it with the same expression.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- TanStack/db#2234 — The issue calls for nightly mutation testing of oracle-owned production code; this PR updates the nightly persisted-demand mutant run.
Possibly related PRs
- TanStack/db#2237 — Changes replay-selection helpers used by the demand coverage campaign.
- TanStack/db#2236 — Changes replay options used by campaign tests whose timeout this PR updates.
Merge Risk:
Minimal · up toeb83d-
Nightly checks build their dependencies and scale campaign timeouts. No merge-blocking issue was identified.
Pre-merge checks:
5-
Check name Status Explanation Title check The title identifies the nightly campaign setup and timeout changes. Docstring Coverage No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Description check The description covers the required sections and reports targeted tests and CI results. It does not confirm a local pnpm testrun. The P22 file summary conflicts with the description; the diff is ne…Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)
Full details: Description check
-
Explanation
The description covers the required sections and reports targeted tests and CI results. It does not confirm a local
pnpm testrun. The P22 file summary conflicts with the description; the diff is needed to verify the mutant behavior.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
-
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
-
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
08614df2-3d8f-4a7d-813d-90d2122c40c8
Commits-
Reviewing files that changed from the base of the PR and between 8fe176c77ee82f2b45bdee8a4c37a3f86dac799a and eb83d26e31e57401634bb9eec35e1142c68b8d5a.
Files selected for processing: 3-
.github/workflows/oracle-nightly.ymlpackages/db-sqlite-persistence-core/tests/persisted-demand-coverage-campaign-oracle.test.tsscripts/demand-coverage-mutants.mjs
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
-
-
Size Change: 0 B
Total Size: 239 kB
compressed-size-action::db-and-react-package-sizeℹ️ View Unchanged
Filename Size packages/db/dist/esm/client.js5.51 kB packages/db/dist/esm/collection-options-brand.js219 B packages/db/dist/esm/collection-options.js258 B packages/db/dist/esm/collection/change-events.js1.76 kB packages/db/dist/esm/collection/changes.js3.06 kB packages/db/dist/esm/collection/cleanup-queue.js828 B packages/db/dist/esm/collection/config-errors.js547 B packages/db/dist/esm/collection/events.js504 B packages/db/dist/esm/collection/health-tree.js698 B packages/db/dist/esm/collection/index.js6.28 kB packages/db/dist/esm/collection/indexes.js2.3 kB packages/db/dist/esm/collection/lifecycle.js5.59 kB packages/db/dist/esm/collection/mutations.js2.94 kB packages/db/dist/esm/collection/state.js7.69 kB packages/db/dist/esm/collection/subscription.js9.86 kB packages/db/dist/esm/collection/sync.js6.51 kB packages/db/dist/esm/collection/validate-config.js1.17 kB packages/db/dist/esm/collection/validate-indexing.js366 B packages/db/dist/esm/deferred.js207 B packages/db/dist/esm/error-message.js642 B packages/db/dist/esm/errors.js7.15 kB packages/db/dist/esm/event-emitter.js1.06 kB packages/db/dist/esm/index.js4.75 kB packages/db/dist/esm/indexed-db-wrapper.js1.91 kB packages/db/dist/esm/indexed-db.js3.8 kB packages/db/dist/esm/indexes/auto-index.js924 B packages/db/dist/esm/indexes/base-index.js1.92 kB packages/db/dist/esm/indexes/basic-index.js1.93 kB packages/db/dist/esm/indexes/btree-index.js1.62 kB packages/db/dist/esm/indexes/index-registry.js916 B packages/db/dist/esm/indexes/reverse-index.js1.01 kB packages/db/dist/esm/live-query-adapter.js845 B packages/db/dist/esm/live-query-observer-client.js2.21 kB packages/db/dist/esm/live-query-observer.js3.22 kB packages/db/dist/esm/live-query-options.js2.65 kB packages/db/dist/esm/live-query-primitives.js406 B packages/db/dist/esm/live-query-window-binding.js1.56 kB packages/db/dist/esm/live-query-window-controller.js4.02 kB packages/db/dist/esm/local-only.js1 kB packages/db/dist/esm/local-storage.js4.58 kB packages/db/dist/esm/optimistic-action.js359 B packages/db/dist/esm/paced-mutations.js1.11 kB packages/db/dist/esm/proxy.js3.51 kB packages/db/dist/esm/query/builder/clone-query.js854 B packages/db/dist/esm/query/builder/functions.js1.61 kB packages/db/dist/esm/query/builder/group-keys.js157 B packages/db/dist/esm/query/builder/include-functions.js229 B packages/db/dist/esm/query/builder/index.js7.39 kB packages/db/dist/esm/query/builder/query-ir.js312 B packages/db/dist/esm/query/builder/ref-proxy-identity.js292 B packages/db/dist/esm/query/builder/ref-proxy.js1.67 kB packages/db/dist/esm/query/builder/wrapper-identity.js221 B packages/db/dist/esm/query/compiler/evaluators.js2.51 kB packages/db/dist/esm/query/compiler/expressions.js603 B packages/db/dist/esm/query/compiler/find-aggregate.js328 B packages/db/dist/esm/query/compiler/group-by.js4.09 kB packages/db/dist/esm/query/compiler/grouping.js161 B packages/db/dist/esm/query/compiler/index.js10.1 kB packages/db/dist/esm/query/compiler/joins.js3.34 kB packages/db/dist/esm/query/compiler/lazy-targets.js1.11 kB packages/db/dist/esm/query/compiler/order-by.js2.87 kB packages/db/dist/esm/query/compiler/parent-routes.js325 B packages/db/dist/esm/query/compiler/query-equivalence.js568 B packages/db/dist/esm/query/compiler/route-metadata.js1.31 kB packages/db/dist/esm/query/compiler/select.js1.66 kB packages/db/dist/esm/query/effect.js5.81 kB packages/db/dist/esm/query/equality-conjunct.js486 B packages/db/dist/esm/query/equality-value-identity.js736 B packages/db/dist/esm/query/expression-helpers.js1.61 kB packages/db/dist/esm/query/ir-stable-identity.js4.29 kB packages/db/dist/esm/query/ir.js2.26 kB packages/db/dist/esm/query/join-conditions.js257 B packages/db/dist/esm/query/live-query-collection.js391 B packages/db/dist/esm/query/live/bucket-facade-adapter.js2.98 kB packages/db/dist/esm/query/live/collection-config-builder.js8.6 kB packages/db/dist/esm/query/live/collection-registry.js264 B packages/db/dist/esm/query/live/collection-subscriber.js2.69 kB packages/db/dist/esm/query/live/graph-scheduler.js305 B packages/db/dist/esm/query/live/includes-runtime.js212 B packages/db/dist/esm/query/live/internal.js145 B packages/db/dist/esm/query/live/materialized-pipeline.js2.39 kB packages/db/dist/esm/query/live/ordered-source-loader.js6.61 kB packages/db/dist/esm/query/live/public-key-reduction.js970 B packages/db/dist/esm/query/live/subset-demand-controller.js2.44 kB packages/db/dist/esm/query/live/utils.js1.35 kB packages/db/dist/esm/query/optimizer.js2.95 kB packages/db/dist/esm/query/pooled-live-query.js5.14 kB packages/db/dist/esm/query/pooled-source.js219 B packages/db/dist/esm/query/query-once.js359 B packages/db/dist/esm/query/runtime-reference-identity.js630 B packages/db/dist/esm/query/subset-dedupe.js493 B packages/db/dist/esm/query/validate-limit.js247 B packages/db/dist/esm/scheduler.js1.23 kB packages/db/dist/esm/SortedMap.js1.77 kB packages/db/dist/esm/strategies/commit-completion.js154 B packages/db/dist/esm/strategies/debounceStrategy.js658 B packages/db/dist/esm/strategies/queueStrategy.js523 B packages/db/dist/esm/strategies/serial-pacer.js486 B packages/db/dist/esm/strategies/throttleStrategy.js738 B packages/db/dist/esm/sync-persistence.js669 B packages/db/dist/esm/sync-receipt.js211 B packages/db/dist/esm/transaction-commit-work.js351 B packages/db/dist/esm/transactions.js4.66 kB packages/db/dist/esm/utils.js1.81 kB packages/db/dist/esm/utils/array-utils.js270 B packages/db/dist/esm/utils/browser-polyfills.js304 B packages/db/dist/esm/utils/btree.js3.02 kB packages/db/dist/esm/utils/callbacks.js219 B packages/db/dist/esm/utils/comparison.js1.95 kB packages/db/dist/esm/utils/cursor.js753 B packages/db/dist/esm/utils/error.js262 B packages/db/dist/esm/utils/get-or-create.js155 B packages/db/dist/esm/utils/index-optimization.js2.58 kB packages/db/dist/esm/utils/source-record.js140 B packages/db/dist/esm/utils/type-guards.js230 B packages/db/dist/esm/utils/uuid.js530 B packages/db/dist/esm/virtual-props.js400 B packages/react-db/dist/esm/DbProvider.js317 B packages/react-db/dist/esm/development.js190 B packages/react-db/dist/esm/HydrationBoundary.js263 B packages/react-db/dist/esm/index.js349 B packages/react-db/dist/esm/source-id-bindings.js339 B packages/react-db/dist/esm/useLiveInfiniteQuery.js1.45 kB packages/react-db/dist/esm/useLiveQuery.js2.7 kB packages/react-db/dist/esm/useLiveQueryEffect.js504 B packages/react-db/dist/esm/useLiveSuspenseQuery.js2.04 kB packages/react-db/dist/esm/usePacedMutations.js429 B More templates
- todos
- offline-transactions-react-native
- shopping-list-react-native
- @tanstack/db-example-react-action-enforcement
- @tanstack/db-example-react-next-ssr-e2e
- tanstack-start-example-basic
- @tanstack/db-example-paced-mutations-demo
- tanstack-start-db-projects-example
- @tanstack/db-example-react-start-ssr-e2e
- @tanstack/db-example-react-todo
- @tanstack/db-example-solid-todo
- offline-first-electron
@tanstack/angular-db
npm i https://pkg.pr.new/@tanstack/angular-db@2361@tanstack/browser-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/browser-db-sqlite-persistence@2361@tanstack/capacitor-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/capacitor-db-sqlite-persistence@2361@tanstack/cloudflare-durable-objects-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/cloudflare-durable-objects-db-sqlite-persistence@2361@tanstack/convex-db-collection
npm i https://pkg.pr.new/@tanstack/convex-db-collection@2361@tanstack/db
npm i https://pkg.pr.new/@tanstack/db@2361@tanstack/db-ivm
npm i https://pkg.pr.new/@tanstack/db-ivm@2361@tanstack/db-sqlite-persistence-core
npm i https://pkg.pr.new/@tanstack/db-sqlite-persistence-core@2361@tanstack/electric-db-collection
npm i https://pkg.pr.new/@tanstack/electric-db-collection@2361@tanstack/electron-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/electron-db-sqlite-persistence@2361@tanstack/expo-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/expo-db-sqlite-persistence@2361@tanstack/node-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/node-db-sqlite-persistence@2361@tanstack/offline-transactions
npm i https://pkg.pr.new/@tanstack/offline-transactions@2361@tanstack/powersync-db-collection
npm i https://pkg.pr.new/@tanstack/powersync-db-collection@2361@tanstack/preact-db
npm i https://pkg.pr.new/@tanstack/preact-db@2361@tanstack/query-db-collection
npm i https://pkg.pr.new/@tanstack/query-db-collection@2361@tanstack/react-db
npm i https://pkg.pr.new/@tanstack/react-db@2361@tanstack/react-native-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/react-native-db-sqlite-persistence@2361@tanstack/react-router-with-db
npm i https://pkg.pr.new/@tanstack/react-router-with-db@2361@tanstack/rxdb-db-collection
npm i https://pkg.pr.new/@tanstack/rxdb-db-collection@2361@tanstack/solid-db
npm i https://pkg.pr.new/@tanstack/solid-db@2361@tanstack/svelte-db
npm i https://pkg.pr.new/@tanstack/svelte-db@2361@tanstack/tauri-db-sqlite-persistence
npm i https://pkg.pr.new/@tanstack/tauri-db-sqlite-persistence@2361@tanstack/trailbase-db-collection
npm i https://pkg.pr.new/@tanstack/trailbase-db-collection@2361@tanstack/vue-db
npm i https://pkg.pr.new/@tanstack/vue-db@2361commit:
eb83d26KyleAMathews merged this5f3ee18
KyleAMathews closed this
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: eb83d26e31e57401634bb9eec35e1142c68b8d5a
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR