feat(board): ORDRE and FLY carry the age of the oldest order

Both columns were pure counts (ls | wc -l), so ORDRE 2 read identically
whether both orders arrived yesterday or both had sat for ten days. The
defect was never that orders sit there - that is a prioritisation
question owned by humans. It was that no surface showed the AGE ACROSS
REPOS: coord-order-inbox.sh does show one, but only inside the one repo
at SessionStart, so a repo nobody opens shows nobody anything.

Measured across the live mailbox 2026-08-29 with `find ~/.claude/coord
-path '*/orders/*.md' -maxdepth 3 -type f`: 30 pending orders over 22
repos, 5 of them ten days old. Re-measured here after this session
consumed two of them: 29 over 23 mailboxes, still 5 at ten days. The
residual delta is not attributable from this repo - the mailbox has
other writers - and is reported rather than reconciled away.

Rendered N:Md. This is not a new mechanism in the file: ALDER (STATE.md
mtime) and SISTE (last commit) already read a clock the same way.

The age is the OLDEST order, never the newest and never a mean - a repo
holding one fresh order and one ten-day-old order has a ten-day-old
problem, and the newest reading is exactly what would hide it. FLY
carries the identical reading, and there it matters at least as much:
nothing un-claims an order when the session that took it dies, so a
claim with no age is the 117-hour claim with its only counter-evidence
removed.

An empty queue prints a BARE 0, never "0:0d": "no orders" and "an order
that arrived today" are different facts, the same reason FLY exists
beside ORDRE. An unreadable mtime prints "?" for the WHOLE reading
rather than skipping the file, because an unmeasured file could be the
oldest one - the same token coord-count and DRT already use.

NO NEW SORT AXIS. The age is display-only; putting it in the ranking
would silently reorder a parser living in another repo. --plan's fly=
and every other emitted key=value block are untouched: the requirement
is that a human reading the board sees an order is old without opening
the repo, and the table is where that is read. Nothing here writes -
board.sh stays read-only, and no cron, hook or notifier was added.

TDD: board-selftest.sh section 28 written first and RED before board.sh
was touched. It builds a throwaway coord tree with touch -t mtimes and
asserts its OWN ground truth (the stale fixture really is 10 days old)
before anything depends on it. Known-positive control: a second repo
with two genuinely fresh orders, so the 10d assertion is proven able to
fail. Mutation-verified: flipping -lt to -gt in oldest_order_age turns
exactly the two oldest-specific checks red, all controls green.

Four pre-existing assertions in board-selftest and orders-selftest
matched the old bare-count cell and were updated to the N:Md form; the
claim each pins - INN, ORDRE and FLY are never summed - is unchanged.

Suites under real /bin/bash 3.2: board 325/325 (was 314), coord 242/242,
route 69/69, orders 110/110, guard 54/54. npm test 11/11.

No version bump, no tag, no catalog ref - as ordered.

Order: 20260829T045435Z-276822386-from-.claude

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-08-29 07:29:13 +02:00
commit ee5a86a40b
4 changed files with 238 additions and 20 deletions

View file

