diff:<largefile> silently EMPTY — WEAVEEmitFull outtoks overflowbe diff:<file> on a large file produces NO output and exits 0. Root cause:
WEAVEEmitFull carves a fixed 65536-token buffer and accumulates the UNION of
base+wt weave tokens into one hunk; when that union exceeds 65536 the u32bFeed1
returns NOROOM, which is swallowed (ret=fo; goto cleanup) → zero hunks emitted,
exit 0. Real bug. Split from DIFF-005's bare-diff re-investigation. Method:
Issues.
$HOME/todo/PTR-005. be diff:sniff/GET.c (and PATCH.c,
POST.c) → EMPTY; smaller files render fine.WEAVEEmitFull carves a_carve(u32, outtoks, 1UL << 16) = 65536
(graf/WEAVE.c:1030) and accumulates the union of base+wt tokens into ONE hunk;
the only flush (WEAVE.c:1092) is BYTE-based at WEAVE_FULL_HUNK_MAX (1 MB),
which a ~95 KB file never reaches. Once token count > 65536, u32bFeed1(outtoks,…)
returns NOROOM → ret=fo; goto cleanup (WEAVE.c:1099-1101) → no hunk, empty
output, NOROOM swallowed to exit 0.be diff: because WEAVEEmitDiff flushes each
small hunk separately and never accumulates the whole file../build-debug/bin/be (relative argv[0]) makes the sub-recursion's
execvp fail after chdir into the sniff mount (beagle/SUBS.c:331); absolute-path
invocation removes that message but the diff is STILL empty — the overflow is the
real cause.be diff:<largefile> renders its full-file diff (or a bounded one) instead of
silently emitting nothing; the NOROOM is never swallowed into a success exit.WEAVEEmitFull by TOKEN-count too (not only the
1 MB byte cap) so the buffer never overflows; (2) stop swallowing NOROOM — propagate
it so a truncated/failed diff is an error, not a silent exit 0.WEAVEEmitDiff) would INCIDENTALLY
make GET.c/PATCH.c/POST.c render, masking this — but the swallowed-NOROOM and missing
token-flush should be fixed regardless.be diff:sniff/GET.c empty; confirm token count > 65536 and NOROOM at
WEAVE.c:1099.WEAVEEmitFull + propagate NOROOM (no swallow).a_carve(u32, outtoks,
1UL << 16) (WEAVE.c:1030), flush still BYTE-only (WEAVE_FULL_HUNK_MAX,
WEAVE.c:1092/1105), u32bFeed1 NOROOM → ret=fo; goto cleanup (:1099-1101);
no DIFF-007 commit in be log.