port: a capital letter hid a refuted claim; and band levels answer what alignment could not

Three findings, two of them defects in my own checkers.

Changing the KIND of quantity answered the P4 fidelity question on the first
attempt. Four attempts at sample-exact difference-signal alignment produced four
failures and no verdict -- well past the Decoder's rule that two failed attempts
at the same measurement are evidence the quantity is wrong, not the parsing. Band
energies need no alignment at all: both transcodes match their sources to 0.66 dB
worst-case across four bands, while an unrelated movie lands at 19-20 dB. Two
populations an order of magnitude apart, so the 1.5 dB tolerance sits between
measured values rather than being picked. Asserting in check-all with the known
negative on every run, not behind a flag. It also diagnoses the failure it
replaced: matching spectra mean same content at same level, so the difference
signal's failure is my alignment, now by evidence rather than assumption. The
difference path stays report-only. Band agreement cannot tell a faithful
transcode from one that kept the spectrum and mangled the waveform -- weaker than
P4 wanted, and what I can support.

check-claims held 'no loop-point field has been identified' in its register the
whole time and matched case-sensitively, so a capital N at the start of a sentence
hid a registered dead claim in BLOCKED.md -- the one document whose job is to say
what is still open. The correction had reached authored/audio.json and not the
blocked list, which is exactly the failure that file's own why warns about.
Matching is case-insensitive now and immediately surfaced five more unmarked
sites, including a whole DECISIONS section still describing the refuted state. All
six fixed: four tokened, two rewritten with the shipped values. Controlled with a
planted capitalised revival.

And --control caught its own harness: it perturbed only the first occurrence of an
anchor, and the Decoder's delivery heading now appears twice, so the check read the
untouched duplicate and passed a wrong contract. A perturbation that does not
reach every copy makes a check untestable silently. First time a control has
failed because of a change in someone else's document rather than my code.

Not accepted from the same message: the (A)-skips-a-movie row is NOT stale. It
reads (a) ANSWERED, cites Q9, and points at flow.json's skippable: true. Reported
back rather than quietly 'fixed' -- marking a live row stale is the error their
own message is about.

Every asserting check passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N7FiFFFwbvG2uxdcEh8HyF
This commit is contained in:
Sylpheed port agent
2026-08-30 23:56:45 +00:00
parent ec2a17eaa9
commit 82e3755bb7
9 changed files with 278 additions and 17 deletions

View File

@@ -49,6 +49,10 @@ step modding-rules must-pass tools/port/check-modding
# 2026-08-30 nothing checked what any of them rested on -- seven were resting on
# a sibling `why` that argued a different claim.
step authored-kinds must-pass tools/port/audit-kinds
# Band levels are alignment-free and carry their own known negative on every run;
# the difference-signal half of the same tool stays report-only and asserts
# nothing. See docs/port/DECISIONS.md -- the waveform question is still open.
step transcode-bands must-pass tools/port/verify-transcode-fidelity
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

View File

@@ -127,11 +127,12 @@ import sys
f, claim, marker, w = sys.argv[1], sys.argv[2], sys.argv[3], int(sys.argv[4])
s = open(f, encoding="utf-8", errors="ignore").read()
i = n = 0
low, claim_low = s.lower(), claim.lower()
while True:
i = s.find(claim, i)
i = low.find(claim_low, i)
if i < 0:
break
if marker.lower() not in s[max(0, i-w):i+w+len(claim)].lower():
if marker.lower() not in low[max(0, i-w):i+w+len(claim)]:
print(" unmarked in %s at char %d" % (f, i))
sys.exit(1)
n += 1
@@ -145,7 +146,15 @@ print(n)
sys.exit(0)
PY
) && marked=$((marked + out)) || { printf '%s\n' "$out"; bad=$((bad+1)); }
done < <(grep -rl -- "$claim" docs/ crates/ port/ tools/ authored/ 2>/dev/null || true)
# 🔴 CASE-INSENSITIVE since 2026-08-30, and the reason is a live miss. The
# register held "no loop-point field has been identified" [refuted]; `BLOCKED.md`
# it capitalised at the start of a sentence, and the check reported clean while
# a refuted claim stood unmarked in the file whose whole job is to say what is
# still open. The Decoder found the same class the same day from the other end
# -- their register missed a revival that kept the claim and changed the second
# clause. A register matching EXACT wording does not protect the documents that
# rewrite most, and a capital letter is the cheapest rewrite there is.
done < <(grep -ril -- "$claim" docs/ crates/ port/ tools/ authored/ 2>/dev/null || true)
if [ "$bad" -eq 0 ]; then
printf ' %-42s %d file(s), %d occurrence(s) suppressed\n' "$claim" "$hits" "$marked"
total_marked=$((total_marked + marked))

