fix(board): read emphasis on the status token, not only on the slug
The marker reader accepted **slug**: done and missed slug: **done**. That was never a rule - it was whichever example happened to be in front of us when the regex was written. The second form is in live use, and it makes a repo that HAS declared look silent to --focus, which is the exact failure the held-back report exists to surface. Found by acting on the report's own output instead of reading it: enumerating the held-back population turned up a repo whose declaration we were dropping ourselves. The report blamed the repo; the defect was here. The evidence field reports the status unwrapped - the emphasis is markdown the operator typed, not part of the token, and "**done**" in a key=value field reads as a value. board-selftest 114 -> 116. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186vKCzuUEN5WcJB82kddzF
This commit is contained in:
parent
ecbb34ae48
commit
402597b1e5
2 changed files with 31 additions and 2 deletions
|
|
@ -419,8 +419,12 @@ fi
|
|||
# measurement behind this feature was invisible to exactly that grep.
|
||||
FOCUS_STATUS='planned|in-progress|partial|blocked|deferred|done|not-applicable'
|
||||
|
||||
# The emphasis is optional on BOTH halves. Accepting `**slug**: done` but not
|
||||
# `slug: **done**` is not a rule, only whichever example happened to be in front
|
||||
# of us - and the second form is in live use, where it makes a repo that HAS
|
||||
# declared look silent.
|
||||
focus_marker_re() {
|
||||
printf '^[[:space:]]*[-*]?[[:space:]]*\**`?%s`?\**:[[:space:]]+(%s)([[:space:]]|$)' \
|
||||
printf '^[[:space:]]*[-*]?[[:space:]]*\**`?%s`?\**:[[:space:]]+\**(%s)\**([[:space:]]|$)' \
|
||||
"$1" "$FOCUS_STATUS"
|
||||
}
|
||||
|
||||
|
|
@ -473,7 +477,9 @@ focus_evidence() {
|
|||
for fe_s in $FOCUS_SLUGS; do
|
||||
fe_line="$(grep -m1 -E "$(focus_marker_re "$fe_s")" "$1/STATE.md" 2>/dev/null)"
|
||||
if [ -n "$fe_line" ]; then
|
||||
fe_st="$(printf '%s' "$fe_line" | sed -E "s/.*:[[:space:]]+($FOCUS_STATUS).*/\1/")"
|
||||
# Reported unwrapped: the emphasis is markdown the operator typed, not
|
||||
# part of the token, and "**done**" in a key=value field reads as a value.
|
||||
fe_st="$(printf '%s' "$fe_line" | sed -E "s/.*:[[:space:]]+\**($FOCUS_STATUS)\**.*/\1/")"
|
||||
printf '%s: %s\n' "$fe_s" "$fe_st"
|
||||
return 0
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue