The data of the two mergeable tables MUST be what a dump carries (sqlite3 FILE ".dump --data-only TABLES", one INSERT for each row and no schema), the library MUST write the same text (dumpText) and the replay of the dumps of two to five databases into a new database MUST give the state the databases reach by exchanging deltas, whatever the order of the dumps.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dump.test.ts
A replay MUST be idempotent and independent of order: replaying a dump again, and dumps that overlap, MUST add no row and no blob and MUST leave the state as it was.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dump.test.ts
Tests: passed: suite/dump.test.ts the dumps of two to five databases made by the real sqlite3 and replayed into a new databa; passed: suite/dump.test.ts replaying a dump twice, and dumps that overlap, change nothing the second time: the counts
A dump MUST be readable by the real sqlite3 into a database made by the library with no code of the library involved, and MUST give back the files, their bytes (text of any language, binary, empty) and a database that verifies.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dump.test.ts
A dump that is tampered with MUST be found by the check of the rows, a dump of a replica the database does not trust MUST be refused (by the library and by the real sqlite3 through the trigger) with the whole replay undone, and a text that is anything but plain inserts of literals into the two tables MUST be refused and change nothing.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dump.test.ts
A dump made before a delete and replayed after it MUST bring nothing back, and a replay MUST never write a table that is local to the database (its facts, its trust, its epochs, its caches).
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dump.test.ts
Ten thousand files MUST be dumped and merged in seconds, and a folder of dumps named by replica that replicas write and read, and the merge of sorted dumps by Git with the union driver, MUST each give the union.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dump.test.ts
Tests: passed: suite/dump.test.ts ten thousand files are dumped by the real sqlite3 from each of two databases and merged in; passed: suite/dump.test.ts two branches of Git that each add rows to a sorted dump merge with the union driver into t; passed: suite/dump.test.ts two replicas that each write a dump to a shared folder, named by their identity, and take
Every behaviour is tested on the real engine and, where a program of the system is used (sqlite3, git), on the real program, in temporary folders, with no network.