Repository navigation
Conversation
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: deeba2b
Verdict
NEEDS_REWORK
Correctness read: the pre-watch (StoryWalkSteps::mash, ~line 740) only waits; it presses nothing, and settle() -> talk_over() runs after it. So a scene that starts late is still caught, but only inside a much smaller window: 3 s pre-watch + 5 s quiet (TALK_OVER_QUIET) = about 8 s from the start of the step, down from 15 s + 5 s = 20 s. A scene that first shows its line after ~8 s (camera zoom, slow NPC walk-in; the Roark talk in the same file already allows 8 s for a zoom, r98) is judged over, and the program walks on mid-scene. The PR does not show this is safe, and the new test cannot show it. Findings:
PokemonBDSP_AutoStory_StoryActions_Tests.cpptest_scene_start_waits: it only checks that each MASH step'sdialog_withinwait is <= 3000 ms. That restates the constant (3000 appears again as a literal) and passes for any implementation that calls dialog_within(3 s), including one that then ends the scene early. It never runs a late scene. Add a case through the real mash/settle path withfirst_lineknobs for a MASH step: first line at 6-7 s must still be pressed through to the end of the scene; and a line at ~9 s must be a stated, tested outcome (fails loudly or is handled), not silent. SimFailureCases_Tests.cpp ~245 does this for one TALK step at 7000 ms; copy it for mash. Pick the window from measured console data (the three 00.01 scenes that waited 15 s), and say what the longest real first-line delay is.- Same test:
SimMisses::dialog_waitsis keyed by step name (m_step), and a later call overwrites an earlier one. If two rows share a step name the check reads only the last wait. Key by row + step, or record the max. - Same test: the sim only runs 00.00 to 01.11 (
run_rows_on) but the loop covers every row instory_steps(). A MASH step in a later row fails with "did not check for its opening line". Today it passes only because none exist; bound the loop to the same range. The brief asked whether all 23 MASH scenes are covered: the test logs the count but does not assert it; assert the expected count or derive it from the data. SCENE_START_WAITis a single constant but two other optional-line waits remain as literals in the same file (dialog_within(10000ms)~line 303,8000ms~729) and 2000 ms in PlannedRoute.cpp (837, 949). If the rule is "scene start waits are short because settle covers the rest", sweep and name those sites, or say why they differ. Right now it patches the mash symptom only.- The comment above SCENE_START_WAIT says a delayed scene has 8 s; put that number in code (
SCENE_START_WAIT + TALK_OVER_QUIET) and use it in the test instead of the literal 3000, so the two cannot drift. - Log text: "no line within {} ms; the step before may already have played it." is a WARNING on the normal path now (the step before usually did play it), so it will warn in most runs. Make it a LOG.
Style otherwise fine: Milliseconds, braces, CRLF kept, no tabs. CI green.
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: deeba2b
Verdict
NEEDS_REWORK
Re-check at 2026-11-16 16:10Z: no rework has been pushed. The branch head bdsp/autostory-optional-dialogue-waits is still deeba2b, the SHA reviewed at 07:58Z (last commit 06:40Z). None of findings 1-6 in the earlier review are addressed yet. That review stands as the rework list:
- Add a late-scene test through the real mash/settle path (first line at 6-7 s is pressed through; ~9 s is a stated, tested outcome). Base the window on measured console delays.
SimMisses::dialog_waitskeyed by step name overwrites; key by row+step or keep the max.- Bound the test loop to the simulated range (00.00-01.11) and assert the MASH scene count.
- Sweep the other optional-line waits (
10000ms,8000ms, PlannedRoute 2000 ms) under the same rule, or say why they differ. - Express the 8 s window as
SCENE_START_WAIT + TALK_OVER_QUIETand use it in the test instead of literal 3000. - Downgrade the "no line within ..." WARNING to a LOG.
|
The core timing objection was correct, so I replaced the global 3-second reduction in
I left the other Code health: 0 failures. Fork Draft CI is green at |
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: 68d3f7b
Verdict
NEEDS_REWORK
Re-review of 2edb8e3 and 68d3f7b. Read from the diff, the walk steps in context, the sim's play_scene/settle and the 00.00 to 01.11 plan data. No build of my own; CI green, and local code health has 0 failures.
The new design is better than the 3 s cut. It keeps the 15 s guard and skips the wait only after a settle that pressed through dialogue. Earlier findings 2 (the max is kept per step name), 3 (the loop is bounded to 01.11 and asserts 23) and 6 (the skip logs at STATUS) are addressed. I accept the reasons given in the reply for leaving the 10 s, 8 s and 2 s sites alone (finding 4). Finding 5 no longer applies now that the window is 15 s again. Finding 1 is not met yet:
-
mash_scene_speaks_lateis vacuous (SimFailureCases_Tests.cpp ~251). It passes with the old 3 s wait too. WithSCENE_START_WAIT = 3000ms,dialog_withinreturns false for the 7 s and 9 s knobs,mashonly notes a WARNING (GridSimRouteIO::note throws only on FAILURE), and thenSimStoryStepIO::settleplays thescenesknob straight through. It ignores how late the first line is, so the run completes. The test cannot fail on the regression it is named for. Put the delay the pre-watch did not cover into the scene itself, e.g.{sim_pause("Barry still walking up", delay - waited, /*moving=*/true), sim_line(...)}. Thenplay_scene's TalkOver judges a long gap as over ("judged over ...", FAILURE), the way the console would. Check that the 9 s case fails with a 3 s wait and passes with 15 s. One way: haveSimKnobRouteIO::dialog_withinrecord the uncovered remainder forsettleto prepend. -
The skip flag goes stale across non-walk steps (StoryWalkSteps.cpp).
m_previous_settle_saw_dialogueis cleared only inroute/legs/step/talk/mash/begin_attempt. BATTLE, GAME, HEAL, SAVE, TRAIN and ANSWER run through the bound actions (story_game()in StoryActions.cpp) and never touch it. So a door step that settles dialogue, then a battle or game action, then a scene skips the scene's opening-line wait on the strength of dialogue from two steps back. That is exactly the after-battle case where the first line is slowest. No row through 01.11 hits it today (lake_entrance and rowans_trigger takeone_step, which clears the flag without settling), but the name and comment promise "the step before". Clear the flag in one place per step, in the engine's step dispatch, rather than in five walk methods, or store the step that set it and compare. -
Nothing pins which scenes skip (StoryActions_Tests.cpp
test_scene_start_waits). It checks only the waits it recorded, and a skipped scene records none. So a change that skipped every scene would still pass;guardedis logged but never asserted.test_seen_scene_skips_start_waitcovers three positive cases and no negative one. Either assert the exact skip set through 01.11 (the three 00.01 scenes; every other scene of the 23 keeps 15 s), or add a negative case: a scene after a TALK, and one after a battle (see 2), keeps its 15 s wait.
Style / minor:
4. test_scene_start_waits compares against a literal Milliseconds(15000) that copies SCENE_START_WAIT. If the constant stays in the .cpp's anonymous namespace, keep the literal but say in a comment what it mirrors. Don't widen a header just for the test.
5. StoryActions_Tests.cpp:256 SimExecutor sim(logger, {}, knobs); needs /*misses=*/{} (code health param_comment).
6. StoryWalkSteps.cpp:745 builds the STATUS note with +; use std::format (code health advisory).
7. The comment on SCENE_START_WAIT, "keeps the original full guard", describes history. Say what it is: how long a scene waits for its first line when the step before did not press through dialogue.
8. SimKnobRouteIO::dialog_within now returns true whenever a step has a first_line knob within the wait, which bypasses GridSimRouteIO::dialog_within. Add a one-line comment on why the knob wins (the knob is the step's line).
9. GridSim_Tests.cpp:451 squeezes two statements onto one line. Keep the multi-line body, as WallBattleSim_Tests does.
|
Addressed the re-review in
The first review CI run usefully exposed a short-circuit in the new central invalidation; that was fixed before the final run. Code health reports 0 failures, and Fork Draft CI is green at |
Stacked on fork PR #527 (
bdsp/intro-pickers); this diff audits and removes redundant scene-start waits only.Console B on 2026-11-15 spent the full 15-second pre-dialogue timeout in
mom_calls,barry_goes_home, andbarry_runs_to_the_lakeafter the preceding settle had already played dialogue.The review fix preserves the original 15-second opening-line guard for every scene not yet observed.
talk_over()now reports whether it actually saw dialogue; only then does the immediately following MASH scene skip its redundant pre-watch. Every intervening engine-dispatched step invalidates that signal. The following quiet settle still runs.The simulation carries any first-line delay not covered by the pre-watch into
TalkOveras a moving gap, so a shortened guard now fails the 9-second regression instead of passing vacuously. It audits all 23 MASH scenes through 01.11, pins the exact default skip set, checks the three measured doorway skips, and verifies that scenes after TALK and BATTLE retain the full guard.Other 15-second save/battle failure bounds are unchanged.
How to review:
StoryEngineSteps::act()/StoryWalkSteps::begin_step()first, thenStoryWalkSteps::mash(), then the late-line and skip-set simulation regressions.git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change origin/bdsp/intro-pickers...bdsp/autostory-optional-dialogue-waitsTests:
origin/bdsp/intro-pickers: 0 failures3a7f06ebcexposed the non-MASH short-circuit and corrected audit expectation839c1a61e: passed (Ubuntu GCC build and 33,000+ unit tests)