Skip to content

FRLG AutoStory: every step failure carries its shared class - #615

Draft
dayfine wants to merge 27 commits into
frlg/celadon-restockfrom
frlg/fault-classes
Draft

dayfine wants to merge 27 commits into
frlg/celadon-restockfrom
frlg/fault-classes

Conversation

@dayfine

@dayfine dayfine commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Depends on #614 (base frlg/celadon-restock; also merges autostory/fault-classes, #479, which brings nav/shared #332/#477, so the diff shows that merge too).

FRLG had a table mapping its failure names to the shared story failure classes, but only used it to tag log lines; its steps still failed with plain outcome_failed(), so the engine's failure lines carried no class the way BDSP's and PLZA's do. Now every FRLG step fails through frlg_failed(), which puts the class from that one table on the Outcome. All 73 sites move (step runner and events, walker and replay executor, battles, talk and healing, Mart, abilities and field moves, captures, slopes, boulders, Rocket Hideout, launch/reload, row sim). The row sim names a failure with no class "unclassified failure ", and the FRLG fault sweep fails such a cell even when it is on KNOWN_FAILING, so a new unmapped name shows up in CI.

The merge's conflicts were test tables only (case names move outside the input, as the merged structs have them). Tested: touched files and all merge-affected files syntax-checked locally; new Failure outcome cases in the FRLG failure-class tests; full build and tests on Fork Draft CI.

dayfine and others added 27 commits November 14, 2026 07:00
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
… 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
… 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
…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
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
CommonTools: screen events for autonomous programs.

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
…merged, review fixes

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
AutoStory: one story engine over a backend, save mode from checkpoint metadata.
Brings nav/shared (#332, #477) and the shared StoryFaultSweep and
StoryOutcomeClass. Conflicts were test tables only: case names move
outside the input (the merged structs' shape); FRLG's screen-event cases
keep their designated inputs.
FRLG's steps fail through frlg_failed(), which puts the class from
FRLG's one failure table (frlg_failure_class(): own names, prefixed
families, then the engine's names) on the Outcome, so the engine's
failure line ends "(class=<id>)" as BDSP's and PLZA's do. All 73 sites
move: step runner and events, walker and replay executor, battles,
talk and healing, Mart, abilities and field moves, captures, slopes,
boulders, the Rocket Hideout, launch/reload, and the row sim.

The row sim names a failure the shared list has no class for
"unclassified failure <name>", and a fault sweep with one fails even
when it is on KNOWN_FAILING.
@dayfine

dayfine commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Deferred until FRLG merges the shared core #648; the FRLG side gets redone on the lean branch #652 after that. Branch kept.

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