CODE-056: repsOf: the WALK_CAP truncates silently, once per path per tip

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

Input

Context

index/dag.js:103:~c with :12 WALK_CAP (65536) stops the ancestor walk and says nothing. On /src/linux drivers/gpu/drm/i915/i915_drv.c (deleted at HEAD, 1458 revs) gets 0 reps at the default cap and 27 at 400k: zero reps drops the path into the degraded empty-seed fold, and a PARTIAL truncation is worse — a wrong floor and spurious hunks with no message. The walk is also redone per path per tip with no parentsOf memo (375 ms per capped walk on linux, 75 s before any folding for a 100-path diff); view/status.js:223:vX,379 builds full ancestors sets through the same cap. Found in the 2026-09-18 review.

Goals

One commit-DAG walk per diff serving every path, stopping at the frontier of found reps rather than at a global commit count, and a loud note when a cap does bite.

WIP

TODOs

Design decisions

  1. The reps walk gets a bound of its own, REP_CAP (2^21), apart from WALK_CAP: it stops at the FRONTIER of the revs found, so the bound is a brake and not the rule. Only a commit the walk EXPANDS spends it, and past it the queue is still read for revs: a bite costs depth, never a rev already in hand.
  2. A bite is io.log'd and left on the result as capped, so the empty-seed fold in index/weave.js:203:KB is never silent again.
  3. parentsOf memoises its CPAR rows per index handle (a WeakMap), so one diff walks the commit dag once for every path it folds.
  4. repsOf answers the MAXIMAL revs it found, not every one: a rev another found rev descends from already rides in that one's closure, so it stands for nothing of its own. On linux that is 345 -> 28 reps for i915_drv.c, 4045 -> 107 for MAINTAINERS. CODE-068 plans the same reduction inside floorRev; with this one in repsOf, that half of CODE-068 has nothing left to do.

Blockers and bummers

Outcome