@ -411,7 +411,7 @@ marketplace plugin. Three components, one boundary:
- **Board (`scripts/board.sh`):** cross-repo attention board. Reads STATE.md
next-step blocks + board lines, `git status`, and mailbox pending counts, and
prints one line per repo. Read-only by construction: it writes to no repo, no
STATE.md and no mailbox. Pinned by `board-selftest.sh` (314 checks).
STATE.md and no mailbox. Pinned by `board-selftest.sh` (325 checks).
**It lives here because the mailbox is one of its three inputs, and it carries
the same axis distinction the mailbox does.** A pending count means *others
@ -990,6 +990,49 @@ marketplace plugin. Three components, one boundary:
count. Selftest section 24 pins the denial as a check on the legend TEXT, so
the wording is engine behavior and not prose.
**Order 20260829T045435Z-276822386 (2026-08-29): both columns were pure
COUNTS, so ORDRE 2 read identically whether both orders arrived yesterday or
both had sat for ten days.** They now render `N:Md` - the count and the age of
the oldest order. The defect was never that orders sit there; that is a
prioritisation question owned by humans. It was that NO SURFACE SHOWED THE AGE
ACROSS REPOS: `coord-order-inbox.sh` does show one ("1d old"), but only inside
the one repo at SessionStart, so a repo nobody opens shows nobody anything.
Measured across the live mailbox that day with `find ~/.claude/coord -path
'*/orders/*.md' -maxdepth 3 -type f`: 30 pending orders over 22 repos, 5 of
them ten days old. This is not a new mechanism in the file - ALDER (STATE.md
mtime) and SISTE (last commit) already read a clock the same way; it is a
third application of a measurement `board.sh` was already making.
**The age is the OLDEST order, never the newest and never a mean.** A repo
holding one fresh order and one ten-day-old order has a ten-day-old problem,
and the newest reading is precisely what would hide that case. Mutation-
verified: flipping `-lt` to `-gt` in `oldest_order_age()` turns exactly the
two oldest-specific checks red while every control stays green. FLY carries
the identical reading, and there it matters at least as much: nothing
un-claims an order when the session that took it dies, so a claim with no age
is the 117-hour claim above with its only counter-evidence removed.
**An empty queue prints a BARE 0, and an unreadable mtime prints `?`.** "No
orders" and "an order that arrived today" are two different facts - the same
reason FLY exists beside ORDRE in the first place - so `0` never grows a
`:0d`. `?` is reported for the WHOLE reading rather than skipping the file,
because an unmeasured file could be the oldest one, which makes "oldest" a
claim the function is no longer entitled to make; it is the same token
`coord-count.sh` and DRT already use for a measurement that failed.
**The age is DISPLAY only - it is deliberately NOT in the sort.** Putting it
in the ranking would silently reorder a parser living in another repo, which
is the standing rule two sections up, and the order made it an explicit
condition: a new sort axis would have to be stated in the commit message and
in `--help`. It was not needed, so it was not taken. `--plan`'s `fly=` key and
every other emitted `key=value` block are likewise untouched: the requirement
is that a HUMAN reading the board can see an order is old without opening the
repo, and the table is where that is read. Selftest section 28 builds a
throwaway coord tree with `touch -t` mtimes and asserts its OWN ground truth
(the stale fixture really is 10 days old) before anything depends on it, so a
broken `touch -t` fails there rather than turning the section into a test of
nothing.
**There is deliberately NO process inspection, and the selftest asserts it
structurally** (no live `pgrep`/`pkill`/`lsof` in `board.sh`, with a
known-positive control proving the grep can find a planted call). Four
@ -1079,7 +1122,7 @@ obligations in another repo.
builtins only in hook and tests.
- TDD: no behavior change without a failing selftest check first.
`bash scripts/coord-selftest.sh` must exit 0 (242/242),
`bash scripts/board-selftest.sh` must exit 0 (314/314),
`bash scripts/board-selftest.sh` must exit 0 (325/325),
`bash scripts/route-selftest.sh` must exit 0 (69/69),
`bash scripts/orders-selftest.sh` must exit 0 (110/110) and
`bash scripts/state-line-guard-selftest.sh` must exit 0 (54/54).

View file

