You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh-mode meta writes truncate bodies that quote a board:meta marker (strip_meta leftmost-match bug) #60
Found during dp#51 consumption Task 4 (branch dp51-a1-consumption, spec 2026-08-11-dp51-a1-consumption-design.md §Surprises).
_board.META_RE is \n?<!-- board:meta\n(.*?)\n-->\s*$ with re.S. re.search is leftmost-first and the lazy .*? backtracks across intervening prose to the trailing -->, so on any issue body whose PROSE quotes a <!-- board:meta marker (e.g. documentation about the meta block itself), strip_meta deletes everything from the quoted marker onward — real prose included.
Blast radius: strip_meta → render_body → update_meta — i.e. every gh-mode meta write (branch:, pr:, parent-pin:, relates bookkeeping) silently truncates such a body on its next write. Reproduced: B.strip_meta on a marker-quoting body returned only the text before the quote.
board-body.sh (landed on the dp51 branch) anchors on the RIGHTMOST match and is immune; it's the pattern for the fix. Suggested: make the trailing-block location a shared helper (rightmost walk, byte offsets only) and point strip_meta/render_body at it, with a regression test whose prose quotes a marker.
Fixed on PR #65 (auto-closes on merge). The shape of the fix outgrew the issue's own suggestion: the rightmost walk alone regressed legacy-nested bodies, so the landed rule chooses the opener by INTERIOR CONTENT — a candidate wins iff every line between its opener and the final closer is block-legal under parse_meta's own line model (all 11 splitlines() separators), with a segment-aware fallback that carries pre-grammar blocks through board-body.sh's raw splice untouched. clean_meta closes the write side (single-line values, no marker tokens), validated BEFORE any external write so a refusal can't tear a transition. All consumers share the helper: parse_meta/strip_meta/update_meta, board-body.sh, and board-migrate-gh.sh (the one-shot migration was the worst surviving path). The rule is guarded by a committed property fuzzer — 140k generated legacy bodies, zero divergences, and it reproduces the known divergences of all three superseded formulations, so the next revision gets judged by generation, not hand-reasoning.
Activity
SSFSKIM commentedon Aug 12, 2026
Fixed on PR #65 (auto-closes on merge). The shape of the fix outgrew the issue's own suggestion: the rightmost walk alone regressed legacy-nested bodies, so the landed rule chooses the opener by INTERIOR CONTENT — a candidate wins iff every line between its opener and the final closer is block-legal under
parse_meta's own line model (all 11splitlines()separators), with a segment-aware fallback that carries pre-grammar blocks throughboard-body.sh's raw splice untouched.clean_metacloses the write side (single-line values, no marker tokens), validated BEFORE any external write so a refusal can't tear a transition. All consumers share the helper:parse_meta/strip_meta/update_meta,board-body.sh, andboard-migrate-gh.sh(the one-shot migration was the worst surviving path). The rule is guarded by a committed property fuzzer — 140k generated legacy bodies, zero divergences, and it reproduces the known divergences of all three superseded formulations, so the next revision gets judged by generation, not hand-reasoning.Merge pull request #245 from SSFSKIM/sweep-api-followups