View File

@@ -212,7 +212,7 @@ def fn_nav_perturbed(fn, old, new):
"""
global nav
real = nav
nav = lambda: (real()[0].replace(old, new, 1), real()[1])
nav = lambda: (real()[0].replace(old, new), real()[1])
try:
fn(None)
finally:
@@ -233,7 +233,13 @@ def control(h):
before, FAIL = FAIL, 0
with contextlib.redirect_stdout(io.StringIO()):
if src is h:
fn(h.replace(old, new, 1))
# 🔴 EVERY occurrence, not the first. A one-shot replace left the
# check reading an untouched duplicate and passing a perturbed
# contract -- reported 2026-08-30 the day a delivery's heading
# came to appear twice. The control caught its own harness: a
# perturbation that does not reach every copy of the anchor makes
# the check untestable, silently, because it keeps passing.
fn(h.replace(old, new))
else:
fn_nav_perturbed(fn, old, new)
noticed, FAIL = FAIL > 0, before

View File

@@ -54,7 +54,7 @@
# 2026-08-30: a screen "carries its own background" when it declares a
# full-screen untextured primitive at `t=0` with `fade_argb 0xff000000` --
# opaque black. Twelve do (`pteff00`, `palogo_eff0`, `pgloading_eff00`).
# Four do NOT. I first called those four "composited rather than standalone";
# Four do NOT. I first called those four "composited rather than standalone" [refuted];
# that reading is REFUTED disc-wide (see below) and what they share is only
# that they do not begin from black:
#

View File

@@ -11,8 +11,10 @@ The doc names three ways the measurement lies, and all three are handled here
rather than hoped about:
ALIGNMENT a one-sample offset makes the difference nearly as loud as the
source. Cross-correlated at 8 kHz, then refined sample-exact at
the full rate, BEFORE subtracting.
source. Cross-correlated coarse-to-fine BEFORE subtracting, and
the search REFUSES when its best lag sits on the boundary --
printing the range beside the answer, so an edge reads as an
edge.
CHANNEL LAYOUT the source is 5.1 and the transcode is stereo. The source is
folded with `video.rs`'s own `DOWNMIX_51` -- read out of the
manifest's recorded command, not restated here -- so both sides
@@ -20,6 +22,14 @@ rather than hoped about:
A PARTIAL FILE `ffprobe` once reported 33 s for a 137 s transcode because the
encode was still running. Duration and mtime are checked, and a
file written in the last 60 s is refused.
THE SEEK `-ss` before `-i` returned 4.6 s of AUDIO for a 4.0 s request on
this WMA Pro source, so the two windows covered different audio.
Not in §1. ⚠️ NARROWED after the Decoder checked it: on this
disc the VIDEO container-seek is EXACT -- a frame taken at 20 s
via container seek is byte-identical to one from a full decode.
So it is a property of the AUDIO STREAM, not of `-ss` placement
as such, and a check that only looked at video would clear a
path still unsafe for audio.
🔴 AND IT RUNS ITS OWN KNOWN NEGATIVES. A fidelity check that has only ever
returned "faithful" is the unfalsifiable clean run this project keeps finding:
@@ -43,6 +53,10 @@ RATE = 48000
COARSE = 8000
WINDOW_S = 25.0
PASS_DB = 40.0
# Per-band tolerance. Both shipped transcodes sit at 0.29 and 0.66 dB worst-case
# across four bands, and the unrelated-movie control lands an order of magnitude
# out, so this is set between two measured populations rather than picked.
PASS_BAND_DB = 1.5
def sh(*a):
@@ -124,7 +138,12 @@ def align(src, dst, af):
if rate == 2000:
lag, c = best_lag(a, b, span, stride)
if abs(lag) >= span:
return None, c # pinned: refuse rather than report it
# Refuse AND say what the range was: the Decoder's cheap defence
# is printing the search range beside the answer so a boundary
# reads as a boundary rather than as a result.
print(f" coarse lag {lag:+d} of a +/-{span} search at {rate} Hz"
f" -- ON THE BOUNDARY, so this is the window's edge, not a peak")
return None, c
coarse = lag / rate
else:
centre = int(round(coarse * rate))
@@ -134,6 +153,59 @@ def align(src, dst, af):
return int(round(coarse * RATE)), c
BANDS = [(0, 500), (500, 2000), (2000, 6000), (6000, 16000)]
def band_db(path, af, lo, hi, seconds=25.0, skip=2.0):
"""RMS in one band, straight out of `astats`.
🔴 A DIFFERENT KIND OF QUANTITY, and that is the whole reason it exists. The
difference-signal method needs the two decodes aligned to the sample, and
four attempts at that produced four different failures and no verdict. The
Decoder's rule from their own two failed attempts: **two failed attempts at
the same measurement are evidence the QUANTITY is wrong, not the parsing.**
Band energy needs no alignment at all -- it is a statistic over the window,
so a lag of any size cannot corrupt it.
⚠️ It is a WEAKER claim than a difference signal. Matching band energies
cannot distinguish a faithful transcode from one that preserved the spectrum
while mangling the waveform. It is what this instrument can honestly support,
and it is stated as that rather than dressed up as fidelity.
"""
chain = [(af + "," if af else ""), "aformat=channel_layouts=mono"]
if lo > 0:
chain.append(",highpass=f=%d" % lo)
if hi < 20000:
chain.append(",lowpass=f=%d" % hi)
chain.append(",astats=measure_perchannel=none")
out = subprocess.run(
["ffmpeg", "-hide_banner", "-i", path, "-ss", str(skip), "-t", str(seconds),
"-af", "".join(chain), "-f", "null", "-"],
capture_output=True, text=True).stderr
m = re.search(r"RMS level dB: (-?[\d.]+|-inf)", out)
if not m or m.group(1) == "-inf":
return None
return float(m.group(1))
def bands(src, dst, af, label):
"""Per-band level, source against transcode. No alignment involved."""
print(f" {label}")
worst = 0.0
for lo, hi in BANDS:
a = band_db(src, af, lo, hi)
b = band_db(dst, None, lo, hi)
if a is None or b is None:
print(f" {lo:>5}-{hi:<5} Hz one side silent -- no comparison")
continue
d = b - a
worst = max(worst, abs(d))
flag = "" if abs(d) <= 1.0 else (" <- " + ("transcode louder" if d > 0 else "transcode quieter"))
print(f" {lo:>5}-{hi:<5} Hz source {a:7.2f} transcode {b:7.2f}"
f" {d:+6.2f} dB{flag}")
return worst
def downmix_of(manifest, name):
"""The fold the EXPORTER used, read back out of the recorded command."""
for v in manifest.get("videos", []):
@@ -211,6 +283,24 @@ def main():
fail += 1
continue
af = downmix_of(man, name)
worst = bands(src, dst, af, f"{name} -- band energies (needs no alignment)")
verdict = "ok" if worst <= PASS_BAND_DB else "🔴 OUT OF TOLERANCE"
print(f" worst band deviation {worst:.2f} dB {verdict}")
if worst > PASS_BAND_DB:
fail += 1
# 🔴 THE KNOWN NEGATIVE RUNS EVERY TIME, not behind a flag. A band check
# that has only ever seen a faithful pair cannot be told from one that
# compares a file with itself by accident -- and this tool has already
# produced four confident wrong numbers on the other quantity.
other = [v for v in man["videos"] if v["name"] != name]
if other:
osrc = os.path.join("export", other[0]["file"])
bad = bands(src, osrc, af, f" control: vs {other[0]['name']}, must be FAR out")
ctl = "ok" if bad > 3 * PASS_BAND_DB else "🔴 an unrelated movie passes as faithful"
print(f" worst band deviation {bad:.2f} dB {ctl}")
if bad <= 3 * PASS_BAND_DB:
fail += 1
print()
if af is None:
print(f" {name:<28} ⚠️ no `-af` in the recorded command: the source"
" is stereo, comparing without a fold")
@@ -232,7 +322,12 @@ def main():
print(" 🔴 an unrelated movie scores as faithful")
fail += 1
print()
print(" 🔴 REPORT ONLY -- NO FIDELITY VERDICT IS CLAIMED, and the numbers")
print(" ⚠️ WHAT IS ASSERTED: per-band level agreement, which needs no")
print(" alignment. It CANNOT tell a faithful transcode from one that kept")
print(" the spectrum and mangled the waveform. That is the honest limit of")
print(" this quantity, and it is what the difference signal below was for.")
print()
print(" 🔴 THE DIFFERENCE SIGNAL IS REPORT ONLY -- NO VERDICT, and the numbers")
print(" above must not be read as one. Best alignment so far is corr")
print(" 0.763 on `S00A` and 0.075 on `ADV`, and both still report the")
print(" difference LOUDER than the source, which is impossible for two")