This repository has been archived on 2026-09-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Syplheed-Reborn/docs/re/structures/mission-objective-counter.md
Sylpheed RE agent 2c5f653bce docs: a clean scan for REMAINING OB, and one candidate that is hard to dismiss
With the launcher repaired the scan could be run the way the method asks: the HUD
was confirmed at 004 immediately before AND after the 0.9 s scan, and the filter
was taken at a confirmed 012. That leaves 17 candidates from 39596.

One of them is 0xbdb49668 - the run-1 address minus exactly 0x10000, at the same
page offset 0x9668. Checked rather than admired: of all 39596 words holding 4 at
scan time, exactly TWO sit at that page offset, so a survivor landing there by
chance is a ~5e-5 event. The reading it suggests is testable - the counter sits
at a fixed offset in an allocation whose base moves by whole 64 KB pages.

Recorded as amber, not green, and the reason is written down: the later sample
that killed 10 of the 17 was taken during the GAME OVER flash, with no HUD on
screen, so the seven survivors are unrefuted rather than confirmed. The mission
ended because the escorted ACROPOLIS was lost at ~13 min while pilot.py sat in
EVADE/RETIRE; REMAINING OB held at 012 for the ten minutes before that, so there
was no transition to verify against.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMRJjbxLqZtsb5Vb7KunPE
2026-08-23 18:04:29 +00:00

