Skip to content

FRLG: author Parcel checkpoint in JSON and execute it through the story table - #260

Merged
dayfine merged 11 commits into
frlg/stage7-celadonfrom
frlg/checkpoint-json
Nov 9, 2026
Merged

dayfine merged 11 commits into
frlg/stage7-celadonfrom
frlg/checkpoint-json

Conversation

@dayfine

@dayfine dayfine commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Base: frlg/stage7-celadon. Shared authored-envelope PR #266 is merged into #122 and propagated through every FRLG parent. Its shared files are no longer in this diff. This is the first data-authored production checkpoint; #258 remains a separate optional replay diagnostic.

Checkpoint 00.05 now loads StoryData/frlg-parcel-00.05.plan.json directly into the existing story table. The C++ Parcel event list is removed. The lean pokesim-authored-checkpoint/1 document contains the shared checkpoint and FRLG save-menu configuration; it does not contain a supplies snapshot or export provenance. Existing executor behavior and bookkeeping defaults are preserved.

Two gates:

  1. Registered native tests run the actual JSON-backed table entry through the existing engine/fake-game simulator, comparing events, trace and saved position against the captured pre-migration checkpoint; existing full-story tests also use the new table entry. Negative cases reject unknown fields/formats/menus.
  2. Linux CI checks exact byte equality with the pinned PokemonSimulation authored file, then runs all seven shared scenarios and semantic-action assertions against that file. Python schema/tests run in PokemonSimulation BBQ Farmer: fail the egg quest when the box has no egg, and check for one at start (behavior change) #73.

How to review

Read the .plan.json, the one-line parcel() loader in PokemonFRLG_AutoStoryTable.cpp, then Pokemon/AutoStory/Pokemon_AuthoredCheckpointJson.* in #266, then the FRLG-specific Data/JsonParser.*, its adjacent Json_Tests.*, and StoryData/README.md. Data/JsonWriter.* retains the legacy migration writer; LegacyJsonFormat.h shares its private envelope spellings with the legacy reader. Production authored loading does not depend on the writer. The old .json export is retained only as a migration regression fixture. The existing strict export reader remains separate. Inspect changes with git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change origin/frlg/stage7-celadon...frlg/checkpoint-json.

At 2060063f1 (source tree identical to 164bbce00), the five affected game translation units pass syntax checks and code health passes. Common envelope/game validation, common checkpoint parsing, and embedded lookup now delegate to #266. FRLG retains menu validation and legacy export migration support. Fresh native CI: Linux, Windows Clang, pending. Shared-codec Linux/Windows tests pass on #266; macOS is queued. Full native tests passed on all three platforms before the parser reorganization (f5fb08392), which does not validate this latest head. Simulation #73 and #74 are merged.

The review cleanup separates parser/writer/tests under AutoStory/Data, adds section spacing, removes unrelated line-ending-only simulation-test churn, uses std::string for the simulation expectation description, and adds a TODO to load checkpoint series into a partial table.

No console, profile or save was used. Scene/door observation behavior is unchanged: declared arrival poses are fallback assumptions, not newly verified evidence.

dayfine and others added 4 commits November 8, 2026 01:27
read_story_checkpoint_export() is the inverse of story_checkpoint_export():
it reads a pokesim-native-checkpoint-export/1 record (the shared checkpoint
through Pokemon::read_story_checkpoint, plus FRLG's menu and supplies) into
the same StoryCheckpoint type that story_checkpoints() holds, so
build_checkpoint() and make_story_segment() take loaded rows unchanged.
The envelope constants are checked, every native field is required and
unknown fields fail, so a record is read as written or refused.

PokemonSimulation's data/story/native/frlg-parcel-00.05.json (its commit
051785fa251f37b71eb661d4b583435d70f69439, the export tool's output for
row 00.05) is built into the program from StoryData/ as
autostory_checkpoint_json(), and load_story_checkpoint() reads it.

Tests: CheckpointExport reads the capture and checks it exports back to
the same file and to the same JSON as table row 00.05, and refuses eight
altered copies; the existing export cases also round-trip every native
field. AutoStory - Simulation runs the loaded 00.05 and the table's 00.05
through FakeGame and compares describe(), the trace, the log lines and
the save pose.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…heckpoint-replay

# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStorySimulation_Tests.cpp
@dayfine dayfine changed the title FRLG: load Parcel checkpoint JSON and verify table equivalence FRLG: author Parcel checkpoint in JSON and execute it through the story table Nov 8, 2026
@dayfine
dayfine marked this pull request as ready for review November 9, 2026 00:08
@dayfine
dayfine merged commit 20d6eca into frlg/stage7-celadon Nov 9, 2026
16 of 22 checks passed
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