Skip to content

BDSP AutoStory: keep the post-RNG save at Lakefront - #605

Draft
dayfine wants to merge 4 commits into
bdsp/starter-rng-adoptfrom
bdsp/starter-rng-story-chain-fix
Draft

dayfine wants to merge 4 commits into
bdsp/starter-rng-adoptfrom
bdsp/starter-rng-story-chain-fix

Conversation

@dayfine

@dayfine dayfine commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Stacked on fork PR #526 (bdsp/starter-rng-adopt); this diff is the 00.02-to-00.03 checkpoint-save correction only.

Console B on 2026-11-15 completed Starter RNG and returned at Verity Lakefront, then 00.03 refused to save because its card contract incorrectly expected Twinleaf Town. The refusal protected the shiny save from being overwritten.

The first commit adds the integration regression assertion and intentionally fails with the old Twinleaf Town card. The follow-up corrects only the authored saves_in contract; the overwrite guard is unchanged.

Tests:

  • intentional red Fork Draft CI confirmed card for 00.03: Twinleaf Town
  • targeted C++ code-health scan against origin/bdsp/starter-rng-adopt: 0 failures
  • Fork Draft CI at 23defeb7d: passed (Ubuntu GCC build and unit tests)

@dayfine dayfine left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed SHA: 759f188

Verdict

APPROVED

Correctness: the fix is right and does not loosen the overwrite guard. 00.03's own plan starts at VerityLakefront (bdsp-00.03.plan.json, start/first step map), and 00.02 already says saves_in: "Verity Lakefront". With Run Starter RNG on, 00.02 ends at the Lakefront, so 00.03's start save (ConsoleStory::save, SAVES_IN_ARG) was comparing the card against "Twinleaf Town" and stopping the run. The check itself (save_game(..., *map) throwing FatalProgramException when the card names another map) is untouched; only the declared contract changed, and it now matches where the row really starts. Test: the extended test_run_starter_rng_in_story asserts save in 00.03 once and card for 00.03: Verity Lakefront. That is behaviour a caller relies on and it would fail on the old data. No raw ints, braces and CRLF are fine. Fork Draft CI green.

Non-blocking:

  1. bdsp-00.03.plan.json has format: pokesim-authored-checkpoint/1, i.e. it is authored in PokemonSimulation. Confirm the source there has the same saves_in, or the next sync overwrites this back to Twinleaf Town. Say which in the PR description.
  2. Systematic check, not done in this PR: any row whose first step map differs from its saves_in has the same bug. A table test "row.saves_in == map of the row's start pose" over all rows would catch the class (StoryData_Tests.cpp already walks the table for saves_in). Worth a follow-up, not a blocker.
  3. StorySimulation_Tests.cpp comment "Console B, 2026-11-15:" is a log entry; the expectation already says it. Trim to what the test guards.

@dayfine

dayfine commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

Applied the non-blocking comment trim in 23defeb7d; CI is green.

I also checked the PokemonSimulation checkout, all refs, and file history. There is no BDSP 00.03 authored plan there to update despite the pokesim-authored-checkpoint/1 format name. The tracked source currently appears to be this Arduino-Source plan. If another publisher source exists, please link it and I will update the correct owner.

Agreed that a table-wide saves_in versus start-map invariant would be useful, but I am leaving it as a separate follow-up rather than broadening this live-failure correction.

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