153 lines
7.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# `REMAINING OB` — the mission's own objective counter, in RAM
**Status:** ✅ `CONFIRMED` for one Stage 02 run: a **big-endian u32** whose value
is exactly the HUD's `REMAINING OB`, verified across two transitions it was not
selected by. 🟡 the address itself is from one run — **cross-run stability is
untested**. ❔ what it counts, and whether objective-marked entities carry a flag.
## Why it matters
[`autopilot-memory-driven.md`](../autopilot-memory-driven.md) ranks this its
problem #2: a pilot that flies well but ignores the objective cannot finish a
mission. Its 300 s run took no damage, killed one fighter, and watched
`REMAINING OB` **rise** from 004 to 011 as waves spawned. Reading the counter is
what turns "shoot whatever is nearest" into "shoot what closes the mission".
## The find
Guest VA **`0xbdb59668`**, big-endian u32, in a Stage 02 run on the
[upstream baseline](../upstream-baseline.md).
| time | RAM `0xbdb59668` | HUD |
|---|---|---|
| selected on | 18 → 24 | 018 → 024 |
| t+40 s | 24 | 024 |
| t+75 s | **23** | **023** |
| t+110 s | **22** | **022** |
| t+145 s | 22 | 022 |
| t+180 s | 22 | 022 |
The two middle rows are the ones that matter: the candidate was filtered on the
18→24 transition, and it then tracked 24→23→22 on its own.
## Method, and the two traps in it
`tools/re-capture/ob_scan.py`. Scan one snapshot for the current value, then
filter that candidate set against **live** `/dev/shm/xenia_memory_*` at the next
distinct value. Only the first pass needs the 4.8 GB copy.
**🔴 Filter on a change, not a repeat.** The first attempt scanned at 19, filtered
at 19 again, then at 18 — and left **zero** survivors. The value moves between
the memory copy and the screenshot that reads it, so "still 19" is not reliable.
Scanning 18 and filtering on 24 gave exactly one candidate on the first try.
**🔴 Verify across a transition you did not select on.** An earlier differential
over 19→18 also gave exactly one candidate, `0xbc22e83c` — and it was **wrong**:
read live it held 26 while the HUD showed 017. It was an unrelated counter that
happened to step 19→18 in the same window. One matching transition is not
evidence; the same offset tracking a *later*, unselected change is.
## What is not settled
* 🟡 **Cross-run stability.** `0xbdb59668` is from a single run. The corpus's
other runtime finds are re-scanned per run, so the durable result here is the
**method**, not the number. Testing whether the address repeats costs one boot.
* ❔ **What it counts.** It rose 18 → 24 while waves spawned and fell as things
died, so it is objective targets remaining, not kills. Whether every `OB`-badged
entity is one of them, and whether that badge is a flag in the entity object, is
the natural follow-on — and it is what the pilot actually needs to *choose*
targets rather than merely know how many are left.
* ❔ Whether the same address holds for other stages.
## 🔴 2026-08-23 — cross-run stability: **REFUTED**
`0xbdb59668` does **not** repeat. A second Stage 02 run on the same baseline
(rebuilt per [`../dynamic-re-state-restore.md`](../dynamic-re-state-restore.md))
reads **0** at that address for the whole mission while the HUD counts up:
| HUD | RAM `0xbdb59668` |
|---|---|
| `004` (t+18 s, flight entry) | 0 |
| `008` | 0 |
| `012` (held for ~5 min) | 0 |
A **second, independent** run of the same mission repeats it: at `TIME 01:08.96`
with the HUD on `REMAINING OB 004`, the word is again **0**
([`../captures/stage02-inflight-run2-ob-address-zero.png`](../captures/stage02-inflight-run2-ob-address-zero.png)).
Read three times back-to-back at `004` — all zero — and `±64 bytes` around it are
zero too. The page is **not** a sparse hole (`SEEK_DATA` at the offset returns the
offset itself; the next hole is 5 MB later), so this is an allocated,
zero-filled word, not an unmapped read. The number was a **per-run artefact**, as
this file already suspected; the method is the durable part, and every future
session must re-scan.
**And re-finding it in the new run failed too — recorded because both failures
are instructive.** Two candidates were produced and both were killed by the
"verify across a transition you did not select on" rule:
* `0xbc2377dc` — held 12 at selection, then went 12 → 18 while the HUD stayed
`012`, and was reading **3** two minutes later at HUD `012`.
* `0xbd295b04` — read 12 once, then 0, 21, 54, 46, 4 in the next 50 s. Noise.
🔴 **A correction to this file's own method note.** The trap is *not* that the
scan is slow: `ob_scan.py scan` over the live `/dev/shm` image takes **0.9 s**
(9 555 hits at value 12; the SEEK_DATA extent walk skips the sparse 4.6 GB). The
real trap is that **`REMAINING OB` climbs fast early in Stage 02** — `004` → `008`
→ `012` inside about four minutes as waves spawn — so a scan is only valid if the
HUD is confirmed to hold the same value **immediately before and after it**. The
earlier `4 ∩ 8` intersection here came back with no survivor for exactly that
reason: the value-8 scan was actually taken at 12.
**What blocked finishing it:** with the pilot in `RETIRE` (hull 340/1500) nothing
was killing objectives, and the counter sat at `012` for five minutes — no
transition to filter on. A run that intends to find this address needs a pilot
that is still *engaging*, which is the same constraint
[`../autopilot-memory-driven.md`](../autopilot-memory-driven.md) records.
**Unchanged and still open:** what the counter counts, and whether an `OB`-badged
entity carries a flag in its entity object. Nothing in this pass touched that.
## 🟡 2026-08-23 (later) — a third run, a HUD-clean scan, and one candidate that is very hard to explain away
With the launcher repaired the scan could finally be run the way the method
asks. **HUD confirmed `004` immediately before *and* after the scan** (0.9 s), so
the 39 596-entry candidate set is valid at that value; then filtered when the
HUD was confirmed at `012`.
| step | HUD | candidates |
|---|---|---|
| scan | `004` (confirmed both sides) | 39 596 |
| filter | `012` (confirmed) | **17** |
| later sample | — (see caveat) | 7 still 12 |
**The survivor of interest is `0xbdb49668`** — the run-1 address `0xbdb59668`
**minus exactly `0x10000`**, at the identical page offset `0x9668`.
**That is not a cheap coincidence, and it was checked rather than admired.** Of
all 39 596 words holding `4` at scan time, exactly **2** sit at page offset
`0x9668`; one of those two is in the 17, and it is this one. A survivor landing
there by chance is a ~5 × 10⁻⁵ event. The reading it suggests — the counter lives
at a fixed offset inside an allocation whose **base moves by whole 64 KB pages**
between runs — is a testable claim, not a story: a third scan should again land
on `…9668`.
**Why this is 🟡 and not ✅, stated plainly.** The corpus's own rule is that a
candidate is believable once it tracks a transition it was *not* selected on,
against the HUD. This one has not done that yet:
* The "later sample" that killed 10 of the 17 was taken **during the GAME OVER
flash** — the escorted ACROPOLIS was lost at ~13 min — so the HUD counter was
not on screen. The ten that *moved* are genuinely refuted; the seven that did
not move are merely **unrefuted**, which is a much weaker thing, and the
counter may simply be frozen once the mission ends.
* Between the filter and the mission end, `REMAINING OB` sat at `012` for about
ten minutes: `pilot.py` spent the window in EVADE/RETIRE at hull 822/1500 and
killed no objectives, so there was no transition to use.
**The one experiment that settles it:** a run where the pilot is still engaging,
scanning and filtering as above, then watching `0xbdb4·9668`-equivalent across a
HUD-verified change. The blocker is the pilot's survival, not the method — and
the same run would answer whether the page offset repeats, which is the stronger
result of the two.