IF Commons GitHub

AnyFS SQL: conformance

0006Active

0006-sql-conformance · owner if · domain commons

Requirements

FR-001checkpassing

The store MUST pass every case of the conformance suite of AnyFS that its capabilities name, on SQLite (the module of the runtime and the other one), on PostgreSQL in PGlite and on DuckDB, each a real engine.

Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/conformance.test.ts

Proved by: anyfs-sql/suite/conformance.test.ts

Tests: passed: suite/conformance.test.ts the store passes every case of the suite its capabilities name on SQLite, the real engine,; passed: suite/conformance.test.ts the store passes the same cases on the other SQLite module where the runtime has one (node

FR-002checkpassing

The port of libSQL MUST pass the same cases through a fake of the client's shape over a real SQLite, and the port of pg through a fake of the client's shape over a real PostgreSQL in PGlite, each named as a fake in its test, because the client needs a server this environment does not run.

Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/conformance.test.ts

Proved by: anyfs-sql/suite/conformance.test.ts

Tests: passed: suite/conformance.test.ts the port of a libSQL client passes the same cases through a FAKE of the client's shape ove

FR-003checkpassing

The laws of the bridge MUST hold between the store and the stores of memory and of a folder, and a sync from a folder into the store and back MUST give the folder again.

Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/conformance.test.ts

Proved by: anyfs-sql/suite/conformance.test.ts

Tests: passed: suite/conformance.test.ts a sync from a folder into a database and back gives the folder again, and a sync applied a; passed: suite/conformance.test.ts every law of the bridge holds between a store in memory or in a folder and the store of a

FR-004checkpassing

Two processes writing one SQLite file MUST be safe: of two that write no object at one path exactly one wins, and every write of each ends.

Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/conformance.test.ts

Proved by: anyfs-sql/suite/conformance.test.ts

Tests: passed: suite/conformance.test.ts two processes writing one SQLite file are safe: of two that write no file at one path exac

Acceptance scenarios

  1. Given a fresh database of each engine, When the suite runs, Then every case passes, per FR-001.
  2. Given a folder synced into the store and back, When the folders are compared, Then they are equal, per FR-003.
  3. Given two processes, When both write no object at one path, Then one wins, per FR-004.

Out of scope

  • A server of PostgreSQL, of libSQL or of DuckDB over a network.

Edge cases

  • The tests of the drivers' shapes name their fakes (FR-002).

Assumptions

Open questions

  • None.

Key entities

  • Port, Dialect, Layout, Revision.

Success criteria

SC-001success criterion

Every behaviour is tested on the real engines in memory or in temporary folders, with no network and no real time.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

Titles, headings, exports, tables, columns and requirements. Esc closes.