test(board): pin the "field inserted before neste" class; 16 of 16 mutants die
An independent review ran 16 mutants of the PLAN column against the 461 board checks and 5 survived: - --row taking neste from a stale index (neste=5d|...) - --inbox-plan taking neste from a stale index (neste=5d) - the no-STATE.md record one field short (plan=(ingen STATE.md)) - Nd measured behind NOW instead of behind the last commit - the '?' branch (a plan with no commit) rendered as '-' Section 34 part 8 adds a fixture for each: a NESTE with a '|' inside, pinned exactly in --row and --inbox-plan; a repo with no STATE.md; a repo whose last commit is 30 days old, so the two definitions give different numbers; a repo with a plan and no commit. Rebuilt from this tree and run against the full suite: 16 of 16 mutants now fail it. The same fixtures exposed two defects, fixed here: - --inbox-plan took neste as ONE field and cut the prose at its first '|' (also in 0.34.0); it now takes that field onward. - a symlinked PLAN.md was aged by the link's own mtime; it now uses stat -L, so the plan's age is the target's. Docs: CHANGELOG no longer says "field 17 onward" (the index is 18) and now records the no-STATE.md record fix and the --inbox-plan fix; README's requirement says macOS, since board.sh uses BSD stat and renders nothing under GNU stat. board-selftest 461 -> 478 (badge 978). Suites: coord 257, board 478, route 73, orders 116, guard 54; npm test 12/12, run after git add. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
87fb78334e
commit
6f4908a5dc
5 changed files with 145 additions and 15 deletions
|
|
@ -838,7 +838,9 @@ printf '%s\n' "$REPOS" | while IFS= read -r d; do
|
|||
plancol="-"
|
||||
for pl_f in "$d"/PLAN.m[d]; do
|
||||
[ "${pl_f##*/}" = "PLAN.md" ] && [ -f "$pl_f" ] || continue
|
||||
pl_m="$(stat -f %m "$pl_f" 2>/dev/null)"
|
||||
# -L: the PLAN's age is the target's mtime; a symlink's own mtime is only
|
||||
# when the link was made.
|
||||
pl_m="$(stat -L -f %m "$pl_f" 2>/dev/null)"
|
||||
if [ -z "$pl_m" ] || [ -z "$lastct" ]; then
|
||||
plancol="?"
|
||||
elif [ "$pl_m" -ge "$lastct" ]; then
|
||||
|
|
@ -1982,7 +1984,11 @@ inbox_plan() {
|
|||
FILENAME==RCF {
|
||||
name = $3
|
||||
rc_bucket[name] = $1; rc_status[name] = $4; rc_cost[name] = $5
|
||||
# neste is the LAST field and may itself contain a pipe: take field 18
|
||||
# ONWARD, never field 18 alone - a single field cuts the prose at its
|
||||
# first pipe. The index moves with the record.
|
||||
rc_dir[name] = $10; rc_neste[name] = $18
|
||||
for (i = 19; i <= NF; i++) rc_neste[name] = rc_neste[name] "|" $i
|
||||
next
|
||||
}
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue