Repository navigation
Conversation
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: febd94c
Verdict
NEEDS_REWORK
First-pass review of this PR's own diff against plza/upstream/s2-04. Code health: 0 failures, 2 advisories. One allow tag (FakeStoryBackend public_methods=12) has a reason that holds up. Fork Draft CI build passed; the ubuntu job was still pending when read.
High
None.
Medium
-
walk_legsmay report a pose the player never reached.Engine/Pokemon_StoryBuiltinActions.cpp:117.StoryBackend::tap()is documented (#538) as "one tile indirection, or a turn to face it".walk_legstapsleg.tilestimes per leg, andafter_legs()then advances the pose by every tile. A leg whose direction differs from the current facing spends its first tap on the turn (BDSP: a 40-80 ms tap only turns), so the walk ends a tile short, yet the outcome's pose claims the full move. Either add a turn tap when the facing changes, or document that legs assume each tap moves a tile and have the backend guarantee it. Add a test case for a turn followed by a move. -
Half the registry's logic has no test in this PR.
StoryEngine_Tests.cppinstantiates onlyGridPose; there are 0ZonePosecases. So the no-tiles path is untested:tile_arg_problems,check()'s tile-arg rejection, legs and face dropped from the built-ins, andundeclarable().lint()(empty or repeated step names,check_declared) is never called. Onlycheck()is.- The
console_onlyrefusal indispatch()(CONSOLE_ONLY) andconsole_onlyreaders inholds()have no case.
A few table cases would cover each of these, using a ZonePose fake from the same
FakeStoryBackend. -
Two comments describe history or lab runs, not the code:
Engine/Pokemon_StoryStepRunner.h:8-9: "it replaces StoryStepExecutor and the games' own executors".StoryStepExecutoris still here, andPokemon_StoryStepRunner.cppincludes it.Engine/Pokemon_StoryEngine_Tests.cpp:70("FRLG 00.31 (console B, 2026-11-10) took it so and saved on ...") and:307("the old wait ... 00.31's false pass").
Say what each piece does and what the fault looks like on screen. The run and its date belong in the PR description (user theme T3).
Low
"unsupported_step"is spelled as a raw literal atEngine/Pokemon_StoryBuiltinActions.cpp:40and:49, whiledispatch()uses theunsupported_step(step)helper. Use one spelling, e.g. a named constant likeCONSOLE_ONLY(user theme T5).Engine/Pokemon_StoryBuiltinActions.cpp:81backend.wait(100ms)withMAX_OPEN_LOOKS = 20gives a 2 s window for a text box. Name the 100 ms next to the other text constants and say why 2 s is enough (T2).Engine/Pokemon_StoryBuiltinActions.cpp:55(mash_to_overworld) and:128(answer) declareusing namespace std::chrono_literals;but use no literal.Engine/Pokemon_StoryActionRegistry.h:63pause_points() constreturns a mutable reference to amutablemember, so aconstregistry hands out run state. Consider having the runner or engine ownStoryPausePointsand keeping the registry immutable.Engine/Pokemon_StoryActionRegistry.cpp:25and the other helpers useinlineinside an anonymous namespace, which is redundant.undeclarable(..., bool tile)takes a bool parameter. PassStoryPoseTraits<PoseType>::TILE_MOVESthrough a template instead, or just the two messages.
Checked: brace style, no std::filesystem/std::thread/std::mutex, CRLF kept, new files are in SourceFiles.cmake, and the includes resolve against the parents. Test cases follow the name / input / expectation shape.
…t the run The step runner's header says what it is rather than what it replaced, and the warp test describes the wrong-floor fault instead of the console run that found it.
|
Review fixes, tip Fixed: 3 (step runner header and the engine test comments describe the code and the fault, not the run). |
…tested here (moved from the engine PR)
|
Second fix round, tip |
# Conflicts: # SerialPrograms/Source/Pokemon/AutoStory/Pokemon_AutoStory_Tests.h
# Conflicts: # SerialPrograms/Source/Pokemon/AutoStory/Pokemon_AutoStory_Tests.h
Depends on #538
Adds the action registry (a game's actions over the shared built-ins, checked against their specs before anything runs), the shared built-in actions written once against the backend, and the step runner that runs one step through the registry. Tests: the StoryEngine suite over a scripted fake backend (also added here), built and run by Fork Draft CI. Part of the re-split of #522/#524/#525 into reviewable steps; review fixes are new commits on the PR that owns each problem, merged up the chain.