The plan of a merge between two stores that have merge MUST hold the vector of each, what each would take (rows, blobs, bytes and the identity of the delta) and a hash of all of it, and planning MUST change nothing in either store.
Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/merge-mode.test.ts: the requirement
Applying a merge MUST need the hash of its plan; without it the apply MUST be refused as unapproved, and where the stores have changed since the plan was made the apply MUST be refused as stale and MUST change nothing.
Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/merge-mode.test.ts: the requirement
The rails of a merge, a most of rows and a most of bytes for what one store takes at once, MUST refuse a plan that is over them, naming the store and the amount.
Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/merge-mode.test.ts: the requirement
The report of a merge MUST give what each store said of the delta it took (applied, duplicate, deferred or refused with the reason), so that a store that does not trust the other is told so and the other direction is still taken, and MUST say whether the two vectors are equal afterwards.
Enforced (check): .github: cd commons/anyfs-bridge && bun run verify — suite/merge-mode.test.ts: the requirement
Given two stores of different rows, When a merge is planned and applied with its hash, Then both hold all the rows and a second plan is empty, per FR-001 to FR-003.
Given a plan and then a write to one of the stores, When the plan is applied, Then it is stale and nothing changes, per FR-002.