TanStack

Content temporarily unavailable

PR #2069 native SQLite oracle review follow-up

Reviewed oracle code: b42b94b73ddba79a6a87fa93e71787dd126ea1bd. Two independent oracle reviewers read the preceding b4d57ced6 receiver and found three enforcement gaps, not production defects. This append-only record corrects the earlier native DDL audit.

FindingWhy the prior check could pass wronglyCorrection and observation
Recovery-settlement cutvi.waitFor could observe a late DDL repair after recovery returned.The registry and physical index are read synchronously after the recovery promise settles. A later repair cannot satisfy this checkpoint.
Claimed physical tableLooking up sqlite_master by index name alone allowed the expected name on a different table.The present-index branch now requires both that exact name and tbl_name = createPersistedTableName(current physical ID, 'c'). The absent branch requires no index with that name.
Failure fidelityConstruction and signature validation preceded the cleanup guard; Promise.allSettled and a broad cleanup catch discarded secondary failures.Construction and validation now occur inside the guard. Cleanup releases both holds, observes recovery rejection with a bounded checkpoint, preserves distinct secondary failures, closes SQLite, and retains the original failure.

The reference relation remains: at recovery settlement, the final public Collection index declaration predicts whether SQLite has an active index on the current claimed row table. The two legal schedules still exercise removal before late ensure and re-add before a held reconciliation removal. The first mutant skipped removal after late ensure; the second skipped re-ensure after re-add. Both failed the durable registry comparison at the earlier code commit. The stronger current comparison additionally rejects a wrong target table or a repair that occurs only after recovery settles by construction. A separate wrong-table production mutant was not run; this remains a calibration limit.

RequirementOutcome at the follow-up code commit
ORC-001Collection index declaration is authoritative for these two Node SQLite schedules; other hosts and arbitrary timing remain outside the claim.
ORC-002Expected presence and table identity come from the public declaration and current claimed storage ID, not the reconciliation branch or SQLite registry state.
ORC-003Opening and local prose identify the law, legal schedules, real adapter path, public/durable observations, and exact recovery-settlement comparison.
ORC-004Not applicable: two fixed histories, no generated grammar claim.
ORC-005The real wrapper and node:sqlite perform DDL; the final check sees the correct registry state and physical table at recovery settlement.
ORC-006The two reconciliation mutants failed at the intended durable assertion; no wrong-table mutant was run.
ORC-007Not applicable: no important generated property changed.
ORC-008Not applicable: no stateful reference-model state changed.
ORC-009Collection declaration, claim, persisted cache generation, and recovery follow the glossary; the transaction queue is test scheduling only.
ORC-010The guard covers construction through teardown, releases held calls, and preserves secondary recovery/cleanup failures beside the primary mismatch.
ORC-011Real SQLite DDL is the second formulation for the controlled Map schedule, with host-specific receiving work still open.
ORC-012This record names the exact corrected code commit, the findings, and outcomes for every numbered requirement.
ORC-013Absent and re-added declarations distinguish the two legal final states. Each reconciliation mutant fails its neighboring history.
ORC-014The controlled order is reproduced at the wrapper-to-SQLite boundary. Browser, Electron, and other host scheduling remain unproved.

The corrected owner passed all 89 tests. TypeScript, changed-file ESLint, and Prettier passed. The full SQLite persistence package passed 965 tests and one existing todo before this test-only correction; the package was not rerun afterward because the corrected owner, containing every changed test, passed. Production code remains unchanged.