@ -1935,7 +1935,7 @@ printf '%s' "$ORD_OUT" | grep -q 'ORDRE'; check "table header carries an ORDRE c
# Matched on the rendered row, not by awk field index: KOST is "Sonnet 5/high"
# and contains a space, so a field number would be counting other columns and
# would keep passing if the layout shifted.
printf '%s' "$ORD_OUT" | grep -qE '^ord-both[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+3[[:space:]]+2[[:space:]]'
printf '%s' "$ORD_OUT" | grep -qE '^ord-both[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+3[[:space:]]+2:0d[[:space:]]'
check "INN 3 and ORDRE 2 are printed side by side, never summed" $?
printf '%s' "$ORD_OUT" | grep -qE '^ord-none[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+0[[:space:]]+0[[:space:]]'
check "a repo with no mail and no orders reads 0 in both columns" $?
@ -2198,9 +2198,9 @@ mkorder fly-mixed claimed 20260104T000000Z-4-from-d
FLY_OUT="$("$BOARD" --roots "$FLY_ROOT" 2>/dev/null)"
printf '%s' "$FLY_OUT" | grep -q 'FLY'; check "table header carries a FLY column" $?
printf '%s' "$FLY_OUT" | grep -qE '^fly-mixed[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+0[[:space:]]+2[[:space:]]+1[[:space:]]'
printf '%s' "$FLY_OUT" | grep -qE '^fly-mixed[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+0[[:space:]]+2:0d[[:space:]]+1:0d[[:space:]]'
check "ORDRE 2 and FLY 1 print side by side, never summed into 3" $?
printf '%s' "$FLY_OUT" | grep -qE '^fly-inflight[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+0[[:space:]]+0[[:space:]]+1[[:space:]]'
printf '%s' "$FLY_OUT" | grep -qE '^fly-inflight[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+0[[:space:]]+0[[:space:]]+1:0d[[:space:]]'
check "an order in flight reads ORDRE 0 / FLY 1, not ORDRE 0 alone" $?
printf '%s' "$FLY_OUT" | grep -qE '^fly-empty[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+0[[:space:]]+0[[:space:]]+0[[:space:]]'
check "known-positive: a repo with no orders at all still reads 0 in both" $?
@ -2562,6 +2562,117 @@ check "exit3: a nonzero that is not 3 is caught too, and names its own status" $
/bin/rm -rf "$F3ROOT" "$F3GOOD" "$F3EMPTY" "$F3SCRATCH" 2>/dev/null
# --- 28. ORDRE and FLY carry the AGE of the oldest order ---------------------
# Order 20260829T045435Z-276822386 (.claude, 2026-08-29). ORDRE and FLY were
# pure counts (`ls ... | wc -l`), so ORDRE 2 read identically whether both
# orders arrived yesterday or both had sat for ten days. Measured that day
# across the live mailbox with `find ~/.claude/coord -path '*/orders/*.md'
# -maxdepth 3 -type f`: 30 pending orders over 22 repos, 5 of them ten days
# old. coord-order-inbox.sh does show an age - but only inside the one repo, at
# SessionStart, so a repo nobody opens shows nobody anything.
#
# The age is the OLDEST pending order, never the newest and never a mean: a
# repo holding one fresh order and one ten-day-old order has a ten-day-old
# problem, and the newest reading is precisely what would hide it. This is not
# a new mechanism in the file - ALDER (STATE.md mtime) and SISTE (last commit)
# already read a clock the same way.
AGROOT="$(mktemp -d)"
AGCOORD="$(mktemp -d)"
AG_OLD="$(date -v-10d +%Y%m%d%H%M)"
mk_ag_repo() {
mkrepo "$AGROOT/$1"
{
echo "# STATE - $1"
echo ""
printf '## %s NESTE %s START HER\n' "$HAND" "$EMDASH"
echo "<!-- board: status=in-progress; blocked-on=-; next-cost=Sonnet 5/high -->"
echo "Et steg."
} > "$AGROOT/$1/STATE.md"
}
mk_ag_order() { # $1=repo $2=subdir ("orders" or "orders/claimed") $3=file $4=touch-stamp or "-"
mkdir -p "$AGCOORD/$1/$2"
printf -- '---\nfrom: x\nto: %s\norder-id: %s\n---\nDo a thing.\n' "$1" "$3" \
> "$AGCOORD/$1/$2/$3.md"
[ "$4" = "-" ] || touch -t "$4" "$AGCOORD/$1/$2/$3.md"
}
# ag-old: one fresh order AND one ten days old. The whole point of the section.
mk_ag_repo ag-old
mk_ag_order ag-old orders 20260829T000000Z-fresh -
mk_ag_order ag-old orders 20260818T000000Z-stale "$AG_OLD"
# ag-fresh: KNOWN-POSITIVE CONTROL. Two orders, both fresh. If the assertion
# below could not tell these two repos apart it would pass on anything - this
# is the tree "where the age is wrong" that proves the check can fail.
mk_ag_repo ag-fresh
mk_ag_order ag-fresh orders 20260829T000001Z-a -
mk_ag_order ag-fresh orders 20260829T000002Z-b -
# ag-none: no orders at all. "0 days old" and "no orders" are two different
# facts and must not render the same - the same reason FLY exists next to ORDRE.
mk_ag_repo ag-none
# ag-fly: nothing pending, one order claimed ten days ago. FLY is the column
# that most needs this: nothing un-claims an order when the session dies, so a
# claim with no age is the 117-hour claim with its only counter-evidence removed.
mk_ag_repo ag-fly
mk_ag_order ag-fly orders/claimed 20260818T000001Z-inflight "$AG_OLD"
AGOUT="$(CLAUDE_COORD_DIR="$AGCOORD" "$BOARD" --roots "$AGROOT" 2>/dev/null)"
ag_row() { printf '%s' "$AGOUT" | grep "^$1 "; }
# Ground truth for the fixture itself: the stale file really is ~10 days old.
# Asserted before anything depends on it, so a broken `touch -t` fails here
# rather than silently turning the checks below into a test of nothing.
ag_gt="$(( ( $(date +%s) - $(stat -f %m "$AGCOORD/ag-old/orders/20260818T000000Z-stale.md") ) / 86400 ))"
[ "$ag_gt" -eq 10 ]
check "orderage: ground truth - the fixture's stale order really is 10 days old" $?
ag_cells() { ag_row "$1" | cut -c89- ; }
[ "$(ag_cells ag-old | awk '{print $1}')" = "2:10d" ]
check "orderage: ORDRE shows the OLDEST pending order's age, not the newest" $?
[ "$(ag_cells ag-old | awk '{print $1}')" = "2:0d" ]; [ $? -ne 0 ]
check "orderage: a fresh order alongside a stale one does not hide the stale one" $?
[ "$(ag_cells ag-fresh | awk '{print $1}')" = "2:0d" ]
check "orderage: control - two genuinely fresh orders read 0d" $?
[ "$(ag_cells ag-fresh | awk '{print $1}')" = "2:10d" ]; [ $? -ne 0 ]
check "orderage: control - the 10d assertion can FAIL, so it measures something" $?
# Absence must not borrow the shape of a measurement. Field-exact, not a
# substring search: the row also carries ALDER and SISTE, which legitimately
# print day counts of their own. Cut by COLUMN, not by whitespace field: the
# KOST cell ("Sonnet 5/high") contains a space, so counting tokens from either
# end lands on the wrong cell. 88 = 32 REPO + 34 STATUS + 14 KOST + 4 INN, plus
# the four single spaces between them; ORDRE and FLY are the next two tokens.
ag_none_ordre="$(ag_cells ag-none | awk '{print $1}')"
[ "$ag_none_ordre" = "0" ]
check "orderage: no pending orders renders a bare 0, never '0:0d'" $?
printf '%s' "$ag_none_ordre" | grep -q 'd'; [ $? -ne 0 ]
check "orderage: 'no orders' and '0 days old' do not render the same" $?
[ "$(ag_cells ag-fly | awk '{print $2}')" = "1:10d" ]
check "orderage: FLY carries its own age for a claimed order" $?
ag_fly_ordre="$(ag_cells ag-fly | awk '{print $1}')"
[ "$ag_fly_ordre" = "0" ]
check "orderage: a claimed order is still not counted in ORDRE" $?
# The legend is engine behaviour here, exactly as FLY's liveness denial is
# (section 24): a column whose form nothing pins is a column that drifts.
printf '%s' "$AGOUT" | grep -qi 'ELDSTE ordren'
check "orderage: the legend states the age is the OLDEST order, not the newest" $?
# No new sort axis (order requirement 3): the age is a DISPLAY value. Adding it
# to the sort would silently reorder a parser living in another repo, which
# board.sh:87-116 already forbids. ag-fresh and ag-old are both in-progress with
# identical STATE mtimes, so ordering stays alphabetical, not oldest-order-first.
ag_first="$(printf '%s' "$AGOUT" | grep -E '^ag-(old|fresh) ' | head -1 | awk '{print $1}')"
[ "$ag_first" = "ag-fresh" ]
check "orderage: order age is display-only - it does not reorder the board" $?
/bin/rm -rf "$AGROOT" "$AGCOORD" 2>/dev/null
echo ""
echo "board-selftest: $PASS passed, $FAIL failed"
[ "$FAIL" -eq 0 ] || exit 1

