Skip to content

BDSP Starter RNG: show live phase progress - #603

Draft
dayfine wants to merge 4 commits into
bdsp/starter-rng-adoptfrom
bdsp/starter-rng-progress-logging
Draft

dayfine wants to merge 4 commits into
bdsp/starter-rng-adoptfrom
bdsp/starter-rng-progress-logging

Conversation

@dayfine

@dayfine dayfine commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Stacked on fork PR #526 (bdsp/starter-rng-adopt); this diff shows only live Starter RNG progress logging.

The lake observation and target wait can remain quiet for minutes, making healthy work look stalled in both the log file and in-app log overlay.

This change logs:

  • sparse calibration progress toward the first solve;
  • each additional roll used to confirm the provisional state;
  • the target-advance wait and re-anchor cadence;
  • the blind timeline and result-verification phases.

Existing signed early/late advance reporting remains unchanged.

Tests:

  • targeted C++ code-health scan against origin/bdsp/starter-rng-adopt: 0 failures
  • Fork Draft CI: 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: 41acfbe

Verdict

NEEDS_REWORK

Small and mostly fine; logging is bounded (report_blink_progress runs only after the fresh check, so it fires once per new blink, not per loop pass). Read from the diff only, no build (CI green). Findings:

  1. PokemonBDSP_BlinkRecovery.cpp log_calibration_progress: events % 5 <= 1 logs at 5, 6, 10, 11, ... (two lines per five rolls) and events == 1 is redundant with it. Intended is one line per 5. Use events % 5 == 0.
  2. Same file, report_blink_progress: no log between min_rolls_to_try and the first candidate. That is the longest silent stretch (still searching, no have_candidate), which is what the PR sets out to remove. Log a "searching" line there, throttled the same way.
  3. Same file, the confirm branch logs on every fresh event. Bounded by confirmation_events, but say so in the comment, or throttle like the calibration phase.
  4. display.set_progress moved from every loop pass to after if (!fresh) continue. That is a behaviour change to the option display, not logging. Keep it where it was (call it before the fresh check) or say in the description that it is intentional.
  5. PokemonBDSP_StarterRngAttempts.cpp log_target_wait: the text hard-codes "re-anchoring every 30s", a third copy of the 30 s (the other two are BlinkRecoveryConfig::reanchor_interval and the literal 30s, at ~line 603). Pass the interval in and format it, so the message cannot drift from the code.
  6. Same file, log_blind_timeline: three adjacent double seconds parameters (starly/select/confirm) are easy to swap at the call site, and the call passes 5 positional values without /*param=*/ comments. Pass schedule (or a small struct) instead of unpacking it. Durations are raw double seconds here; Seconds/Milliseconds per the repo rule if the schedule fields allow it.
  7. The two new messages "Checking the battle animation, then reporting the target hit or signed advance miss." and "Blind timeline finished; verifying the obtained starter." say the same thing twice in a row, and the first narrates code rather than state. Drop one.
  8. Description: not a symptom patch, but no shared logging rule either. If other Starter RNG phases need the same sparse milestone logging, a single helper in BlinkRecovery.cpp is better than per-site functions; fine to leave for later.

@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: 41acfbe

Verdict

NEEDS_REWORK

Re-check at 2026-11-16 16:10Z: no rework has been pushed. The branch head bdsp/starter-rng-progress-logging is still 41acfbe, the SHA reviewed at 07:58Z (last commit 01:52Z). None of findings 1-8 in the earlier review are addressed yet. That review stands as the rework list:

  1. events % 5 <= 1 logs twice per five; use == 0 and drop the redundant events == 1.
  2. Log a throttled "searching" line between min_rolls_to_try and the first candidate.
  3. Confirm-branch logging: throttle it, or comment that confirmation_events bounds it.
  4. Keep display.set_progress before the fresh check, or explain the change in the description.
  5. Don't hard-code "every 30s"; format reanchor_interval into the message.
  6. log_blind_timeline: pass schedule (or a struct) instead of 5 positional values; use Seconds/Milliseconds.
  7. Drop one of the two back-to-back verification messages.
  8. (Optional) one shared sparse-progress helper.

@dayfine

dayfine commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

Addressed the review in bcf6d4d0d and 4746a5371.

  • Fixed the 5/6 modulo double-log and added throttled fresh-event “still searching” updates that continue even when the retained roll window stops growing.
  • Documented the deliberately bounded per-roll confirmation logs.
  • Restored display progress before the fresh filter.
  • Derived the re-anchor text from BlinkRecoveryConfig::reanchor_interval.
  • Passed PressSchedule to the blind-timeline logger and removed the duplicate verification message.

One point I left unchanged: the 30s passed to detect_shiny_battle() is the battle-animation/shiny-detection timeout, not the re-anchor cadence, so coupling it to reanchor_interval would mix unrelated controls. The phase-specific log helpers also remain separate because they report different state and cadence.

Code health: 0 failures. Fork Draft CI is green at 4746a5371.

@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: 4746a53

Verdict

APPROVED

Re-review of the delta since 41acfbe (bcf6d4d, 4746a53), from the diff and the loop in context. No build of my own; Fork Draft CI and Code Health green, local code health 0 failures (only file-length advisories).

Earlier findings:

  1. Modulo double-log: fixed. Calibration now logs at 1 and every 5th roll, once each.
  2. Silent stretch before the first candidate: fixed. search_updates counts fresh events once events >= min_rolls_to_try, so "Still searching" keeps coming every 5 fresh rolls even when the retained window stops growing. That was the right counter to use.
  3. Confirm-phase logging: the comment now says confirmation_events bounds it. Fine.
  4. display.set_progress: back on every pass, before the fresh filter, same as on the base branch.
  5. Re-anchor text: formatted from reanchor_interval. I accept the reply that the 30s given to detect_shiny_battle() is a separate timeout.
  6. log_blind_timeline takes PressSchedule. The fields are still double, but that's the schedule's own type and out of scope here.
  7. Duplicate verification message removed.
  8. Separate per-phase helpers: accepted.

Nits, non-blocking:

  • report_fresh_progress only does search_updates += cond ? 1 : 0, then forwards six arguments and hands the counter back by return. Increment it inline before report_blink_progress (if (!have_candidate && events >= config.min_rolls_to_try){ search_updates++; }) and drop the wrapper. If the wrapper stays, give it a one-line comment like its siblings have.
  • The base branch logged "N rolls seen, no solution yet." on every failed solve. This PR removes it and "Still searching" replaces it. That's a reasonable trade (it was per-roll spam), but it changes the log, so mention it in the PR description.

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