Skip to content

Ordered-replay oracle: terminal error after a failed settle following truncate markers #2224

Open

Description

@KyleAMathews

Summary

The random campaign of packages/db/tests/query/load-subset-replay-refinement-oracle.test.ts › "Ordered windows across truncate replays › keeps the ordered window under load and release faults" found a counterexample on main at 30175be48 (#2194). The failure is deterministic when the seed is replayed.

Replay

cd packages/db
TANSTACK_DB_ORACLE_SEED=1817832416 \
TANSTACK_DB_ORACLE_PATH=115:1:2:2:2 \
TANSTACK_DB_ORACLE_PROPERTY=replay.ordered-window-faults \
pnpm vitest run tests/query/load-subset-replay-refinement-oracle.test.ts -t "release faults"

Counterexample (shrunk)

[
  [{ "type": "hold" }, { "type": "truncateMarkers" }, { "type": "settle", "ok": false }],
  { "direction": "asc", "offset": 0, "limit": 1, "ties": false, "peer": false,
    "joined": "none", "markerMode": "on-demand", "includes": true }
]
AssertionError: convergence: terminal error: expected false to be true
  at checkOrderedReplay (tests/query/load-subset-replay-refinement-oracle.test.ts:1875)

The shown window is in an error state, but the oracle's model has no failed load that explains it (fatalLoadFailed() is false). Either production shows a terminal error that the history does not justify, or the model is missing a case where a failed settle after truncate markers is fatal.

Where it was seen

CI for #2219 (job Test (db-1), run 39726325795). #2219 does not change @tanstack/db; CI tests that PR merged with main. The replay above fails with main's packages/db.

This issue was written by Isaac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions