The Decoder's audit of their own corpus found four refuted claims standing -- including one they had corrected to me, agreed with, and written a METHOD entry about, without landing it for a full iteration. A hand audit finds what is there on the day it runs; it does not stop the next one. check-claims is a register: every occurrence of a refuted claim must carry an explicit [refuted] sentinel within 400 characters. It found four more unmarked occurrences than my manual pass had, including one in authored/audio.json. The marker is a sentinel rather than a keyword because the first version's every failure was a quotation inside a correction whose wording lacked the keyword. The temptation was to widen the window until they passed -- tuning a threshold until the answer comes out right, in the tool built to catch that. 21 quotations marked by hand; proved it fails by removing one. Also fixes the Decoder's other finding in my corpus: BLOCKED's voice row had a struck heading with three sentences below still asserting in the present tense. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N7FiFFFwbvG2uxdcEh8HyF
81 lines
4.0 KiB
Bash
Executable File
81 lines
4.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run every check this port has, and say which ones assert.
|
|
#
|
|
# tools/port/check-all
|
|
#
|
|
# There are eleven tools under `tools/port/` and nothing ran them together, so
|
|
# each had to be remembered individually. That is the ninth instance of this
|
|
# port's recurring shape -- something correct, documented and unexercised -- one
|
|
# level up: the checks themselves were the thing nobody was running.
|
|
#
|
|
# ⚠️ It runs the tools that ASSERT. The exploratory ones -- `screen-strip`,
|
|
# `which-focus`, `strip-padding`, `verify-dwell`, `check-capture`,
|
|
# `verify-video-audio` -- produce artifacts for a person to look at and have no
|
|
# verdict to collect. Listing them here as passes would be inventing six.
|
|
set -euo pipefail
|
|
cd "${PROJECT_DIR:-/work}"
|
|
export DISPLAY="${DISPLAY:-:97}"
|
|
OUT="${OUT:-${TMPDIR:-/tmp}/check-all}"; mkdir -p "$OUT"
|
|
BIN="${CARGO_TARGET_DIR:-/sylph-home/port/target-container}/debug/sylpheed-export"
|
|
fail=0
|
|
|
|
step() { # name, expectation, command...
|
|
local name="$1" expect="$2"; shift 2
|
|
local log="$OUT/${name}.log" rc=0
|
|
"$@" >"$log" 2>&1 || rc=$?
|
|
case "$expect" in
|
|
must-pass)
|
|
[ $rc -eq 0 ] && printf ' %-24s ok\n' "$name" \
|
|
|| { printf ' %-24s 🔴 FAILED (rc=%d) -- %s\n' "$name" "$rc" "$log"; fail=1; }
|
|
;;
|
|
report-only)
|
|
printf ' %-24s ran (no verdict -- see below)\n' "$name"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
echo "asserting checks:"
|
|
step format-validator must-pass "$BIN" check
|
|
step modding-rules must-pass tools/port/check-modding
|
|
step capture-controls must-pass tools/port/check-capture-controls
|
|
step menu-audio must-pass env OUT="$OUT/audio" tools/port/verify-menu-audio
|
|
# A stale index is worse than none: it answers "is this already decided?" with a
|
|
# confident no. That is not hypothetical -- see the entry it was built after.
|
|
step decisions-index must-pass tools/port/index-decisions --check
|
|
# A refuted claim asserted outside its correction is a lie the corpus tells a
|
|
# reader who greps for it. Registered claims must carry an explicit `[refuted]`.
|
|
step refuted-claims must-pass tools/port/check-claims
|
|
echo
|
|
echo "reported, not asserted:"
|
|
step oracle-captures report-only env OUT="$OUT/oracle" tools/port/verify-capture
|
|
sed -n '/^screen /,$p' "$OUT/oracle-captures.log" | sed 's/^/ /'
|
|
# 🔴 `verify-capture` prints and always exits 0. Its own header is right that the
|
|
# numbers are not a target -- the captures carry the game's tone ramp, so RMSE has
|
|
# a floor and driving it lower is fitting the ramp. But "not a target" is not the
|
|
# same as "not a regression detector", and nothing here would notice `title_plate`
|
|
# moving off 0.00 %. Asserting it needs a stored baseline per row, which is a real
|
|
# design decision about what a baseline means when the pose is fitted. NAMED, not
|
|
# quietly skipped.
|
|
|
|
echo
|
|
echo "consistency (expected to differ, for a stated reason):"
|
|
rc=0; env OUT="$OUT/screens" tools/port/verify-screen >"$OUT/verify-screen.log" 2>&1 || rc=$?
|
|
differs=$(grep -c DIFFERS "$OUT/verify-screen.log" || true)
|
|
# The allowance EXPIRES on its own condition rather than standing forever.
|
|
# `verify-screen` builds `sylpheed-cli` from the workspace crate while the
|
|
# exporter is pinned to a tag, so the two read different decoder eras and the six
|
|
# forced-backdrop screens must disagree. The day the tag is an ancestor of
|
|
# `origin/main` that stops being true, and this becomes a real failure again --
|
|
# which is what a suppressed check must never be allowed to do silently.
|
|
if git merge-base --is-ancestor formats-pin-2026-08-29d origin/main 2>/dev/null; then
|
|
[ $rc -eq 0 ] && printf ' %-24s ok (the pin has landed; no allowance left)\n' verify-screen \
|
|
|| { printf ' %-24s 🔴 FAILED and the pin HAS landed -- the allowance has expired\n' verify-screen; fail=1; }
|
|
else
|
|
printf ' %-24s %d DIFFERS, allowed: the pin is not on main, so this compares\n' verify-screen "$differs"
|
|
printf ' %-24s two decoder eras. Revert to the path dep when it lands.\n' ""
|
|
fi
|
|
|
|
echo
|
|
[ $fail -eq 0 ] && echo "every asserting check passes" || echo "🔴 a check failed"
|
|
exit $fail
|