Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
efdf808
fix(persistence): close #2303 sync-metadata bug class
KyleAMathews Nov 29, 2026
18fb13d
fix(persistence): preserve late bare seed metadata during recovery
KyleAMathews Nov 29, 2026
e551c1d
chore: add SQLite metadata recovery changeset
KyleAMathews Nov 29, 2026
2924c85
ci: apply automated fixes
autofix-ci[bot] Nov 29, 2026
bb95320
test(persistence): verify metadata seed isolation across restart
KyleAMathews Nov 29, 2026
2a6b3e2
test(persistence): type the restart oracle input and plan
KyleAMathews Nov 29, 2026
0448946
fix(persistence): preserve seed metadata across later named notices
KyleAMathews Nov 29, 2026
75e2905
fix(persistence): honor row authority and source acceptance
KyleAMathews Nov 29, 2026
10f9320
test(persistence): calibrate metadata session reach and row merge
KyleAMathews Nov 29, 2026
08c5fb5
test(persistence): check fresh SQLite restore between commits
KyleAMathews Nov 29, 2026
6483d37
test(db): register the fresh SQLite restore replay owner
KyleAMathews Nov 29, 2026
0b68289
docs: expose the pinned Oracle skills to repository agents
KyleAMathews Nov 29, 2026
9129eff
fix(sqlite): preserve row and metadata authority across recovery
KyleAMathews Nov 29, 2026
2fc349b
test(db): judge accepted truncate and peer receipt mutations
KyleAMathews Nov 29, 2026
7ee131d
test(sqlite): judge metadata replay read failures
KyleAMathews Nov 29, 2026
d16017d
test(sqlite): compare unexpected failed recovery receipts
KyleAMathews Nov 29, 2026
fd90403
test(sqlite): cover authority after a missed peer notice
KyleAMathews Nov 29, 2026
5106694
test(sqlite): keep retired replay out of the restarted run
KyleAMathews Nov 29, 2026
f099b58
refactor(sqlite): pass the replay invalidation payload
KyleAMathews Nov 29, 2026
bf1364a
docs: record the changed-function mutation status
KyleAMathews Nov 29, 2026
73271da
test: derive sync metadata authority from history
KyleAMathews Nov 30, 2026
0feec79
fix(sqlite): resolve stored rows and metadata independently
KyleAMathews Nov 30, 2026
813e010
test(sqlite): cover durable metadata clears on reload
KyleAMathews Nov 30, 2026
65e533c
fix(sqlite): preserve accepted rows without a row snapshot
KyleAMathews Nov 30, 2026
794d17c
test(sqlite): observe the receipt after metadata-only validation
KyleAMathews Nov 30, 2026
0c3ba6d
fix(sqlite): keep named metadata through peer reads
KyleAMathews Nov 30, 2026
1e3ac89
fix(sqlite): keep reread authority over older peer metadata
KyleAMathews Nov 30, 2026
126524f
fix(sqlite): keep a storage read in its original sync run
KyleAMathews Nov 30, 2026
533f0b6
test(sqlite): check named metadata independently of row visibility
KyleAMathews Nov 30, 2026
cb7a23a
fix(sqlite): bind metadata authority to accepted writes
KyleAMathews Nov 30, 2026
9825f26
fix(sqlite): preserve write authority during gap recovery
KyleAMathews Nov 30, 2026
a02061f
fix(sqlite): retain named metadata through later replay
KyleAMathews Nov 30, 2026
0ef6855
fix(sqlite): separate live notice dispatch from detailed replay
KyleAMathews Dec 1, 2026
1f7b111
test(sqlite): cover peer reload boundaries and notice order
KyleAMathews Dec 1, 2026
ef20379
test(sqlite): check peer invalidation of paginated demand
KyleAMathews Dec 1, 2026
03d2a80
test(sqlite): preserve seed authority across paginated rereads
KyleAMathews Dec 1, 2026
1240ec8
refactor(sqlite): require explicit reload arguments
KyleAMathews Dec 1, 2026
2baddbc
test(sqlite): check paginated demand after a peer reload
KyleAMathews Dec 1, 2026
e36aec8
test(sqlite): check demand handoff after a gap without replay
KyleAMathews Dec 1, 2026
99367ac
test(sqlite): check targeted row reads across held and retired demand
KyleAMathews Dec 1, 2026
0e4c1b5
test(sqlite): check peer reload authority across claim retirement
KyleAMathews Dec 1, 2026
b970e0a
test(sqlite): check source receipts after a held peer read
KyleAMathews Dec 1, 2026
5676ad7
refactor(sqlite): simplify peer reload read routing
KyleAMathews Dec 1, 2026
f11ab66
test(sqlite): check peer reload boundaries at scope admission
KyleAMathews Dec 1, 2026
059e10b
test(sqlite): check queued peer notices and validation context
KyleAMathews Dec 1, 2026
76b6053
test(sqlite): check source receipts across overlapping baselines
KyleAMathews Dec 1, 2026
9c6b48b
test(sqlite): check validation explicitly requests durable rows
KyleAMathews Dec 1, 2026
223af61
fix(sqlite): retry startup metadata after an eager reset
KyleAMathews Dec 1, 2026
0e24a84
test(sqlite): register Chromium reload histories for oracle replay
KyleAMathews Dec 1, 2026
c28fa42
test(sqlite): fence delayed notices after metadata-only startup
KyleAMathews Dec 1, 2026
79cef1e
refactor(sqlite): remove duplicate peer reload admission checks
KyleAMathews Dec 1, 2026
a883895
Merge remote-tracking branch 'origin/main' into p6-metadata-2303-inve…
KyleAMathews Dec 1, 2026
f496419
test(sqlite): check source progress after reset starts recovery
KyleAMathews Dec 1, 2026
6df5d55
test(sqlite): check delete notices at targeted envelope capacity
KyleAMathews Dec 1, 2026
24d1dcf
test(sqlite): check startup work uses a live cache claim
KyleAMathews Dec 1, 2026
780114d
refactor(sqlite): use one admission check for startup metadata
KyleAMathews Dec 1, 2026
3af97b1
refactor(sqlite): share the replay metadata deletion operation
KyleAMathews Dec 1, 2026
25c8149
fix(sqlite): preserve startup metadata acceptance before cache rotation
KyleAMathews Dec 1, 2026
901b412
fix(db): preserve whole-row sync writes across rebases
KyleAMathews Dec 1, 2026
d859f22
ci: apply automated fixes
autofix-ci[bot] Dec 1, 2026
7c1b62c
fix(sqlite): persist source commits made during peer replacement
KyleAMathews Dec 1, 2026
4073e50
fix(sqlite): tie peer notice delivery to a live subscription
KyleAMathews Dec 1, 2026
ddb0d93
fix(sqlite): track dependencies on the metadata a list reads
KyleAMathews Dec 1, 2026
ccb3d93
test(sqlite): isolate Chromium receiving histories
KyleAMathews Dec 1, 2026
02ed29f
test(sqlite): type delayed coordinator notices
KyleAMathews Dec 1, 2026
8e0e245
fix(sqlite): keep replacement errors out of retired source receipts
KyleAMathews Dec 1, 2026
cd89176
test(sqlite): close the seeded partial handoff gap
KyleAMathews Dec 1, 2026
d67b249
test(db): use typed source messages in the hydration oracle
KyleAMathews Dec 1, 2026
816a666
test(electron): check metadata on the applied row mutation
KyleAMathews Dec 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .agents/skills/oracles-design/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-design
description: Design, write, or change an oracle with @tanstack/oracles. Start from approved potential laws, write the oracle file with its law block and code, choose a model, and build histories that reach the states the law needs. Show the evidence the change needs, and close every gap. Use for a new oracle, an oracle repair, or a production change in owned code. Also use for any change to a model, history grammar, driver, or check.
---

Read `node_modules/@tanstack/oracles/skills/oracles-design/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .agents/skills/oracles-evaluate-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-evaluate-review
description: Evaluate a review of oracle work done with @tanstack/oracles. Keep a lossless ledger of every finding, and check each claim against the code. Extend the oracle so it shows each confirmed bug on unchanged production, then fix production and close the bug class. Use when review findings arrive for a branch that touches an oracle or owned code.
---

Read `node_modules/@tanstack/oracles/skills/oracles-evaluate-review/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .agents/skills/oracles-explore/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-explore
description: Explore an area of a codebase with @tanstack/oracles, or the whole repository. Probe the real API to prove each finding, propose a potential oracle and its potential laws, build it, fix confirmed bugs oracle first, and close gaps until bugs or design questions turn up. The first time in a repository, it also onboards the developer: what the session will do, new words explained as they come up, a walk-through, and the choice to finish setting up. Use when someone is trying @tanstack/oracles, asks where an oracle would help, or asks to explore an area ("explore the clearQueue API").
---

Read `node_modules/@tanstack/oracles/skills/oracles-explore/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .agents/skills/oracles-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-review
description: Review oracle work done with @tanstack/oracles. Challenge whether an oracle enforces its law, whether it is the right law, and whether the work took a shortcut. Use for a new or changed oracle, or a production change in owned code. Also use for a proposed change to what an oracle promises.
---

Read `node_modules/@tanstack/oracles/skills/oracles-review/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .agents/skills/oracles-setup/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-setup
description: Finish setting up a repository for oracles with @tanstack/oracles. Pin the packages, add the lint preset and the Vitest config, write the agent instructions, make the oracle skills findable by coding agents, and run the oracle through the gap check. Use when the developer wants to keep the work of a first session (a commit, or a pull request), when a repository adopts @tanstack/oracles, or when it upgrades its pinned commit. Its install and file-placement sections also cover the minimal setup that a first session needs.
---

