Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,34 @@
return true;
}

// Console B, 2026-11-15: three 00.01 scenes each waited the full 15 s
// after the preceding step had already played them. Audit every authored
// scene through the real StoryWalkSteps::mash() seam.
UnitTestResult test_scene_start_waits(Logger& logger){
SimExecutor sim(logger);
run_rows_on(sim, logger, {.from = "00.00", .to = "01.11"});
if (!sim.result().error.empty()){
return "The run failed: " + sim.result().error;

Check warning on line 222 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StoryActions_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

style: build strings with std::format, not + on a literal / std::to_string / std::string (fork AGENTS.md "Strings")
}
size_t scenes = 0;
for (const auto& [row, step] : story_steps()){
if (step.kind != StoryStepKind::MASH){
continue;
}
const auto found = sim.misses().dialog_waits.find(step.name);
if (found == sim.misses().dialog_waits.end()){
return std::format("{} {} did not check for its opening line.", row, step.name);
}
if (found->second > Milliseconds(3000)){
return std::format("{} {} waits {} ms for an optional opening line; expected at most 3000 ms.",
row, step.name, found->second.count());
}
scenes++;
}
logger.log(std::format("{} scene steps use the bounded optional-line pre-watch.", scenes));
return true;
}



struct AutoStoryStoryActionsInput{
Expand Down Expand Up @@ -261,6 +289,10 @@
.input = {"Story actions: the steps the sim stubs from 00.00 to 01.11 all need the console", test_stubbed_steps_need_the_console},
.expectation = {},
},
{
.input = {"Story actions: scene starts do not wait 15 seconds for an optional line", test_scene_start_waits},
.expectation = {},
},
};

void add_tests_AutoStory_StoryActions(UnitTestDatabase& database){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* BDSP AutoStory - Story simulation

Check warning on line 1 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=935 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -357,6 +357,7 @@
}

bool SimKnobRouteIO::dialog_within(Milliseconds wait, Color color){
m_misses.dialog_waits[m_step] = wait;
const auto late = m_knobs.first_line.find(m_step);
if (late != m_knobs.first_line.end() && late->second > wait){
note(std::format("[Sim] {}: the first line comes after {} ms, past the {} ms wait.", m_step, late->second.count(), wait.count()), RouteNote::LOG);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* BDSP AutoStory - Story simulation

Check warning on line 1 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim.h

View workflow job for this annotation

GitHub Actions / code-health

Code health (bypass)

<header>: header_symbols=10 over limit 8, bypassed by the tag at line 11: "story simulation executor, scenario runners and mock IO"

Check warning on line 1 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim.h

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=614 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -81,6 +81,7 @@
bool fading_in = false;
bool slid = false;
std::string banner_up = {};
std::map<std::string, Milliseconds> dialog_waits = {};
};

// How a warp's fade looks on the screen (#268's design note); the
Expand Down
Loading