Skip to content

BDSP AutoStory: settle after every way through, not a fixed wait (fixed-wait audit) - #364

Closed
dayfine wants to merge 10 commits into
bdsp/autostory-mine-floaroma-wipfrom
bdsp/fixed-wait-settle
Closed

dayfine wants to merge 10 commits into
bdsp/autostory-mine-floaroma-wipfrom
bdsp/fixed-wait-settle

Conversation

@dayfine

@dayfine dayfine commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Depends on #226 (base bdsp/autostory-mine-floaroma-wip; the diff shows only this change).

This audits every fixed wait in the AutoStory code that comes after a fade, door or scene and is followed by a move (the 00.04b heal_sandgem fault, lab-B 2026-11-10). It fixes the BDSP cases with the same settle rule as #226: talk_over(), which waits for the fade to finish and the screen to go quiet, with a time limit.

  • The tap step through a door or gate (to_banner) waited 1000 ms and then the next step walked. It now settles, also on the path where the walk before already went through.
  • run_into_center() settled only after a fade it saw. When the run saw no fade but was already inside, or lined up on the door, it walked to the nurse with no settle. Now every way in settles.
  • walk_out_of_center() (Oreburgh whiteout) waited until the screen was bright, then 1000 ms. It settles now.
  • New sim fault class SLOW_FADE_IN: any move after a warp with no settle in between fails.
Game Fixed waits (a) vulnerable (b) harmless (c) unsure
BDSP ~78 4 (tap step through 1000 ms; Center inside/lined-up entry; enter_lit_door 1500 ms; walk_out_of_center) + #226's ~60 (menus, battle UI, polls, button timing, dead door helpers) 8 (walk_into_door 2000 ms, Oreburgh gym door 2 s + 8 s pan, leave_door_south, Rock Smash 5 s, lake intro waits)
FRLG ~30 0 (the 5 s after-warp battle watch comes before every next input) ~25 4 (WARP_FADE_IN 300 ms before the scene check, SURF_ANIMATION 3 s, spinner model, naming-keyboard 2 s)
PLZA 9 0 6 3 (story-data wait steps, keyboard 3 s, not changed)

Detectors that can fire falsely during a fade: battle cues and battle text (00.04b); the walk's "transition" check, where a fade-in reads as a scene change; dark frames read as "no box"/still (SceneJudges already guards this); "no Center floor" on black; "brightness > 40" taken as settled. FRLG: warp_left_scene comparing a frame that is still fading in. The full table, with file:line for each wait, is in ~/BDSPLab/notes/2026-11-11-fixed-wait-audit.md.

Open risk: the inside of a Center has NPCs walking about, and talk_over only ends once the whole screen is still. A visitor walking past changes the screen by 10–13.4, under the stillness threshold of 16, so it still counts as still. The settle should end about 5 s after the fade, and a screen that never reads still ends on the 15 s calm rule. A new sim case checks both bounds. This was not measured on the console.

Testing

  • Before the fix, the BDSP SLOW_FADE_IN sweep was red on 01.02 and 01.05. Both fail on the walk right after a to_banner step. With the fix, every row it sweeps is green. 00.01, 00.04 and 01.11 already fail without any fault injected, so the sweep skips them.
  • PokemonBDSP suites with the headless runner (--filter PokemonBDSP), before (WIP: BDSP AutoStory: Oreburgh Mine map alignment, corridor legs, and Floaroma pathing #226 tip) and after: base 235 passed / 68 failed, after 258 / 69 (the new sweep and the Center settle case are the extra tests). None of the 303 tests in both runs changed status; the failures are fork-only images and story-sim rows that already fail on WIP: BDSP AutoStory: Oreburgh Mine map alignment, corridor legs, and Floaroma pathing #226. Both runs hung at the same tests (Pokemon::Transitions - captured frames: PokemonBDSP, 00.04: the walk to the Poke Mart lady and back) and were stopped there. The Center settle case passes after the slack fix (00d0d9b). It settles 7680 ms after the door when the visitors read still and 17920 ms when the screen is never still.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 3 commits November 11, 2026 00:08
A fault-class sweep for fixed waits after a fade: with
SimWorldKnobs::slow_fade_in, a walk, tap or door run after a door's fade
or a tap step's way through, with no settle() between, fails (lab-B
2026-11-10, 00.04b heal_sandgem). FaultClass::SLOW_FADE_IN runs it over
every row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The fixed-wait audit (lab-B 2026-11-10, 00.04b heal_sandgem) found three
more places that waited a fixed time after a fade and then moved:

- A tap step's way through (to_banner) waited 1000 ms and the next step
  walked; the slow fade-in sweep failed 01.02 and 01.05 there. It now
  settles (talk_over()), on the "through already" path too.
- run_into_center() settled only after a seen fade; the "inside" and
  lined-up ways in walked to the nurse at once (or after enter_lit_door()'s
  1500 ms). Every way in settles now.
- walk_out_of_center() (Oreburgh's whiteout) waited for daylight plus
  1000 ms; it settles too.

A sim case checks a Center's inside settles in bounded time: visitors
walking past read still (under WALK_TAP_BLOCKED_CHANGE), so 5 s after the
fade; a screen never still ends on the 15 s calm rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Code health: no char* in the Center settle case; the new labels built
with std::format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The quiet is judged a look (a press) or two after it starts: the still
case ends 7680 ms in, past the 7500 ms bound. 2000 ms of slack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 6 commits November 11, 2026 07:00
…ttle

Brings #128's seam work down through #167 and #226. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ttle

Picks up #226's code-health fixes after the #128 merge. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
Brings #128's seam work down through #167, #226 and #364. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine

dayfine commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Folded into #375, the consolidated BDSP console stage (#167 + #226 + #364 + #375, base bdsp/autostory-v4); this branch stays as its history.

@dayfine dayfine closed this Nov 12, 2026
dayfine added a commit that referenced this pull request Nov 12, 2026
…with #128) into lab/dev-bdsp

Brings #128's seam work (StoryRun shell, start gate, golden plans, fault
sweeps) to console B's branch through #167/#226/#364/#375 and #400.
No plan file changes: every BDSP plan JSON stays as lab/dev-bdsp had it.
Conflicts:
- PlannedRoute_Tests.cpp: theirs. This branch's extra lines were the
  cherry-picked SimulatedRouteIO and its blocked-from-several-tiles case,
  now in SimulatedRoute_Tests.cpp on #375.
- CommonFramework/Main.cpp: keep this branch's cleanup after the
  command-line test mode return (headless runner), with main's PA_SDL
  gamepad tracker stop added to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine deleted the bdsp/fixed-wait-settle branch November 13, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant