Both slices add a worker to the same launcher and CLI; the resolution keeps
both: the legacy-agent and legacy-environment subcommands, launch structs,
flags, flag round-trip rows and the flybrain-core/flybrain-gb/flate2
dependencies. Cargo.lock regenerated by cargo.
tests/rom_memory_image.rs runs a live arm and a shadow task+executor that
reads only per-boundary images and the cartridge, from nine rom-env
checkpoints: every MacroState answer, deal, pad, decision, reward, ledger and
rollback compared frame by frame, and every shadow read inside the captured
ranges. Plus the gameboy-memory-inspection-v1 encoding against the session
types.
One read-only bulk read in the shim, fly_gb_read_memory_image: the address
space's memory in address order, the register windows (VRAM, OAM, I/O) read
$FF because binjgb's catch-up on a register read moves the exported state.
MemoryImage, Cartridge and ImageReader put an image and the ROM behind
MemoryReader, so the same macro engine and adapter run over it; the
emulator's bank reads go through the same Cartridge. ROM tests prove the read
leaves the state byte-identical, equals the single and cached reads, changes
nothing downstream, and measure its cost.
tools/pii-scan.sh scans the tree, a commit range (added lines and messages) or a push
(pre-push protocol, incl. annotated tag messages). Generic shapes stay in the script; the
proper nouns move to the operator's private list ($FLY_PII_PATTERNS), which can also name
env files whose values are matched as literals and never printed. lint.sh section 5 now
runs it (a missing list is a note, so public CI still passes) and no longer spells the
names with one bracketed character. tag-release.sh fails closed without the list and scans
the tree and every line since the previous tag. tools/install-hooks.sh installs a pre-push
hook that scans pushes to github. Tests in infra/tests/pii-scan-test.sh.
The Twitch app id/secret entry names were spelled in 06-secrets.sh defaults and four docs.
06-secrets.sh now takes BRIDGE_ID_KEY and BRIDGE_SECRET_KEY from the env file (placeholders
in example.env) and skips twitch-app with a warning when they are unset; the docs use
twitch/<app>-client-{id,secret}, twitch/<bot>-token and twitch/<channel>-key.
On the first visit the Viridian clerk's script hands the parcel over, and
his counter sells nothing until Oak has it. MacroState::parcel_delivered
reads EVENT_OAK_GOT_PARCEL (defaulted true).
docs/design/macros.md 12.30 and infra/docs/macros-traps.md row 66: the
GO SHOP ring, the one-button purchase, the bag after a catch, and the
measured choices with the connectome.
The no-PP checkpoint is a trainer battle with a party of one and no Potion:
RUN, THROW BALL, ITEM and SWITCH have nothing behind them, and spent moves
are off the pad since 12.23/12.27, so MOVE 1 (FIGHT, then Struggle) is the
one button and the battle ends in 1,487 frames. The assertion demanded a
second button; it was red on main whenever FLY_NOPP_CHECKPOINT was set.
From the live checkpoint: on every own-turn frame the pad deals every move
with PP and an effect, and a uniform choice beats the Jr. Trainer the live
readout lost to 29 times. FLY_ROW67_CHECKPOINT.
A whiteout ring in the Pewter Gym ran for an hour and a half without a
flag: every macro completed, and a stray tile reward on a walk back reset
the unrewarded rule. Reward lines now carry their rewardKind, and
unwon-battles flags 24+ MOVE n decisions with no wildwin/trainer/badge
reward in the window, on two probes, with no new ground. Report only, as
every check-10 rule; lint case 8 fails on main and passes here.
FLY_TRACE carries digests, not the frames or the {boot, bound, location} context, so it checks
a worker rather than drives one. legacy_parity gains read_frame_trace and check_against_trace
(ticks, clock, exact remainder, rates digest, spike-set digest, decision; the script held to the
trace's sugar, frames, rewards and rollback), RestoredSource, and
AgentDriver::seed_from_legacy_state for a worker started from a FLYSIM01 agent state.
flysim/tests/agent_trace_parity.rs runs LegacyFrame on the ROM with the trace on, records the
missing inputs, and checks the direct reference and the worker in-process, on a thread and as a
process: toy raw from power-on (FLY_ROM), and gameboy-legacy-fafb-v783-v1 macros mode from a
stream checkpoint with sugar and a ratchet rollback (FLY_AGENT01_FAFB=1). fly-session is a
flysim dev-dependency only.
A FLYSIM01 import starts learning.updates at the legacy plasticity.updates
(legacy_reinforcements): starting at zero broke changed <= updates on the live checkpoint.
Operator decision on row 66. Measured with the connectome, the fly walked
to the Viridian clerk again and again and never chose TALK, so the four
choices a purchase took at the counter never happened. BUY BALL is now also
offered on the overworld pad inside a mart whose first stock row is a Poke
Ball (Viridian, Pewter, Cerulean), while service_needed holds (no ball,
money for one, no Oak's parcel) and the clerk is not in the blocked window.
One press walks to the clerk, talks, advances the greeting to BUY/SELL/QUIT
(checking the first row is a Poke Ball), buys one, answers the price box
and is done when the wallet drops. The open-counter BUY BALL is unchanged.
Unit test for each offer condition; ROM row66 floor purchase from
FLY_ROW66_MART_CHECKPOINT: base never dealt on the floor, no ball; branch
dealt, started, done, one ball, 200 paid.
trap_hunt: a shop/ball/catch tally (pad frames, starts, outcomes, balls,
party+box, Pokedex owned, mart entries) and FLY_TRAP_LOG_MACROS=1.
scene_probe offers: catch, party and Pokedex counts, FLY_PROBE_SCREEN_*
screen dumps, FLY_PROBE_SAVE_MART to save a mart entrance.
Row 62 re-deals GO SHOP/GO HEAL whenever the service is needed, with no
window. Live on v0.6.5 from the rung-8 archive that was a ring: GO SHOP to
the Viridian clerk, GO OUT/GO OBJECTIVE back out without TALK, GO SHOP again
(33 in 35 minutes). A completed GO SHOP/GO HEAL facing the counter person now
records TargetKey::Counter on the building's map; the service walk toward it
is withheld for the reached window, from the street and inside. TALK at the
counter is unchanged.
ROM row66 test (FLY_ROW66_MART_CHECKPOINT): base 31 street GO SHOPs in 10,000
frames, branch 0.
wListMenuID keeps ITEMLISTMENU after the list closes, so from a catch to the
end of the battle (caught text, Pokedex page, nickname offer, naming screen)
the pad read as the bag: BACK and THROW BALL, whose A presses typed the name.
The bag now also needs its TextBoxBorder at (4,2)-(19,12).
rom_catch: row66 test (THROW BALL dealt after the catch: base 666 frames,
branch 0), and both tests retry from idle offsets because one ball misses
about two throws in three and frame timing decides which.
The emulator half of flysim's LegacyFrame behind the environment methods:
the one-frame setup scaffold, one joypad batch per Advance, f32le audio
(sample/255, unfiltered), the per-boundary memory image behind the MEM-01
seam (read between an export and an import, because emulator_read_mem syncs
OAM/VRAM/timer/STAT/LY), gameboy-slots-v1 SaveSlot/RestoreSlot, capture and
staged restore, and the world's half of FLYSIM01. SaveSlot, RestoreSlot and
Agent.Rollback are step mutations under the ipc-v1 operation key. The parity
harness (toy cartridge, direct reference in LegacyFrame order, bus driver,
FLY_TRACE replay) is in legacy_env_parity.
Agent.Initialize checks the profile against the dataset fingerprint and
warms up as the legacy fresh start does; Prepare applies sugar, ticks the
548625/32768 ms frame on the rational clock and decodes with
gameboy-readout-context-v1; Commit installs the frame, stimulates, then
reinforces once; Agent.Rollback is legacy-ratchet-rollback-v1's agent
half; capture is agent_to_chunks in an envelope and a restore resets the
readout transient as a fresh legacy process has it.
Cerulean's badge house back door leaves the fly on (9, 9), the door tile of a
closed yard; the pad was empty for the rest of the survey.
- The exit walks fall back on a step-fired warp underfoot once every listed
goal has failed the route search (goals_of set it aside while any other exit
was listed, reachable or not).
- The decoded grid marks warp carpets (warp_carpet_tile_ids.asm) on the maps
whose ExtraWarpCheck reads them; a walk whose goal is a warp underfoot bumps
toward one (CheckWarpsCollision) instead of row 64's sideways step-off, which
fires nothing on a tile that is no door.
- The badge house is on the map graph and the yard is a piece of Cerulean, so
GO OUT in the house takes the front door.
- path::exits keeps the fly's own piece on a split map: refusals from the yard
no longer rest the town's exits for the whole map.
- The 12.28 guarantee reads where the fly stands: a same-map teleport moved it.
ROM test row65_the_fly_leaves_the_cerulean_badge_houses_back_yard
(FLY_ROW65_YARD_CHECKPOINT); scene_probe's route survey can save its caught
frame (FLY_PROBE_SAVE without FLY_PROBE_SAVE_RANK).
GO OUT's "a room has to be leavable" tier dealt Mt. Moon 1F's mouth back onto
Route 4 (visited, away from the rung) one step from the tile the fly arrives
on, and Route 4's GO ROUTE / GO OBJECTIVE walked it straight back in. With row
62's GO HEAL bringing a hurt fly back to that tile, rows 62+63+64 crossed
Route 4's west doors 34 times in row 59's ROM test (bound 25).
While an unrested passage leads toward the objective, the way out has no
fallback: GO WARP's rule the other way round. The blocked window is the escape
hatch; tiers one and two (somewhere new, toward the objective or an errand)
are untouched, and a hurt party keeps GO HEAL.
The ROM suites return early and count as passed when FLY_ROM or their
checkpoint variable is unset; v0.6.4's gate ran that way and the merge
of rows 62-64 looked green while row 59's ROM test failed. Require
FLY_ROM and log every checkpoint suite left unset.
review-row62-r2: merged, the Mt. Moon centre is the errand ahead of the
test's goal on Route 4's west side; the behaviour is right, the fixture
predates row 62.