Read `node_modules/@tanstack/oracles/skills/oracles-setup/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
6 changes: 6 additions & 0 deletions .changeset/preserve-sqlite-metadata-on-recovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@tanstack/db': patch
'@tanstack/db-sqlite-persistence-core': patch
---

Preserve SQLite Collection metadata during peer reloads and recovery from failed reads. Validate rows accepted during a sync hold even after their on-demand subscription retires.
9 changes: 9 additions & 0 deletions .claude/skills/oracles-design/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-design
description: Design, write, or change an oracle with @tanstack/oracles. Start from approved potential laws, write the oracle file with its law block and code, choose a model, and build histories that reach the states the law needs. Show the evidence the change needs, and close every gap. Use for a new oracle, an oracle repair, or a production change in owned code. Also use for any change to a model, history grammar, driver, or check.
---

Read `node_modules/@tanstack/oracles/skills/oracles-design/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .claude/skills/oracles-evaluate-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-evaluate-review
description: Evaluate a review of oracle work done with @tanstack/oracles. Keep a lossless ledger of every finding, and check each claim against the code. Extend the oracle so it shows each confirmed bug on unchanged production, then fix production and close the bug class. Use when review findings arrive for a branch that touches an oracle or owned code.
---

Read `node_modules/@tanstack/oracles/skills/oracles-evaluate-review/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .claude/skills/oracles-explore/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-explore
description: Explore an area of a codebase with @tanstack/oracles, or the whole repository. Probe the real API to prove each finding, propose a potential oracle and its potential laws, build it, fix confirmed bugs oracle first, and close gaps until bugs or design questions turn up. The first time in a repository, it also onboards the developer: what the session will do, new words explained as they come up, a walk-through, and the choice to finish setting up. Use when someone is trying @tanstack/oracles, asks where an oracle would help, or asks to explore an area ("explore the clearQueue API").
---

Read `node_modules/@tanstack/oracles/skills/oracles-explore/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .claude/skills/oracles-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-review
description: Review oracle work done with @tanstack/oracles. Challenge whether an oracle enforces its law, whether it is the right law, and whether the work took a shortcut. Use for a new or changed oracle, or a production change in owned code. Also use for a proposed change to what an oracle promises.
---

Read `node_modules/@tanstack/oracles/skills/oracles-review/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
9 changes: 9 additions & 0 deletions .claude/skills/oracles-setup/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: oracles-setup
description: Finish setting up a repository for oracles with @tanstack/oracles. Pin the packages, add the lint preset and the Vitest config, write the agent instructions, make the oracle skills findable by coding agents, and run the oracle through the gap check. Use when the developer wants to keep the work of a first session (a commit, or a pull request), when a repository adopts @tanstack/oracles, or when it upgrades its pinned commit. Its install and file-placement sections also cover the minimal setup that a first session needs.
---

Read `node_modules/@tanstack/oracles/skills/oracles-setup/SKILL.md` in full and follow it.
It matches the installed version of `@tanstack/oracles`. If the file is
missing, run `pnpm install --frozen-lockfile` from the repository root and
check again. If it is still missing, report that the package is unavailable.
35 changes: 35 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,41 @@ oracle guide below and a small [instrument library](docs/contributing/instrument
that is also available for other design work. Select instruments as needed;
routine work does not require a full instrument sequence.

<!-- BEGIN @tanstack/oracles (template 4) -->

### Installed oracle skills and gap checks

The root workspace pins `@tanstack/oracles` and its ESLint plugin to the
same commit. Use the skills shipped with that pin:

- Before exploring an oracle or proposing laws, read
`node_modules/@tanstack/oracles/skills/oracles-explore/SKILL.md`.
- Before changing an oracle or production code it owns, read
`node_modules/@tanstack/oracles/skills/oracles-design/SKILL.md`.
- Before reviewing oracle work, read
`node_modules/@tanstack/oracles/skills/oracles-review/SKILL.md`.
- Before acting on review findings, read
`node_modules/@tanstack/oracles/skills/oracles-evaluate-review/SKILL.md`.
- When setting up or upgrading the tools, read
`node_modules/@tanstack/oracles/skills/oracles-setup/SKILL.md`.

Read each applicable skill in full. The checked-in pointers under
`.agents/skills/` and `.claude/skills/` resolve to the installed version.
The package Vitest configs discover oracle tests in
`packages/*/tests/**/*oracle*.test.ts`. Some owners share models and drivers
in other `*oracle*` modules.

Run `pnpm gap-report --package <package-dir> --source <package-relative-source-list> --seed <seed>`
on the owned production files. Rebuild any changed workspace dependencies
before the SQLite gap check, for example `pnpm --filter @tanstack/db build`
after a core edit. The gap runner bundles the dependency's built export.
Keep the seed fixed when comparing reports and retain the final report link
or run identifier in the evidence. A passing Vitest run supplies RED/GREEN
evidence. Run the gap check as well before claiming mutation coverage.
Run `pnpm lint:changed` and typecheck the affected packages.

<!-- END @tanstack/oracles -->

## How oracle work is scored

Every behavior change in an area that an oracle owns has two possible paths.
Expand Down
Loading
Loading