Beagle SCM
BRO-042 DONT: bro status click fails to OPEN an unparseable file — must refold with libdog's plain-text tokenizer
Context
Incident 2026-07-30 in //PATCH-025: after a trunk get stored a token-level <<<</||||/>>>> conflict render into verbs/get/get.js (markers glued MID-LINE, file no longer valid JS), clicking that row in the bro status view fails to open the file. A conflicted file is unparseable BY DESIGN until resolved — every view must still open it.
- Status routes a
v/x/! row click to diff: (be/views/status/status.js:327); cat:/blob: already degrade to no-markup on tok.parse throw (be/views/cat/cat.js:192, be/views/blob/blob.js:159) — find the exact failing call by pty repro, do not guess.
- The fallback ALREADY EXISTS: be/views/diff/diff.js:132-139 (DIFF-015/DOG-021) refolds with ext
"" = libdog's plain-text tokenizer (TXTT) when the jab binding reports a fold failure ("out full" masks lexer defects too).
- Adjacent, do not conflate: DIFF-019 (
hunk.render: out full on big scoped diffs) can ALSO kill the same click — if the repro trips that instead, report, don't fix it here.
- Repro material: the mush bytes live in
//PATCH-025 verbs/get/get.js (read-only evidence — copy bytes out, never write there).
Goals
- RULING (gritzko): on tokenizer failure ANY bro file open falls back to libdog's plain-text tokenizer — IN LIBDOG, NEVER a new/hand-rolled tokenizer.
- Pty-click repro FIRST: bro status over a tree with an unparseable .js file, click the row — view fails; after the fix the file opens as plain text. The repro must FLIP with the fix.
- Permanent test with a committed unparseable-js fixture.
Constraints
- Fix at the existing call site(s), mirroring the diff.js:132-139 refold pattern; no second heuristic, no new tokenizer, no parallel render path.
- No other tests edited; put + report only, per work.
WIP
TODOs
Outcome
- NO-REPRO as a tokenizer failure — the fallback ALREADY EXISTS and works end-to-end: pty click on a small genuinely-unparseable .js opens fine via the DIFF-015 ext-"" refold ("cannot tokenize ... — diffing as plain text").
- The incident's click death is DIFF-019: pty click on the 82KB mush dies
err: Error: hunk.render: out full AFTER a successful fold (the mush is token-legal to JST); a VALID 82KB file with a 3-line edit dies identically — size, not parseability.
- Root cause moved to DIFF-019 (in-C cap,
jab/dog/HUNK.c:1308); no fix, no files put; pty driver + fixtures preserved in //BRO-042/scratch/.