fix(board): an empty held-back set renders a value, not a dangling colon
With nobody held back, fokus_utenfor= ended at a bare colon. sed could not supply the placeholder it looked like it was supplying: given an empty string there is no input line for the substitution to run on, so it silently did nothing. That is the shape command_missing= exists to keep out of this format - a field whose value carries nothing. Zero repos mentioning a slug without declaring it is a real answer and now looks like one. board-selftest 113 -> 114. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186vKCzuUEN5WcJB82kddzF
This commit is contained in:
parent
3fe159e75d
commit
040480890d
2 changed files with 15 additions and 1 deletions
|
|
@ -775,6 +775,14 @@ check "every surviving block carries its own evidence (fokus_treff=)" "$ev_ok"
|
|||
printf '%s\n' "$FDEMO" | grep '^fokus_treff=' | grep -q 'demo-topic'
|
||||
check "the per-block evidence names the slug and its declared status" $?
|
||||
|
||||
# Zero held back is a real answer and must LOOK like one. A trailing ": " with
|
||||
# nothing after it is the same defect class the format already legislated
|
||||
# against for command=: the shape of a value carrying nothing. Reached via a
|
||||
# slug that nobody mentions without declaring.
|
||||
FOTHER="$("$BOARD" --roots "$ROOT" --plan --focus other 2>/dev/null)"
|
||||
printf '%s\n' "$FOTHER" | grep '^fokus_utenfor=' | grep -qE ':[[:space:]]*$'; [ $? -ne 0 ]
|
||||
check "an empty held-back set renders a value, never a dangling colon" $?
|
||||
|
||||
# Ambiguity widens and is named. "topic" is a hyphen-part of two declared
|
||||
# slugs; picking one silently would be the cutoff lying about its own size.
|
||||
FBOTH="$("$BOARD" --roots "$ROOT" --plan --focus topic 2>/dev/null)"
|
||||
|
|
|
|||
|
|
@ -610,13 +610,19 @@ plan() {
|
|||
"$((fp_before - $(awk 'END{print NR+0}' "$pf")))" "$fp_before"
|
||||
fp_hb="$(focus_heldback | sort -u)"
|
||||
fp_hbn="$(printf '%s' "$fp_hb" | grep -c . | tr -d ' ')"
|
||||
# Nobody held back is an answer, and it has to LOOK like one. sed cannot
|
||||
# supply the placeholder: with an empty string there is no input line for
|
||||
# a substitution to run on, so the field would end at a bare colon - the
|
||||
# exact shape command_missing= exists to keep out of this format.
|
||||
fp_hbl="$(printf '%s' "$fp_hb" | tr '\n' ' ' | sed 's/[[:space:]]*$//')"
|
||||
[ -n "$fp_hbl" ] || fp_hbl="(ingen)"
|
||||
# "nevner", never "dekker": this states what was found in a file, and
|
||||
# says which files were searched rather than implying it searched repos.
|
||||
# One repo in the real measurement carries its strongest evidence in a
|
||||
# README, which this scan never opens.
|
||||
printf 'fokus_utenfor=%s repo nevner %s uten markorlinje: %s\n' \
|
||||
"$fp_hbn" "$(printf '%s' "$FOCUS_SLUGS" | sed 's/[[:space:]]*$//' | tr ' ' ',')" \
|
||||
"$(printf '%s' "$fp_hb" | tr '\n' ' ' | sed -e 's/[[:space:]]*$//' -e 's/^$/-/')"
|
||||
"$fp_hbl"
|
||||
printf 'fokus_rekkevidde=sokt i %s STATE.md - board leser ingen andre filer\n' "$fp_state"
|
||||
else
|
||||
# No declared slug matched. The full plan is printed: the driver forwards
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue