fix(board): FILENAME== the focus-filter join, matching the file's own rule
F12: a third NR==FNR survived at the focus-filter join in plan() (fp_names x pf), next to two comments that already state this file's rule -- never by NR==FNR. Measured before fixing: unlike the two prior instances, this join has no third file whose lookup table a misroute could corrupt, and FOCUS_SLUGS is provably a subset of what focus_slugs() finds in the same $RECORDS focus_declares() re-checks -- so fp_names cannot be empty while the filter applies, and even forced empty the old and new form produce identical output. No reachable defect to pin behaviourally; the fix closes the file's own stated invariant instead. Pinned structurally in selftest section 21: no live NR==FNR outside a comment, with a known-positive control proving the filter can still find one. board-selftest: 239/239 (was 237). coord/route/orders/guard unchanged and green (220/69/99/40), npm test 11/11. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YkJ1rKh5YNfVUr5UDKpfh
This commit is contained in:
parent
6b26b8e94b
commit
2928c28044
3 changed files with 62 additions and 2 deletions
|
|
@ -1192,7 +1192,7 @@ plan() {
|
|||
[ -n "$fp_d" ] && [ -f "$fp_d/STATE.md" ] || continue
|
||||
focus_declares "$fp_d" && printf '%s\n' "$fp_n"
|
||||
done > "$fp_names"
|
||||
awk -F'|' 'NR==FNR{keep[$0]=1;next} keep[$4]' "$fp_names" "$pf" > "$fp_kept"
|
||||
awk -F'|' -v NAMES="$fp_names" 'FILENAME==NAMES{keep[$0]=1;next} keep[$4]' "$fp_names" "$pf" > "$fp_kept"
|
||||
/bin/rm -f "$fp_names" 2>/dev/null
|
||||
mv "$fp_kept" "$pf"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue