DIS-081: caller-supplied commit order; commits[] append-only

Now
OPEN

DIS-044 made the RGA tie-break the merged commit INDEX, and wmerge_commits (dog/WEAVE.c:645-687) infers that index by re-deriving a topo order from two sorted lists — an O(n^2) ready-test plus a smaller-hashlet tie-break for concurrent heads. The weave stores no parent edges by design (dog/WEAVE.h:133-134): graf owns the DAG and already walks the closure in topo order (be/shared/weave.js build). So libdog reconstructs DAG knowledge it deliberately does not keep, from a shadow of it, on every merge. The cost is a full renumbering: WEAVEMerge permutes commits[] and remaps every token's ins/rms through ra/rb, so an index is not a stable name across a merge. Move the ordering contract to the API and the table becomes append-only.

Input

Context

The weave's commit table serves two roles that only one of them needs order.

Goals

Specify the order as an API contract, then make the table append-only.

Constraints

The contract moves outward, so the failure mode moves outward with it.

WIP

Design decisions

Split identity from rank; the caller owns rank.

TODOs

Callers first, WEAVE second.

Blockers and bummers

Outcome