DOG-012 HIGH: BRAM fallback double-counts region; alignment + recursion hardening

dog/BRAM.c's bram_region (BRAM.c:114-131) silently corrupts the edit list on an inner-diff failure. When BRAMu64s fails (NOROOM/budget), it appends a wholesale DEL(olen)+INS(nlen) — but the failed recursion has usually ALREADY appended part of the region into the caller-owned edl (BRAMu64s rewinds BASS, never the edl gauge; failure can hit mid-way through bram_core steps 4/5, :301-311). The region is double-counted, bram_region returns OK, so the edit list no longer sums to the token counts and the weave/merge layer applies a WRONG diff with no error. The rollback is subtle: DIFFu64AddEntry coalesces into the previous entry (abc/DIFFx.h:12-24), so a fix must snapshot BOTH edl[0] and the trailing entry's value before recursing and restore both before the fallback. Method: Issues.

Input

Context

Goals

Constraints

WIP

TODOs

Blockers and bummers

Outcome