port: EXTRAS resets, measured -- and being right by luck is not evidence

Ring at 347.5 on entry (MISSION SELECT), 427.5 after one delivery-confirmed DOWN,
347.5 on re-entry with the frame 0.0% different from first entry, screen
confirmed by eye because an earlier run was fooled about which screen it was on.

Two things settle here. The caveat on extras/initial_focus comes off: MISSION
SELECT is a genuine initial focus, because a screen that RESETS cannot have a
single-entry reading that is measuring history -- that objection was live only
while persistence here was unknown. And focus_persists: false for extras is now
written explicitly with kind: measured. Nothing changes at runtime, since the
port already defaulted to false; the point is that an absent key and a measured
false behave identically and mean opposite things -- 'nobody looked' versus 'the
game was watched doing it' -- and only the second is visible to audit-kinds.

It does not vindicate how it got there and is not recorded as if it did. For one
iteration contract-check ASSERTED extras non-persistence with nothing behind it,
the Decoder flagged it, and the measurement then agreed. Their separation is
sharper than my own account was: declining to generalise the memory was correct,
on the evidence then and on measurement now, since the two screens genuinely
disagree -- but encoding 'not measured here' as a positive assertion of the
negative was a different move that happened to land. Being right by luck does not
retroactively make it evidence. The check is rewritten to rest on the
measurement rather than left in place looking vindicated.

guard_focus_scope no longer polices 'only main_menu': there is no menu-wide rule
to state, since two measured screens disagree. It now states both measured values
and counts the screens that say nothing, printing UNMEASURED, not 'resets'.

Untested and not built on: OPTIONS, LOAD GAME, TUTORIAL. And nobody can separate
'resets to MISSION SELECT' from 'resets to the top item' -- they coincide, since
ptbtn11 is both. The port's value is right under either reading and the reason is
not established, which matters the day a screen is authored whose opening item is
not its first.

16 kind labels audited clean, 14 controls firing, every asserting check passes.
The P5 walk artifact now matches a measurement on both halves rather than one
measurement and one default.

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 22:14:10 +00:00
parent 5ff278a5ca
commit 1ca90bfbd6
3 changed files with 150 additions and 25 deletions

View File

@@ -275,25 +275,46 @@ def check_focus_persists(h):
report("menu remembers its cursor", want or None, got, want and got is True)
def guard_focus_scope(_h):
"""NOT a contract check. A regression guard on an AUTHORED DEFAULT.
def check_extras_resets(h):
"""EXTRAS resets -- MEASURED 2026-08-30, and it used to be asserted unmeasured.
No screen but `main_menu` persists its cursor in this port, and that is the
port's choice, not a finding: it preserves EXTRAS' measured opening item and
invents the least. Guarded so that widening it is a deliberate edit with a
`why`, and labelled so a passing run cannot be read as the game being known
to reset.
For one iteration the port asserted this with nothing behind it, which the
Decoder flagged; it then measured it and the assertion was right. That does
not make the assertion evidence, so the check is rewritten to rest on the
measurement rather than being left to look vindicated.
"""
want = False if re.search(r"EXTRAS resets, the main menu persists", h) else None
ex = ((jload("authored/flow.json") or {}).get("screens") or {}).get("extras", {})
got = ex.get("focus_persists")
report("extras resets its cursor", want, f"{got} [{ex.get('focus_persists_kind')}]",
want is not None and got is False and ex.get("focus_persists_kind") == "measured")
def guard_focus_scope(_h):
"""NOT a contract check. A guard over the screens NOBODY HAS LOOKED AT.
Two screens are now measured and disagree -- `main_menu` persists, `extras`
resets -- so there is no menu-wide rule to state. What this guards is the
rest: `OPTIONS`, `LOAD GAME` and `TUTORIAL` are untouched, and their absent
`focus_persists` is the port defaulting, not a finding.
📌 The absent key and a measured `false` behave identically and mean opposite
things. That is why `extras` now spends a key on saying `false` out loud.
"""
global FAIL
on = sorted(n for n, v in ((jload("authored/flow.json") or {}).get("screens") or {}).items()
if isinstance(v, dict) and v.get("focus_persists"))
if on == ["main_menu"]:
print(f" {'focus_persists scope':<30} guard only main_menu"
f" -- AUTHORED DEFAULT, unmeasured elsewhere")
scr = ((jload("authored/flow.json") or {}).get("screens") or {})
stated = {n: v.get("focus_persists") for n, v in scr.items()
if isinstance(v, dict) and "focus_persists" in v}
silent = sorted(n for n, v in scr.items()
if isinstance(v, dict) and "focus_persists" not in v)
ok = stated == {"main_menu": True, "extras": False}
if ok:
print(f" {'focus_persists scope':<30} guard {stated} measured;"
f" {len(silent)} screen(s) silent = UNMEASURED, not 'resets'")
else:
FAIL += 1
print(f" {'focus_persists scope':<30} 🔴 GUARD {on} -- widened past the"
f" one screen measured; needs a why and a measurement")
print(f" {'focus_persists scope':<30} 🔴 GUARD {stated} -- a screen states"
f" this without a measurement behind it")
def check_menu_labels(_h):
@@ -344,6 +365,8 @@ CONTROLS = [
# class of error the checks exist to catch.
(check_splash_times, "times are\n`[0,15,30,45,235,239,251,255]`",
"times are\n`[1,16,31,46,236,240,252,256]`"),
(check_extras_resets, "EXTRAS resets, the main menu persists",
"EXTRAS persists, the main menu persists"),
(check_initial_focus, "**Initial focus on a fresh boot is `NEW GAME`**",
"**Initial focus on a fresh boot is `TUTORIAL`**"),
]
@@ -368,7 +391,7 @@ def main():
check_bgm_window, check_black_hold, check_menu_bank,
check_splash_dwell, check_menu_labels, check_extras_labels,
check_wrap, check_focus_persists, guard_focus_scope,
check_splash_times, check_initial_focus):
check_splash_times, check_initial_focus, check_extras_resets):
fn(h)
print()
print(" A passing run means the port agrees with the contract ON THESE VALUES.")