Apply a bounded group
remediate is a mutation that takes one order’s key and a reason. One
enclosing mutation calls it once per order. The calls join the transaction
and see the writes of the calls before them; a refusal in any call refuses
the whole group.
bijection/groups.ts
Call it and read your write
once makes a retry of the same group answer the original result. Pass a
committed result’s version as seen so the next read observes it.
Process a large selection in chunks
Keep a fact per batch. Each chunk is one mutation that reads a bounded selection, applies it and submits itself for the next chunk until nothing is left:bijection/chunks.ts
once names exactly one next
chunk. orders declares index: [["state"]] to serve the selection. To
walk a selection the chunks do not change, use
ctx.page(selection, { size, cursor }) and keep next in the batch fact.