CODE-068: floorRev is O(rounds x reps x revs): linux MAINTAINERS never finishes

Now
OPEN
Sev
HIGH
Rep
///bee
Ask
gritzko
Rev
///bee#8cb69a0
See
BEE-005
See
CODE-056

Input

Context

index/dag.js:131:~c recomputes revAncestors per rep per round and intersects full sets. Against the real ~/src/linux lane, MAINTAINERS (797 reps, 21470 revs) did not finish in 900 s; kernel/sched/core.c (60 reps) takes 2.36 s. The 797 reps are mostly ancestors of one another. The retry bound round <= need.length + 1 grows with need, termination rests on the floor strictly descending, need is never deduped and the {floor:null, above:[]} return is unreachable. Found in the 2026-09-18 index review.

Goals

Reduce reps to their maximal elements first, then one descending sweep over rev numbers with a reachability mask; a single fixpoint over a parent-closed set with a stated failure.

WIP

TODOs

Design decisions

  1. The floor comes off ONE descending sweep over the rev numbers, which are topological. A mask of 32-bit words per rev says which reps reach it; an open count says how many revs the sweep has reached but not yet read. The first rev every rep reaches with nothing else left open is the floor, and the fold above it is parent-closed by construction, so the retry rounds and the per-round ancestor sets are gone.
  2. reps is deduped once, into the bit assignment: a rep named twice is one bit. The maximal-rep reduction the goal asks for belongs to repsOf (CODE-056's frontier), not here -- over the union of TWO tips' reps it would raise the floor above a tip's own rep and the weave would lose that view.
  3. The unreachable {floor:null, above:[]} is replaced by a STATED failure: when the revs share ancestors but no rev holds the whole fold under it (a path re-rooted below the common rev), the floor is null, above is everything and one line says so. The old code answered such a floor and folded the leak over its seed without a word.
  4. On 400 random single-root DAGs the new answer equals the old one rev for rev; on linux kernel/sched/core.c both say floor 1508, above 442 -- 2674 ms against 8 ms.

Outcome