Skip to content

Fix nightly demand coverage campaign setup and time budget - #2361

Merged
KyleAMathews merged 1 commit into
mainfrom
codex/nightly-oracle-ci
Nov 6, 2026
Merged

KyleAMathews merged 1 commit into
mainfrom
codex/nightly-oracle-ci

Conversation

@KyleAMathews

@KyleAMathews KyleAMathews commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

🎯 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 2102 and 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.

@changeset-bot

changeset-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: eb83d26

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

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The nightly workflow now builds sqlite-core before running oracle checks. The campaign tests share a timeout computed with oracleRuns(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.mjs
The workflow builds sqlite-core before the nightly checks. Both campaign tests use the shared campaignTimeoutMs. 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

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 to eb83d

Nightly checks build their dependencies and scale campaign timeouts. No merge-blocking issue was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title identifies the nightly campaign setup and timeout changes.
Docstring Coverage Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the required sections and reports targeted tests and CI results. It does not confirm a local pnpm test run. 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 test run. 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.

Share

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 8fe176c and eb83d26.

Files selected for processing: 3

  • .github/workflows/oracle-nightly.yml
  • packages/db-sqlite-persistence-core/tests/persisted-demand-coverage-campaign-oracle.test.ts
  • scripts/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.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 239 kB

ℹ️ View Unchanged
Filename Size
packages/db/dist/esm/client.js 5.51 kB
packages/db/dist/esm/collection-options-brand.js 219 B
packages/db/dist/esm/collection-options.js 258 B
packages/db/dist/esm/collection/change-events.js 1.76 kB
packages/db/dist/esm/collection/changes.js 3.06 kB
packages/db/dist/esm/collection/cleanup-queue.js 828 B
packages/db/dist/esm/collection/config-errors.js 547 B
packages/db/dist/esm/collection/events.js 504 B
packages/db/dist/esm/collection/health-tree.js 698 B
packages/db/dist/esm/collection/index.js 6.28 kB
packages/db/dist/esm/collection/indexes.js 2.3 kB
packages/db/dist/esm/collection/lifecycle.js 5.59 kB
packages/db/dist/esm/collection/mutations.js 2.94 kB
packages/db/dist/esm/collection/state.js 7.69 kB
packages/db/dist/esm/collection/subscription.js 9.86 kB
packages/db/dist/esm/collection/sync.js 6.51 kB
packages/db/dist/esm/collection/validate-config.js 1.17 kB
packages/db/dist/esm/collection/validate-indexing.js 366 B
packages/db/dist/esm/deferred.js 207 B
packages/db/dist/esm/error-message.js 642 B
packages/db/dist/esm/errors.js 7.15 kB
packages/db/dist/esm/event-emitter.js 1.06 kB
packages/db/dist/esm/index.js 4.75 kB
packages/db/dist/esm/indexed-db-wrapper.js 1.91 kB
packages/db/dist/esm/indexed-db.js 3.8 kB
packages/db/dist/esm/indexes/auto-index.js 924 B
packages/db/dist/esm/indexes/base-index.js 1.92 kB
packages/db/dist/esm/indexes/basic-index.js 1.93 kB
packages/db/dist/esm/indexes/btree-index.js 1.62 kB
packages/db/dist/esm/indexes/index-registry.js 916 B
packages/db/dist/esm/indexes/reverse-index.js 1.01 kB
packages/db/dist/esm/live-query-adapter.js 845 B
packages/db/dist/esm/live-query-observer-client.js 2.21 kB
packages/db/dist/esm/live-query-observer.js 3.22 kB
packages/db/dist/esm/live-query-options.js 2.65 kB
packages/db/dist/esm/live-query-primitives.js 406 B
packages/db/dist/esm/live-query-window-binding.js 1.56 kB
packages/db/dist/esm/live-query-window-controller.js 4.02 kB
packages/db/dist/esm/local-only.js 1 kB
packages/db/dist/esm/local-storage.js 4.58 kB
packages/db/dist/esm/optimistic-action.js 359 B
packages/db/dist/esm/paced-mutations.js 1.11 kB
packages/db/dist/esm/proxy.js 3.51 kB
packages/db/dist/esm/query/builder/clone-query.js 854 B
packages/db/dist/esm/query/builder/functions.js 1.61 kB
packages/db/dist/esm/query/builder/group-keys.js 157 B
packages/db/dist/esm/query/builder/include-functions.js 229 B
packages/db/dist/esm/query/builder/index.js 7.39 kB
packages/db/dist/esm/query/builder/query-ir.js 312 B
packages/db/dist/esm/query/builder/ref-proxy-identity.js 292 B
packages/db/dist/esm/query/builder/ref-proxy.js 1.67 kB
packages/db/dist/esm/query/builder/wrapper-identity.js 221 B
packages/db/dist/esm/query/compiler/evaluators.js 2.51 kB
packages/db/dist/esm/query/compiler/expressions.js 603 B
packages/db/dist/esm/query/compiler/find-aggregate.js 328 B
packages/db/dist/esm/query/compiler/group-by.js 4.09 kB
packages/db/dist/esm/query/compiler/grouping.js 161 B
packages/db/dist/esm/query/compiler/index.js 10.1 kB
packages/db/dist/esm/query/compiler/joins.js 3.34 kB
packages/db/dist/esm/query/compiler/lazy-targets.js 1.11 kB
packages/db/dist/esm/query/compiler/order-by.js 2.87 kB
packages/db/dist/esm/query/compiler/parent-routes.js 325 B
packages/db/dist/esm/query/compiler/query-equivalence.js 568 B
packages/db/dist/esm/query/compiler/route-metadata.js 1.31 kB
packages/db/dist/esm/query/compiler/select.js 1.66 kB
packages/db/dist/esm/query/effect.js 5.81 kB
packages/db/dist/esm/query/equality-conjunct.js 486 B
packages/db/dist/esm/query/equality-value-identity.js 736 B
packages/db/dist/esm/query/expression-helpers.js 1.61 kB
packages/db/dist/esm/query/ir-stable-identity.js 4.29 kB
packages/db/dist/esm/query/ir.js 2.26 kB
packages/db/dist/esm/query/join-conditions.js 257 B
packages/db/dist/esm/query/live-query-collection.js 391 B
packages/db/dist/esm/query/live/bucket-facade-adapter.js 2.98 kB
packages/db/dist/esm/query/live/collection-config-builder.js 8.6 kB
packages/db/dist/esm/query/live/collection-registry.js 264 B
packages/db/dist/esm/query/live/collection-subscriber.js 2.69 kB
packages/db/dist/esm/query/live/graph-scheduler.js 305 B
packages/db/dist/esm/query/live/includes-runtime.js 212 B
packages/db/dist/esm/query/live/internal.js 145 B
packages/db/dist/esm/query/live/materialized-pipeline.js 2.39 kB
packages/db/dist/esm/query/live/ordered-source-loader.js 6.61 kB
packages/db/dist/esm/query/live/public-key-reduction.js 970 B
packages/db/dist/esm/query/live/subset-demand-controller.js 2.44 kB
packages/db/dist/esm/query/live/utils.js 1.35 kB
packages/db/dist/esm/query/optimizer.js 2.95 kB
packages/db/dist/esm/query/pooled-live-query.js 5.14 kB
packages/db/dist/esm/query/pooled-source.js 219 B
packages/db/dist/esm/query/query-once.js 359 B
packages/db/dist/esm/query/runtime-reference-identity.js 630 B
packages/db/dist/esm/query/subset-dedupe.js 493 B
packages/db/dist/esm/query/validate-limit.js 247 B
packages/db/dist/esm/scheduler.js 1.23 kB
packages/db/dist/esm/SortedMap.js 1.77 kB
packages/db/dist/esm/strategies/commit-completion.js 154 B
packages/db/dist/esm/strategies/debounceStrategy.js 658 B
packages/db/dist/esm/strategies/queueStrategy.js 523 B
packages/db/dist/esm/strategies/serial-pacer.js 486 B
packages/db/dist/esm/strategies/throttleStrategy.js 738 B
packages/db/dist/esm/sync-persistence.js 669 B
packages/db/dist/esm/sync-receipt.js 211 B
packages/db/dist/esm/transaction-commit-work.js 351 B
packages/db/dist/esm/transactions.js 4.66 kB
packages/db/dist/esm/utils.js 1.81 kB
packages/db/dist/esm/utils/array-utils.js 270 B
packages/db/dist/esm/utils/browser-polyfills.js 304 B
packages/db/dist/esm/utils/btree.js 3.02 kB
packages/db/dist/esm/utils/callbacks.js 219 B
packages/db/dist/esm/utils/comparison.js 1.95 kB
packages/db/dist/esm/utils/cursor.js 753 B
packages/db/dist/esm/utils/error.js 262 B
packages/db/dist/esm/utils/get-or-create.js 155 B
packages/db/dist/esm/utils/index-optimization.js 2.58 kB
packages/db/dist/esm/utils/source-record.js 140 B
packages/db/dist/esm/utils/type-guards.js 230 B
packages/db/dist/esm/utils/uuid.js 530 B
packages/db/dist/esm/virtual-props.js 400 B
packages/react-db/dist/esm/DbProvider.js 317 B
packages/react-db/dist/esm/development.js 190 B
packages/react-db/dist/esm/HydrationBoundary.js 263 B
packages/react-db/dist/esm/index.js 349 B
packages/react-db/dist/esm/source-id-bindings.js 339 B
packages/react-db/dist/esm/useLiveInfiniteQuery.js 1.45 kB
packages/react-db/dist/esm/useLiveQuery.js 2.7 kB
packages/react-db/dist/esm/useLiveQueryEffect.js 504 B
packages/react-db/dist/esm/useLiveSuspenseQuery.js 2.04 kB
packages/react-db/dist/esm/usePacedMutations.js 429 B

compressed-size-action::db-and-react-package-size

@pkg-pr-new

pkg-pr-new Bot commented Nov 6, 2026

Copy link
Copy Markdown
More templates

@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@2361

commit: eb83d26

@KyleAMathews
KyleAMathews marked this pull request as ready for review November 6, 2026 18:27
@KyleAMathews
KyleAMathews merged commit 5f3ee18 into main Nov 6, 2026
25 checks passed
@KyleAMathews
KyleAMathews deleted the codex/nightly-oracle-ci branch November 6, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant