fix(board): anchor the NESTE marker to the heading form

The awk reader matched /NESTE/ unanchored, so any prose line that merely
mentioned the word (not just the real ## NESTE heading) set the flag and the
excerpt became whatever line followed the false match, not the real next
step.

Closed by operator decision 2026-08-02: one anchor form for all repos,
^#+[[:space:]].*NESTE. Measured 26/27 repos already use the heading form;
the one exception now renders "(tom NESTE-blokk)" instead of a misleading
fragment, which is the intended, honest failure mode until it switches
over - already flagged directly and on the same shape as the existing
"MERK: N repo mangler board-linje" line.

board-selftest 116 -> 118 (new fixture proves the false-match failure before
the fix, both checks green after).
This commit is contained in:
Kjell Tore Guttormsen 2026-08-02 20:51:13 +02:00
commit 917a902172
2 changed files with 25 additions and 2 deletions

View file

@ -231,9 +231,11 @@ printf '%s\n' "$REPOS" | while IFS= read -r d; do
[ -n "$cost" ] || cost="?"
# First content line under the NESTE heading: skip blanks, HTML comments and
# the heading itself; strip markdown bold/bullet noise.
# the heading itself; strip markdown bold/bullet noise. Anchored to the
# heading form (measured 26/27 real repos, decided 2026-08-02) so a prose
# line that merely mentions the word is never mistaken for the marker.
neste="$(awk '
/NESTE/ { flag=1; next }
/^#+[[:space:]].*NESTE/ { flag=1; next }
flag {
if ($0 ~ /^[[:space:]]*$/) next
if ($0 ~ /^[[:space:]]*<!--/) next