0047 — A Matrix block moves by its Driver's closed rows, and only if a person linked it

The problem

Matrix shows each person's plate. It has one column per person for their week and at most 5 blocks in it. A block shrinks as its done% rises. On day one only a person moved a block (matrix half, matrix done), so a block went stale whenever the person forgot. Gera turned down two ways to keep blocks current:

Options considered

The decision

  1. The progress number is the finish line's own count. done% = rows merged or shipped ÷ rows not cancelled, using dock-finisher's DONE and SET_ASIDE sets. When the Driver owns a group of a shared dock, only that group is counted (lib/docks.group_of). When every row is closed the block gets done 100 and leaves the board. With a row still open it stays at 99 or below, never 100. Matrix and the finisher therefore cannot disagree about how far a Driver has got. Every row weighs the same, so a large row and a small one move the block equally. That is the price of a number nobody can argue with.
  2. The watcher never puts anything on a plate. It reads the board and PATCHes, by id, only blocks whose ref is driver:<task>. A person sets that link with matrix link <item> <task>. The watcher never POSTs. What is on a plate, its size and its 4-word name stay a person's choice.
  3. A parked Driver gets no write. This covers a terminal task state, and a task.json untouched for 48 h while rows are still open. The block then fades after 24 h, which shows truthfully that the work has stopped. A write would stamp the block fresh and hide that.
  4. It is a script with three triggers, and sessions are not involved:
    • updater starts one detached pass after every successful run, i.e. right after a merge writes its ref. It never waits on the pass, so the updater's exit code cannot depend on Matrix.
    • A 6 h launchd safety net, co.propflow.matrix-watcher, installed as a system daemon with fleet-daemon.
    • matrix sync, run by hand.

Consequences

Built in PropFlow-Technologies/matrix #3 (upsert by ref), #4 (matrix link / unlink / sync) and PropFlow-Technologies/local-bin #472 (matrix-watcher, the updater nudge, the plist).