fix(board): --brief's zero-debt branch no longer claims zero pending mail
Found in review of the previous commit, before catalog tags 0.22.0: once n_owe counts OWED repos rather than raw pending, its ==0 branch could fire while a repo still held FYI-only mail, making "Ingen repo har uhaandtert innboks" false at the exact moment it printed. Fixed to state only the debt claim, and to name any FYI-only mailboxes found instead of letting their existence go unmentioned. No fixture in the shared test tree ever reached n_owe==0 (it always carries a debtor), so this needed its own isolated-root fixture to pin. Still part of the 0.22.0 release -- amends that changelog entry rather than bumping again, since no tag exists yet. board-selftest.sh: 150 -> 152 checks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGWMPskXBsTjMrrQ2GofFx
This commit is contained in:
parent
03e712a423
commit
61aebad748
5 changed files with 80 additions and 10 deletions
|
|
@ -495,9 +495,21 @@ brief() {
|
|||
echo ""
|
||||
|
||||
if [ "${n_owe:-0}" -eq 0 ]; then
|
||||
echo "Ingen repo har uhaandtert innboks. Ingen skylder noen et svar i dag."
|
||||
# Still checked: "no repo owes" and "no mailbox is pending" are different
|
||||
# claims, and only the second one is the good news it reads as.
|
||||
# Only the debt claim, never "no repo has unhandled inbox": n_owe counts
|
||||
# OWED repos since 0.22.0, so this branch can fire while a repo still
|
||||
# holds FYI-only mail - real, re-injected, just not an obligation. The
|
||||
# comment this replaces already named the two claims as different; the
|
||||
# code used to make both anyway.
|
||||
echo "Ingen repo skylder noen et svar i dag."
|
||||
fyi_only="$(awk -F'|' -v OWF="$OWED" '
|
||||
FILENAME==OWF { ow[$1] = $2 + 0; next }
|
||||
{ name = $3; inbox = $6 + 0; owed = (name in ow) ? ow[name] : 0
|
||||
if (inbox > 0 && owed == 0) print name }
|
||||
' "$OWED" "$RECORDS")"
|
||||
if [ -n "$fyi_only" ]; then
|
||||
echo "Disse har bare FYI-post (ingen skylder svar, men posten er reell):"
|
||||
printf '%s\n' "$fyi_only" | sed 's/^/ /'
|
||||
fi
|
||||
brief_orphans
|
||||
echo ""
|
||||
echo "MERK: INN teller hva ANDRE venter paa fra deg. Hva et repo venter PAA"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue