Fix scroll off-by-one in synthetic flood; guard repro against buffer scroll
generateColoredAsciiFlood emitted a trailing \r\n after its final cell, so a flood whose last line lands on the bottom row scrolled the screen. In the alt-buffer repro this destroyed the pinned header row in the BUFFER, making the 255/255 signature diff a content change, not renderer corruption. The single-terminal merge path is actually healthy: with the scroll removed the same 30-chunk merge-heavy workload renders the header with zero drift. - generateColoredAsciiFlood: no linefeed after the final cell - WebglReproExperiment: now a green guard; asserts row-1 buffer text first so a content bug can never masquerade as corruption again - WebglVisual: accurate comments; erase rewritten lines so leftover prefill text doesn't look like corruption - WebglSingleTermStress: replace stale EXPECTED-RED comment (test passes)
This commit is contained in:
@@ -177,6 +177,11 @@ export function generateMixedGlyphBlock(seed: number = 1, lines: number = 10, co
|
||||
* Emits ASCII letters/words each in a distinct 256-color foreground+background.
|
||||
* Every (char,color) pair is a unique atlas glyph, so this fills/merges atlas
|
||||
* pages with realistic English text (no CJK). Deterministic.
|
||||
*
|
||||
* No `\r\n` is emitted after the final cell: when the flood's last line lands on
|
||||
* the terminal's bottom row a trailing linefeed would scroll the screen (in the
|
||||
* alt buffer this destroys pinned reference rows and makes glyph-integrity
|
||||
* assertions fail for buffer-content reasons rather than rendering reasons).
|
||||
* @param cells Number of colored cells to emit.
|
||||
* @param offset Color offset so consecutive chunks use new color combos.
|
||||
*/
|
||||
@@ -188,7 +193,7 @@ export function generateColoredAsciiFlood(cells: number, offset: number = 0): st
|
||||
const fg = (offset + i) % 256;
|
||||
const bg = (offset + i * 7) % 256;
|
||||
out += `\x1b[38;5;${fg}m\x1b[48;5;${bg}m${ch}`;
|
||||
if ((i + 1) % 78 === 0) { out += '\x1b[0m\r\n'; }
|
||||
if ((i + 1) % 78 === 0 && i + 1 < cells) { out += '\x1b[0m\r\n'; }
|
||||
}
|
||||
return out + '\x1b[0m';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user