Repository navigation
Conversation
…tion, engine) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…kpoints (set_pause_points) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
# Conflicts: # SerialPrograms/Source/Pokemon/AutoStory/Engine/Pokemon_StoryEngineRuns_Tests.cpp
Moved from the FRLG stack, where 0ac33f9 added it inside a game PR (FRLG names its route screenshots by the step under way). (cherry picked from commit 0ac33f9, Pokemon_StoryBreakpoints.h only) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
TEXT_BOX -> DIALOG_BOX, BATTLE -> BATTLE_STARTED, CAN_MOVE -> PLAYER_CAN_MOVE, STILL -> SCREEN_STILL; Pokemon:: screen event names are now in PokemonAutomation (CommonTools/ScreenEvents). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Adds Pokemon_StoryFailureClasses: 27 classes as data rows (id, meaning, how a run sees it, the sim faults that inject it, the engine Outcome names it covers, a retry hint), the maps from every sim FaultClass and every engine failure name to a class, and a "class=<id>" tag that log lines and run records can carry and read back. No game uses it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
FRLG's fault sweep injects it (11.01, console B, 2026-11-12); the story failure class mount_lost now lists it as its sim fault. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Code Health's test-case rule wants each UnitTest built from one case struct of name, input and expectation, with the name outside the input. Move every case's name from its Input to the case itself, nest the RngHandoff input and expectation structs, and give the first-save, captured-transition and move-mechanics cases explicit names (the same test names as before). Assertions and test bodies are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
An Outcome may carry its StoryFailureClass (outcome_failed's third argument, for a game's own failure names); failure_class_of() falls back to the shared list's class for the name. The engine's failure lines ([Event], [Checkpoint], [Step], [Segment], [Verify]) end with "(class=<id>)" when the class is known, and an OperationFailedException that leaves an event is logged as class=operation_failed. Pokemon_StoryFaultSweep: a game gives its sweep as data (rows, an injector per sim fault, the known-failing list); the engine makes one test per class and row, named "<row>, <class id>", judges it, and checks the known-failing list names only its tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…/fault-classes # Conflicts: # SerialPrograms/Source/Pokemon/AutoStory/Engine/Pokemon_StoryEngine_Tests.cpp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
… run The shared wire cases at PokemonSimulation 866613f (and its main) still use the old pose (certainty/where) and per-kind step fields; since the #312 review the native reader reads steps as an action plus typed args, so every kind case without args failed. The Python reader still checks those cases; the native codec is covered by its own CTest cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…onformance run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…st-case) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
… on #312, ScreenEvents case names Conflicts: ScreenEvents_Tests.cpp takes #313's case struct (name outside the input); the story-data README keeps this branch's reader-only text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…eview) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…known (#312 review) checkpoint_end_pose() stopped looking back only at LEGS, so a STEP after a route kept the route's target as the end and the tile check failed a run that worked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
… step Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…and #313 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
AutoStory: story step types and engine (split from #122, layer 1 of 3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
story_failure_class_info() throws for a class with no row in its place, and a test checks every class has one.
Covers the first frame's rises, rose/fell edges, the capacity drop and describe().
…again StoryDataTests takes the path of a pokesim-story-wire-cases/2 file, reads each case with the native pose, step and checkpoint readers and checks the accept/reject and the record read. The workflow pins PokemonSimulation 4e023f3 (#104, cases in the action-plus-args form) and runs it on all three platforms.
Answers the #312 review: the Switch FireRed/LeafGreen are the GBA releases reissued, one version per language with no in-game option, so all six languages stay (as in upstream's FRLG programs). Gen 8-9 games have one Spanish, so one "es". Code that reads text takes the language option.
…e fails loudly The standalone main moves to devtools/story-data-tests/StoryDataMain.cpp so program source no longer includes a devtools header; other argument counts print usage and exit 2. The wire-case reader reads a case's own fields outside the try, so a malformed case file throws instead of reading as a rejection. Also plain statements for the verified fields and explicit includes.
… and pins the dev_only skip
Fix shared AutoStory engine review nits
Story data codec: run the shared wire cases natively again
A watch that ends in wall time reads a window full of dropped frames as "not seen". FrameCoverage records the capture times of the frames a watcher was handed and finds the largest gap in the window; judge_watch() returns SEEN, NOT_SEEN (frames cover the window) or UNKNOWN (a gap longer than max_gap). CoveredWatcher wraps any VisualInferenceCallback and can stop on the first frame captured at a deadline; run_watched() and watch_for() end a window in frame time, bounded by a wall-clock cap.
Game languages: FRLG keeps six languages, one Spanish (#312 review)
Review of #114 (dropped frames): - A hold watcher fires a hold after the screen shows, so a screen that shows in the window's last hold fired only after the watch stopped. CoveredWatcher now keeps watching until a frame captured `tail` after the window's end, still bounded by the wall-clock cap. - largest_gap rounds up to whole ms, so a gap a fraction over max_gap is UNKNOWN, not NOT_SEEN. - Frames captured before the window opened are not handed to the wrapped watcher, so a fire on one is not SEEN. - The window's end is a constructor argument (watch_for) or set by end_at() between sessions (run_watched), documented as such. - WatchLimits carries max_gap, tail, cap and the poll period; run_watched checks only fired(); <cstddef> for size_t.
StoryCheckpoint::postconditions gets = {} so designated initializers that
leave it out build on Windows Clang (-Wmissing-designated-field-initializers).
The eight AutoStory test tables now hold each case's name next to its input
and expectation, as code health's test-case rule asks; the step JSON tests
pass the name to the readers as the parse source.
Windows Clang errors on designated initializers that skip a field (-Wmissing-designated-field-initializers). A syntax check of every .cpp nav/shared touches, with the Compiler.h pragma disabled, found only these.
run_settle() is one settle loop over TalkOver for every game, with the rule for each SettleKind (talk, after a warp, door) in one table. The door rule (1 s of the player still, 2.5 s calm, a look every 200 ms) comes from the BDSP tree as TalkOverRule's quiet and still fields and the PLAYER_STILL screen event. run_center_visit() is the shared order of a Center visit: in, settle, check inside, heal, out, settle (door or after warp), check outside. Games give the walks, reads and nurse through CenterVisitIO.
Door times private to the settle table, SettleEnd::Result nested, the IO last in run_settle() and the visit functions.
…sp/seam5-adopt # Conflicts: # SerialPrograms/Source/CommonTools/ScreenEvents/ScreenEventTypes.h # SerialPrograms/Source/CommonTools/ScreenEvents/ScreenEvents.cpp # SerialPrograms/Source/Pokemon/AutoStory/Pokemon_SceneJudges.cpp # SerialPrograms/Source/Pokemon/AutoStory/Pokemon_SceneJudges.h
talk_over() and StoryStepIO::settle run Pokemon::run_settle with settle_rule(kind); BDSP's SettleKind and TalkOverRule::door give way to the shared ones. ConsoleStory::heal and the sim's heal run Pokemon::run_center_visit through BdspCenterVisit (enter_lit_door, talk_to_nurse, run_into_door; pokemon_center_inside or indoors() as place()). The sim's play_scene runs the same loop. New sim cases for a slow Center fade-in, late fades and a run out that stays inside (heal_exit); fault sweep LATE_FADE and SLOW_FADE_IN on Center visits.
…or watching games
…the policy asks BDSP's title plays an attract movie, a town with people walking, that reads as the overworld; on console B (2026-11-15 03:42) the launch settled on it before the title took a press. A policy with overworld_after_load answers such a look with the title press and counts the overworld only after a title press and then the load's black.
Console B, 2026-11-15 04:21 (BDSP, Japanese): ZL on the title's attract movie went back to the title through a black, and that black counted as the load; the title, read as the overworld, then settled. With overworld_after_load, a press on an overworld look no longer arms the load, and a title showing again clears a black seen before it.
Console B, 2026-11-15 04:21, the game in Japanese: the launch never read the title (its check, a quiet screen, never held: the title shows PLAYER_CAN_MOVE) and settled on it. title_screen_shown() reads the red line under the logo and the starfield's dark bottom corners, which every language shares; the launch look carries it as TITLE_READING, and the policy turns on overworld_after_load so the boot's logos and the attract movie take ZL without counting as the overworld.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #523, #546. Base
bdsp/seam4-adopt; #546 (autostory/center-settle) is merged in, so until #523's base hasnav/shared's commits the diff also shows #546 and its parents. This PR's own change is commit 4d9881a.BDSP AutoStory moves onto seam 5's shared settle loop and Center visit (#546's adoption list, step-5 design note decisions 1-6).
talk_over()is aSettleIOover the console (observer, B/next presses, wild-battle flee) and callsrun_settle;TalkOverSpec::rulebecomessettle(aSettleRule).StoryStepIO::settlepassessettle_rule(kind). BDSP'sSettleKindandTalkOverRule::doorare gone: the merge took AutoStory: shared settle loop and Pokemon Center visit #546'sSceneJudges/ScreenEvents, and the door timings (1 s / 2.5 s, 200 ms looks) are now the shared table's.run_into_center/CenterEntrygive way toBdspCenterVisit : CenterVisitIO(runs north in and south out on theStoryStepIO, its settle).ConsoleStory::healrunsrun_center_visitwith a console subclass: route turn before each run,enter_lit_doorlineup,talk_to_nurse+ B through her last line,place()=pokemon_center_insideorindoors()(the old exit check's room read). A failed check now returnsheal_enter/heal_exitinstead of throwing.play_scenerunsrun_settleon a scripted clock;SimExecutor::healruns the same visit (SimCenterVisit), the nurse not played;SimCenterDoorsknobs per heal step (slow fade-in played through the door settle, late fades, a run out that stays inside).Testing
Console failure on the simcases: 00.04b with a 4 s Center fade-in, with late fades at both doors, and with the run out stopping inside (r143a, must failheal_exit; red before, as the sim never walked out).late fades at a Pokemon Center's doorsclass per row;slow fade-in after every warpnow also plays a 4 s Center fade-in on every heal step. Known-failing lists unchanged.