port: settle times measured -- the pacing was already right, and my own red flag was half wrong
THE TRANSCODE CACHE HAD NEVER HIT. `video::transcode` has carried one since P4 -- a `.cmd` sidecar with the command, the source size and the channel count -- and `main.rs` clears the output tree wholesale immediately before the check, deleting the sidecar and the file it stamps. Six exports in this session paid the full Theora encode and produced five byte-identical files, roughly 48 minutes. Nothing reported it, and nothing could: a cache is silent either way and the only symptom is a wall clock that looks like the job being slow. The wipe now spares `video/` and `prune_videos` deletes anything in it this run did not claim, so the wholesale guarantee is kept rather than traded. A re-export is 20 s. SETTLE TIMES, MEASURED, and they refute more of my row than they confirm. The principle holds -- the title's rest.t is 251 units = 4.183 s where its art finishes at ~2 s -- but "everything the sequencer paces off that landmark is therefore late" does not. Measured the port the way the game was measured, by VISIBLE SPAN rather than arrival-to-arrival: publisher wordmark port 4.25 s game 4.297 / 4.604 / 4.370 developer logos port 3.50 s game 3.508 / 3.503 / 3.366 black hold port ~0.25 s game 0.2 - 0.3 title -> plate port 2.000 s (declared 120 units) game 2.247 s Dead on. My earlier reading compared the port's transition timestamps against the game's visible spans, which differ by the exit ramp plus the black hold -- the whole of the discrepancy I was about to chase, and the same definitional trap that cost this corpus 0.48 s on the plate delay. Nothing in the sequencer is changed. `dwell_seconds` stays null, now for a measured reason rather than an absent one: `timing.json` said "if a capture ever times the real boot, this is where that number goes", and the answer is that nothing goes there. Not authored, deliberately: an (A)->menu dwell, which measures 3.763 s and contains a 1.53 s guest load stall on a cold cache; and the menu build-in and (B)->title, which rest on one run where the port is already within ~0.1 s. THE VOICE PRESENTATION MOVED TO authored/, because the recommendation behind it was withdrawn as self-contradictory and the choice is now unambiguously mine. `voice.presentation` = `loudest`, and the reason to switch is a measurement, not a preference: ADV chunk 1 is MONO-IN-STEREO and chunk 2 is DUAL-MONO, so chunk 2's extra bytes encode a duplicate channel rather than fidelity. That explains the byte-rate difference and removes the only argument for `highest_rate`. ADV's dialogue now exports at +0.3 dBFS instead of -8.7, which is the SE bound's documented decode overshoot on a wave mastered at full scale. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N7FiFFFwbvG2uxdcEh8HyF
This commit is contained in:
@@ -113,7 +113,8 @@ HANDOFF.
|
||||
|
||||
| P6 BGM — the sub-wave count | **is a music bank's LEADING REGION a stem, or a decoder artefact?** | Q10 | 🔴 **HANDOFF and the decoders disagree, and P6 ships the disagreement.** `media::sound_bank_riffs("BGM_103.slb")` returns **three** sub-waves; HANDOFF Q10's census says a music bank is *"exactly two waves of identical duration (32/32 banks on the disc)"*. The third comes from `slb.rs:380` `to_xma_riffs`, whose hybrid branch emits a leading headerless packet region ahead of the `RIFF` waves — and `docs/re/REFUTED.md` already records that region as what makes `BGM_106`–`BGM_109` *"break the two-wave rule"*. Derived at HANDOFF `9ca1eb5`. **The exporter sums all three and writes a manifest warning**, because choosing which sub-wave to drop is a decoding question and MISSION §2 forbids this exporter answering one. So the menu currently plays a sum of three things where the census predicts two. What settles it: whether that leading region carries music. Raised with the Decoder 2026-08-29. |
|
||||
| ~~P3 — the plate's ONSET~~ | ~~visible 2.13 s after settle, or group starts then?~~ | Q2 | ✅ **resolved 2026-08-29, and the answer is AUTHOR NOTHING.** The port's refutation held and produced a better answer than either option it offered. Correction at `5b0a6e6` on `auto/no-disc-and-menu-captures`: **both builds run on one clock, started together**, and the plate arrives at its own declared `t=238`. Checked against this export rather than taken on trust — build 4's visible build-in ends at `t=118` (`pteff01`, `pteff02`, `ptlogoall_eff` finish together), `ptbtn00` reaches alpha 255 at `t=238`, difference **120 units = 2.000 s**, against a measured 2.138 / 2.132 s at an emulator presenting 28.1 fps rather than 30. The 2.13 s constant is **deleted**. |
|
||||
| P3/P5 — `settle_time()` | **`rest.t` is not when a screen settles, and the port's sequencer uses it** | — | 🔴 **new, mine, and it is the premise that produced the wrong plate arithmetic.** `5b0a6e6` states it plainly: `rest.t` is the last *hold* keyframe before the exit. `title`'s `ptlogo1` has `rest.t=251` and stops **moving** at `t=42`, then creeps 5 px while its alpha crawls `0xe0`→`0xff` over 209 units. `ScreenView.settle_time()` returns the max `rest.t` — **4.350 s** for the title where the visible build-in is over at `t=118` = **1.967 s**. Everything the boot sequencer paces off that landmark is therefore late: `publisher_logo` is held to t=235, `developer_logos` to t=190, and `_script_settled` waits on it too. ⚠️ **Not changed this iteration**, because "visible arrival" is a heuristic and getting it wrong re-paces every screen; it needs its own gate. **What settles it outright:** the oracle is live — a timed boot with screen-to-screen transitions would give the real dwells directly. Asked 2026-08-29. |
|
||||
| ~~P3/P5 — `settle_time()`~~ | ~~`rest.t` is not when a screen settles, and the port's sequencer uses it~~ | — | ✅ **MEASURED 2026-08-29 and the row was HALF WRONG — mine.** The Decoder took it on a cold profile with no shader cache (`auto/no-disc-and-menu-captures` at `4bd4779`, `docs/re/boot-settle-times-measured.md`). The principle holds: the title's `rest.t` is 251 units = **4.183 s** where its art finishes at ~2 s. **But "everything the sequencer paces off that landmark is therefore late" does not.** Measured the port the way the game was measured — visible span, `--film` at 4 fps — the publisher wordmark runs **4.25 s** against the game's 4.297/4.604/4.370 and the developer logos **3.50 s** against 3.508/3.503/3.366. Dead on. My earlier reading compared the port's *arrival-to-arrival* timestamps against the game's *visible spans*, which differ by the exit ramp plus the black hold — the whole of the discrepancy I was about to chase. `rest.t` is still the wrong landmark; its blast radius is `_script_settled` waiting longer than it needs to, which is a slow test and not a wrong frame. `dwell_seconds` stays `null`, now for a measured reason. 🔴 **Do not author an Ⓐ→menu dwell**: it measures 3.763 s and contains a 1.53 s guest load stall, third independent reproduction. 🟡 Menu build-in 0.531 s and Ⓑ→title 0.482 s rest on one run and are not authored; the port is within ~0.1 s of both from the disc. |
|
||||
| P4/P7 — which voice presentation | **which of a region's two full-length streams does the game play?** | — | 🟡 **the last unforced decision in the voice pipeline, and it is now unambiguously the port's.** The Decoder's "highest byte rate" was **withdrawn as self-contradictory** — its sentence read *"the highest-rate, highest-gain one is chunk 1"*, and those select different streams (`ADV` chunk 1: 1 118 268 B at 0.0 dBFS; chunk 2: 1 171 516 B at −8.3). Nothing on the disc ranks them: `wEncodeOptions`, channel count and channel mask are byte-identical. Moved to `authored/audio.json` `voice.presentation` per MISSION §3, set to **`loudest`**, and the reason is a measurement of mine rather than a preference: chunk 1 is **mono-in-stereo** and chunk 2 is **dual-mono**, so chunk 2's extra bytes encode a duplicate channel rather than fidelity — which explains the rate difference and removes the only argument for it. What settles it: **one capture of the intro with dialogue audible.** That did not ride the settle-time boot, which drove the title path and never played the movie with audio. |
|
||||
| ~~P3/P5 — the title plate~~ | ~~does the idle title show `PRESS Ⓐ`~~ | Q2 | ✅ **answered and TAKEN at this iteration.** `auto/no-disc-and-menu-captures` at `fb536df`, `docs/re/title-plate-delay-measured.md`, traces in `docs/re/data/plate-timing-run{1,2}.tsv`. It is the third case: build 4 alone, then the plate composited over it. ⚠️ The delay is timed from where build 4 **stops animating**, not from where it first appears — measured the other way the two runs differ by 0.48 s against 6 ms. `ScreenView` now draws two builds at once, as a second `ScreenView` in the same `SubViewport` rather than a subordinate screen inside one. The onset question above is what is left. |
|
||||
|
||||
| P3 — the plate's PULSE | **does the plate's focus record loop, and with what period?** | Q2 | ❔ **open, and the port's earlier reading of it was wrong.** The port had looked for the pulse in `ptbtn00`'s own group; `5b0a6e6` identifies it as the plate's **focus record** `ptbtn00f` — a glow ramping alpha `0x00`→`0x50` and back, t=6…105. Measured on the running game at 2.12 / 2.19 / 2.34 / 2.31 s, mean **2.24 s**. 🟡 **The port has not taken it.** Looping that record needs a period, and its group is 105 timed units plus the **authored** 24-unit exit ramp = 129 units = 2.15 s — composing an authored constant with a loop assumption to land on a measured number is tuning, not measuring. Separately: the port draws no focus record on `press_start` at all, because the screen has no `buttons` and nothing is focused, so *whether the game always draws it* is its own question. |
|
||||
|
||||
@@ -2790,3 +2790,135 @@ on the first movie anybody checked.
|
||||
|
||||
❔ **Why the disc stores three presentations at all is unanswered**, by either of
|
||||
us.
|
||||
|
||||
## The transcode cache had never hit, because the wipe ran first
|
||||
|
||||
`video::transcode` has carried a cache since P4. It writes a `.cmd` sidecar with
|
||||
the exact ffmpeg command, the source's byte count and its channel count, and
|
||||
skips the encode when all three still match. Its doc comment says why: *"without
|
||||
it every re-export pays ~4 minutes to produce a byte-identical file, and an
|
||||
exporter nobody re-runs is worse than a cache."*
|
||||
|
||||
**It had never hit once.** `main.rs` clears the output tree wholesale — and the
|
||||
`remove_dir_all` runs immediately before the check, deleting the sidecar and the
|
||||
output it stamps. The cache tested a file it had just erased.
|
||||
|
||||
This session ran the exporter **six times** and paid the full Theora encode every
|
||||
one of them, producing five byte-identical files. Roughly 48 minutes. Nothing
|
||||
reported it, and nothing could have: a cache is silent when it works and silent
|
||||
when it does not, and the only symptom is a wall-clock cost that looks like the
|
||||
job simply being slow.
|
||||
|
||||
⚠️ **It is worth being specific about how this hid**, because the ingredients are
|
||||
ordinary. The cache is correct. The wipe is correct. Each carries a doc comment
|
||||
explaining itself, and neither mentions the other. The defect exists only in
|
||||
their ordering, which is stated in neither, and the cost is invisible in every
|
||||
artefact the export produces — the tree is byte-identical either way.
|
||||
|
||||
### The fix keeps the wholesale guarantee rather than trading it away
|
||||
|
||||
The obvious repair — stop wiping — would break what the wipe is for: *a screen
|
||||
that stops being exported stops existing, rather than lingering as a stale file
|
||||
that still validates.* So the wipe now spares exactly `video/`, and
|
||||
`prune_videos` deletes anything in it this run did not claim. Everything else is
|
||||
still cleared outright.
|
||||
|
||||
That is a **cache, not a hand-edit**, and the distinction matters against
|
||||
MISSION §3: nothing in `export/` is authored, the sidecar is derived from the
|
||||
command the exporter itself computed, and any change to the command, the source
|
||||
size or the channel count re-encodes. A modder who edits an `.ogv` by hand gets
|
||||
it overwritten on the next export, exactly as before.
|
||||
|
||||
🟡 **Not measured yet:** that a cached run reproduces the same tree. The claim is
|
||||
structural — the skip is keyed on the whole command string — but "the second run
|
||||
produces the same bytes" is checkable and has not been checked.
|
||||
|
||||
## `settle_time()` — the answer arrived, and it refutes my own 🔴 more than it confirms it
|
||||
|
||||
The Decoder took the port's top ask and measured the boot on a cold profile with
|
||||
no shader cache (`auto/no-disc-and-menu-captures` at `4bd4779`,
|
||||
`docs/re/boot-settle-times-measured.md`). It confirms the *principle* I filed:
|
||||
the title's `rest.t` is 251 units = **4.183 s** where its art is finished at about
|
||||
2 s, so `rest.t` is not when a screen arrives.
|
||||
|
||||
**But my row said more than that**, and the extra part is wrong. It said
|
||||
*"everything the boot sequencer paces off that landmark is therefore late"*, and
|
||||
named `publisher_logo` and `developer_logos`. So I measured the port the way the
|
||||
game was measured — **visible span, not arrival-to-arrival** — with `--film` at
|
||||
4 fps and a per-frame greyscale mean:
|
||||
|
||||
| | port, visible span | game, three cold boots | |
|
||||
|---|---|---|---|
|
||||
| publisher wordmark | **4.25 s** | 4.297 / 4.604 / 4.370 | 0.05 s under the lowest |
|
||||
| developer logos | **3.50 s** | 3.508 / 3.503 / 3.366 | **dead on** |
|
||||
| black hold between | ≈0.25 s | 0.2 – 0.3 s | inside |
|
||||
| title settled → plate | 2.000 s (declared 120 units) | 2.247 s | inside, at ~28 fps presentation |
|
||||
|
||||
**The splashes are not late. They match.** ⚠️ And the reason my earlier reading
|
||||
said otherwise is worth keeping: I had compared the port's *transition
|
||||
timestamps* — 4.68 s and 3.94 s, arrival to arrival — against the game's
|
||||
*visible spans*. Those differ by the exit ramp plus the black hold, about 0.6 s,
|
||||
which is the whole of the discrepancy I was about to chase. This corpus has been
|
||||
bitten by exactly this before, in the plate delay: *"timed from where build 4
|
||||
stops animating, not from where it first appears — measured the other way the two
|
||||
runs differ by 0.48 s against 6 ms."*
|
||||
|
||||
So the port paces the boot correctly, and **`rest.t` is a wrong landmark whose
|
||||
blast radius is much smaller than I claimed**: on the screens the sequencer
|
||||
actually advances off, `rest.t` plus the 24-unit exit ramp lands where the game
|
||||
lands. What it still affects is `_script_settled`, which waits longer than it
|
||||
needs to before photographing — a slow test, not a wrong frame.
|
||||
|
||||
### `dwell_seconds` stays `null`, and the question is now closed rather than open
|
||||
|
||||
`authored/timing.json` says of it: *"If a capture ever times the real boot, this
|
||||
is where that number goes."* A capture has now timed the real boot, and the
|
||||
answer is that **nothing goes there** — the disc's own keyframe groups reproduce
|
||||
the game's dwells to 0.05 s and 0.01 s. The field stays `null` for a measured
|
||||
reason instead of an absence of one.
|
||||
|
||||
### Taken from the same page, and not taken
|
||||
|
||||
* ✅ **The 120-unit plate delay stands.** The Decoder ran a refutation of it that
|
||||
failed instructively: its probe's `title_static` mark gave 3.203 s, which on a
|
||||
cold boot looks like a real effect. It was the instrument — the mark fires
|
||||
during the crossfade out of the attract movie, with the glyph count still 0.
|
||||
Re-measured from content: 2.247 s. **The port changes nothing**, and the
|
||||
declared 120 units is what it keeps.
|
||||
* 🔴 **No Ⓐ→menu dwell is authored.** It measured 3.763 s and contains a 1.53 s
|
||||
guest load stall — the third independent reproduction of that stall, this one
|
||||
on a cold cache, so it is not a warm-cache artefact. It is emulator time, not a
|
||||
game constant.
|
||||
* 🟡 **Menu build-in 0.531 s and Ⓑ→title 0.482 s are not authored either**, and
|
||||
that is the Decoder's own caveat rather than my caution: they rest on one run,
|
||||
where the plate delay and the load stall are each cross-checked against
|
||||
independent prior evidence. The port is within ~0.1 s of both with its existing
|
||||
24-unit exit ramp, so authoring them would replace a disc-derived number with a
|
||||
provisional measured one and gain nothing measurable.
|
||||
|
||||
## The voice presentation is now unambiguously the port's choice, and the recommendation behind it was withdrawn
|
||||
|
||||
The Decoder has withdrawn "highest byte rate": its sentence read *"the
|
||||
highest-rate, highest-gain one is chunk 1"*, and those two criteria select
|
||||
**different streams** — `ADV` chunk 1 is 1 118 268 B at 0.0 dBFS, chunk 2 is
|
||||
1 171 516 B at −8.3. The rule named one and the parenthetical named the other. I
|
||||
implemented the rule faithfully and got the quieter presentation.
|
||||
|
||||
What the file can still say is decoded and does not adjudicate it: the `fmt `
|
||||
chunk is a 32-byte `XMAWAVEFORMAT` whose `+0x20` is a declared
|
||||
`PsuedoBytesPerSec` — 8 142 and 8 530 on `ADV`'s two, matching the computed rates
|
||||
to 0.02 % — but `wEncodeOptions` (`0x10d6`), channel count and channel mask are
|
||||
**byte-identical across the presentations**. Nothing in the header ranks them.
|
||||
|
||||
⚠️ One more observable, measured here and not in that page: **the two
|
||||
presentations differ in channel layout.** `ADV` chunk 1 is mono-in-stereo —
|
||||
channel 2 digitally silent — while chunk 2 is **dual-mono**, both channels
|
||||
identical at −8.318574. So they are not two encodes of one file differing only in
|
||||
rate.
|
||||
|
||||
Also recorded, because it cost the Decoder time: **`sylpheed-cli audio info` is
|
||||
not to be trusted on these.** Its "16 channels / 4310 Hz / 2-bit" is
|
||||
`wBitsPerSample`, `wEncodeOptions` and the channel fields read at the wrong
|
||||
offsets — its XMA1 reader is misaligned. That is a tool in this repository
|
||||
reporting confident nonsense, and it is the second time a renderer or reader of
|
||||
ours has been believed before it was checked.
|
||||
|
||||
Reference in New Issue
Block a user