View file

@ -9,7 +9,14 @@
# STATE.md board line - optional machine-readable field (see below)
# git status --porcelain - uncommitted risk
# git log -1 --format=%ct - when anything last landed (the SISTE column)
# ~/.claude/coord/<repo>/orders - PENDING orders (the ORDRE column)
# ~/.claude/coord/<repo>/orders - PENDING orders (the ORDRE column).
# Rendered N:Md - the count AND the age of the
# OLDEST order, never the newest and never a mean:
# a repo holding one fresh order and one ten-day-
# old order has a ten-day-old problem. A bare 0
# means no orders; "0d" would mean one arrived
# today. The age is DISPLAY only and is not in
# the sort.
# ~/.claude/coord/<repo>/orders/claimed - orders IN FLIGHT (the FLY column).
# Same queue, other state - not a fourth axis.
# It exists because ORDRE alone printed the same
@ -360,10 +367,42 @@ fi
[ -n "$(printf '%s' "$REPOS" | tr -d '[:space:]')" ] || exit 0
# --- Collect one record per repo -------------------------------------------
# Record: bucket|sortkey|name|status|cost|inbox|dirty|age|last|dir|blockedon|orders|claimed|neste
# Record: bucket|sortkey|name|status|cost|inbox|dirty|age|last|dir|blockedon|
# orders|ordersage|claimed|claimedage|neste
RECORDS=""
MALFORMED=""
# Age of the OLDEST *.md in a queue directory, in whole days (order
# 20260829T045435Z-276822386, .claude, 2026-08-29). OLDEST, never newest and
# never a mean: a repo holding one fresh order and one ten-day-old order has a
# ten-day-old problem, and the newest reading is exactly what would hide it.
#
# Three outcomes, deliberately distinct - a failed or absent measurement must
# never render as a reassuring value (F6's DRT `?`, coord-count's exit 3):
# "-" the queue is empty. NOT "0d": "no orders" and "0 days old" are two
# different facts, which is the same reason FLY exists beside ORDRE.
# "?" a file is there but no mtime could be read. Reported for the WHOLE
# reading, not skipped: an unmeasured file could be the oldest one, so
# "oldest" is a claim this function is no longer entitled to make.
# "Nd" measured.
oldest_order_age() {
ooa_oldest=""; ooa_seen=0; ooa_unmeasured=0
for ooa_f in "$1"/*.md; do
[ -f "$ooa_f" ] || continue
ooa_seen=1
ooa_m="$(stat -f %m "$ooa_f" 2>/dev/null)"
case "$ooa_m" in
''|*[!0-9]*) ooa_unmeasured=1 ;;
*) if [ -z "$ooa_oldest" ] || [ "$ooa_m" -lt "$ooa_oldest" ]; then
ooa_oldest="$ooa_m"
fi ;;
esac
done
if [ "$ooa_seen" -eq 0 ]; then printf -- '-'; return 0; fi
if [ "$ooa_unmeasured" -eq 1 ] || [ -z "$ooa_oldest" ]; then printf '?'; return 0; fi
printf '%dd' $(( (NOW - ooa_oldest) / 86400 ))
}
printf '%s\n' "$REPOS" | while IFS= read -r d; do
[ -n "$d" ] || continue
name="$(basename "$d")"
@ -439,6 +478,20 @@ printf '%s\n' "$REPOS" | while IFS= read -r d; do
[ -n "$claimed" ] || claimed=0
fi
# The AGE half of both columns. A count alone printed the same digit for a
# queue filled yesterday and one that has sat for ten days: measured across
# the live mailbox 2026-08-29, 30 pending orders over 22 repos, 5 of them ten
# days old, and no cross-repo surface showed it. coord-order-inbox.sh does
# show an age, but only inside the one repo at SessionStart, so a repo nobody
# opens shows nobody anything. FLY needs it at least as much as ORDRE does:
# nothing un-claims an order when the session that took it dies (117 hours,
# measured 2026-08-23), so a claim without an age is that non-claim with its
# only counter-evidence removed.
ordersage="-"
[ "$orders" -eq 0 ] || ordersage="$(oldest_order_age "$COORD/$name/orders")"
claimedage="-"
[ "$claimed" -eq 0 ] || claimedage="$(oldest_order_age "$COORD/$name/orders/claimed")"
# Read for EVERY repo, not just the STATE-less ones: a repo whose plan file
# is fresh can still have been silent for a year, and that is precisely the
# repo no other column reports. A repo with no commits at all has no reading
@ -454,8 +507,9 @@ printf '%s\n' "$REPOS" | while IFS= read -r d; do
# No plan file, so no plan age: ALDER is blank rather than quietly showing
# the commit age under a heading that means something else everywhere else
# in the table. The sort key keeps using it - order is unchanged.
printf '5|%06d|%s|-|-|%s|%s|-|%s|%s|-|%s|%s|(ingen STATE.md)\n' \
"$lastd" "$name" "$inbox" "$dirty" "$lastcol" "$d" "$orders" "$claimed"
printf '5|%06d|%s|-|-|%s|%s|-|%s|%s|-|%s|%s|%s|%s|(ingen STATE.md)\n' \
"$lastd" "$name" "$inbox" "$dirty" "$lastcol" "$d" \
"$orders" "$ordersage" "$claimed" "$claimedage"
continue
fi
@ -544,9 +598,9 @@ printf '%s\n' "$REPOS" | while IFS= read -r d; do
# `orders` sits between blockedon and neste, never after it: `neste` is free
# prose lifted out of a STATE.md and may contain a literal '|', so it has to
# stay the last field on the line.
printf '%s|%06d|%s|%s|%s|%s|%s|%sd|%s|%s|%s|%s|%s|%s\n' \
printf '%s|%06d|%s|%s|%s|%s|%s|%sd|%s|%s|%s|%s|%s|%s|%s|%s\n' \
"$bucket" "$age" "$name" "$disp" "$cost" "$inbox" "$dirty" "$age" "$lastcol" "$d" \
"${blockedon:--}" "$orders" "$claimed" "$neste"
"${blockedon:--}" "$orders" "$ordersage" "$claimed" "$claimedage" "$neste"
done > "${TMPDIR:-/tmp}/board.$$"
RECORDS="${TMPDIR:-/tmp}/board.$$"
@ -703,15 +757,20 @@ awk -F'|' '$4 ~ /^blocked/ && $11 != "-" && $11 != "" {print $11}' "$RECORDS" \
hdr() {
printf '\n%s\n' "$1"
printf '%-32s %-34s %-14s %4s %6s %4s %4s %6s %6s %s\n' \
printf '%-32s %-34s %-14s %4s %7s %7s %4s %6s %6s %s\n' \
"REPO" "STATUS" "KOST" "INN" "ORDRE" "FLY" "DRT" "ALDER" "SISTE" "NESTE"
}
rows() {
awk -F'|' -v b="$1" '$1==b' "$RECORDS" | sort -t'|' -k2,2n | \
while IFS='|' read -r bucket sortkey name status cost inbox dirty age last dir blockedon orders claimed neste; do
printf '%-32s %-34s %-14s %4s %6s %4s %4s %6s %6s %s\n' \
"$name" "$status" "$cost" "$inbox" "$orders" "$claimed" "$dirty" "$age" "$last" "$(trunc "$neste" "$NESTE_WIDTH")"
while IFS='|' read -r bucket sortkey name status cost inbox dirty age last dir blockedon orders ordersage claimed claimedage neste; do
# `N:age` only when there is something to date. An empty queue prints a
# bare 0, never "0:0d" - absence must not borrow the shape of a
# measurement.
o_cell="$orders"; [ "$ordersage" = "-" ] || o_cell="$orders:$ordersage"
c_cell="$claimed"; [ "$claimedage" = "-" ] || c_cell="$claimed:$claimedage"
printf '%-32s %-34s %-14s %4s %7s %7s %4s %6s %6s %s\n' \
"$name" "$status" "$cost" "$inbox" "$o_cell" "$c_cell" "$dirty" "$age" "$last" "$(trunc "$neste" "$NESTE_WIDTH")"
done
}
@ -901,7 +960,7 @@ brief() {
FILENAME==OWF { ow[$1] = $2 + 0; next }
{ name = $3; owed = (name in ow) ? ow[name] : 0; if (owed > 0) print owed, $0 }
' "$OWED" "$RECORDS" | sort -t'|' -k1,1nr | \
while IFS='|' read -r owed bucket sortkey name status cost inbox dirty age last dir blockedon orders claimed neste; do
while IFS='|' read -r owed bucket sortkey name status cost inbox dirty age last dir blockedon orders ordersage claimed claimedage neste; do
printf ' %-32s INN %-4s %s\n' "$name" "$owed" "$status"
# Wrapped, not cut - the whole line is the point, but a 500-character one
# is unreadable in a file nobody watched being written. Locale is set for
@ -1455,7 +1514,7 @@ plan() {
awk -F'|' -v OWF="$OWED" '
FILENAME==OWF { ow[$1] = $2 + 0; next }
{
name = $3; status = $4; dirty = $7; orders = $12 + 0; claimed = $13 + 0
name = $3; status = $4; dirty = $7; orders = $12 + 0; claimed = $14 + 0
owed = (name in ow) ? ow[name] : 0
if (status != "done" && status != "deferred") next
# dirty is compared as a STRING against exactly "0", never as $7 + 0: a
@ -1505,7 +1564,7 @@ plan() {
echo ""
pn=0
while IFS='|' read -r why bucket sortkey name status cost inbox dirty age last dir blockedon orders claimed neste; do
while IFS='|' read -r why bucket sortkey name status cost inbox dirty age last dir blockedon orders ordersage claimed claimedage neste; do
[ -n "$name" ] || continue
pn=$((pn + 1))
printf 'tab=%s\n' "$pn"
@ -1565,7 +1624,7 @@ inbox_plan() {
FILENAME==RCF {
name = $3
rc_bucket[name] = $1; rc_status[name] = $4; rc_cost[name] = $5
rc_dir[name] = $10; rc_neste[name] = $14
rc_dir[name] = $10; rc_neste[name] = $16
next
}
{
@ -1640,6 +1699,10 @@ echo "INN = uhaandtert innboks (andre venter paa DEG). DRT = ukommiterte filer."
# legend states the distinction where they are read - they measure opposite
# directions and are never summed.
echo "ORDRE = ventende ordrer (arbeid venter paa REPOET). INN og ORDRE summeres ALDRI."
# The age is a DISPLAY value only - it is deliberately not in the sort, because
# reordering the board would silently reorder a parser living in another repo.
echo " N:Md = antall og alderen paa den ELDSTE ordren (aldri nyeste, aldri snitt)."
echo " Bart 0 = ingen ordrer. '0d' ville vaert en ordre som kom i dag - ikke det samme."
# FLY is the SAME queue as ORDRE in its other state, never a fourth axis and
# never a liveness reading. The denial is part of the legend, not a footnote:
# nothing un-claims an order when the session that claimed it dies (measured
@ -1648,6 +1711,7 @@ echo "ORDRE = ventende ordrer (arbeid venter paa REPOET). INN og ORDRE summeres
echo "FLY = ordrer i arbeid (claimed). Beviser aldri at en okt lever eller er aktiv."
echo " Beviser bare at noen TOK ordren; ingenting frigir den om okten dor."
echo " Summeres ALDRI med ORDRE - samme ko, annen tilstand."
echo " Baerer samme N:Md - alderen paa den ELDSTE claimen. Ingenting frigir den."
echo "ALDER = dager siden STATE.md endret. SISTE = dager siden siste commit."
[ "$(count 1)" -gt 0 ] && { hdr "BLOKKERT (venter paa ekstern avhengighet)"; rows 1; }

View file

@ -336,7 +336,7 @@ printf '%s' "$bout" | grep -q 'ordrepo'; check "board table lists the fixture re
# Matched on the rendered row rather than by awk field number: KOST is
# "Sonnet 5/high", which contains a space, so a field index would be counting
# the wrong columns and would keep "passing" if the layout shifted.
printf '%s' "$bout" | grep -qE '^ordrepo[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+1[[:space:]]+2[[:space:]]'
printf '%s' "$bout" | grep -qE '^ordrepo[[:space:]]+planned[[:space:]]+Sonnet 5/high[[:space:]]+1[[:space:]]+2:0d[[:space:]]'
check "board prints INN 1 and ORDRE 2 side by side, never summed" $?
# --dispatch --order-id: the thin starter form. The order text lives in the