Repository navigation
Pokemon Navigation: golden files for the overworld simulations (seam 3, S3-0) - #419
Conversation
Shared plumbing for seam 3's sim goldens: a golden's path beside its test, its text, the first differing line, and a check that rewrites the file when PA_UPDATE_SIM_GOLDENS is set. 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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…ests links Pokemon_Direction.cpp) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
|
API review (claude-sonnet-5-5) at 2fba611: LGTM_with_nits The plumbing is sound: the line walk, CRLF handling, and update/check split behave correctly on the edge cases I traced. The one design issue is that the new
|
…is public and tested, <utility> Co-Authored-By: Claude Sonnet 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
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: 9d73176
LGTM_with_nits
Verdict
APPROVED
Prior review (2fba611), all three findings fixed at this tip: first_golden_difference returns std::optional<std::string> and check_sim_golden tests has_value(); with_crlf is declared in the header and has a test (bare LF, CRLF, stray CR); <utility> is included.
Readers are defensive: line_at/next_line handle an offset past the end, an empty golden or actual, a missing trailing newline (treated the same as one), a trailing blank line (reported as a difference), and CRLF vs LF. A missing golden returns a failure with the way to write it, not a crash. A failed write returns an error. No bug-level findings.
Nits:
- The PR description says "6 cases"; the suite registers 7 (
SIM_GOLDEN_CASES, including "a missing golden fails"). Fix the count. I did not run the suite, so the "passes" claim and "built together with the FRLG goldens" are the author's, not checked here. - The update branch of
check_sim_golden(the file write) is not covered by a test; onlywith_crlfis. A write that fails partway leaves a truncated golden (WRITE truncates); acceptable for a dev-only update flag, but worth a comment. SimGoldenTestCase::Expectationhas an unuseddescriptionthat every case leaves{}; drop it or fill it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Depends on #362. Base:
nav/grid-story-steps; the diff shows only this change.Shared plumbing for seam 3's sim goldens, so each game's sim can record what it observably does and later refactors onto the shared sim core can prove it unchanged.
Pokemon/Navigation/Simulation/Pokemon_SimGolden.h: a golden's path beside its test's source, its text (a#comment line, then a line per fact), the first differing line (CRLF ignored), andcheck_sim_golden(), which rewrites the file with CRLF endings whenPA_UPDATE_SIM_GOLDENS=1.frlg/stage8-rocktunnel; BDSP's sim is on thebdsp/center-run-settleline and follows separately.Testing: headless runner,
Pokemon::Navigation - Sim goldensuite (6 cases) passes, built together with the FRLG goldens onfrlg/stage8-rocktunnel.🤖 Generated with Claude Code
https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss