Repository navigation
Fix Guitar Hero failure recovery and force configured difficulty in V9 - #146
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df5453b135
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if self.screen == GuitarHeroScreen.FAILED and self._failed_card_active: | ||
| return self._tick_failed_card(controller, ctx, obs) |
There was a problem hiding this comment.
Route template-owned failures through the configured action
When a high-confidence gh_song_failed template identifies the screen but _failed_card_score() remains below threshold—for example with a differently filtered local capture—_classify() still returns FAILED through the existing template hints while leaving _failed_card_active false. This guard then delegates to the inherited failure handler, which hard-codes Confirm/Retry, so the configured default new_song action is ignored and the run may retry the retained wrong difficulty instead of returning through difficulty selection.
Useful? React with 👍 / 👎.
Live evidence
The latest V8 run reached gameplay but failed
I Love Rock & Rollat 13%. The retained failure screen exposes two concrete lifecycle bugs before we tune note timing further:config/guitar_hero.yamlrequestsdifficulty: easy, so the stylized difficulty poster is preserving a previous selection and V7/V8's fallback assumption that fresh Quick Play starts on Easy is false;SONG FAILED, V8 logged title settling/start behavior, meaning the failure card was being misclassified as the title screen instead of handled as a failure state.V9 changes
SONG FAILEDdetector based on the retained live topology: dark central plaque, dense white type, saturated yellow RETRY row, green CONTINUE footer, and absence of the red BACK badge that distinguishes the difficulty posterNEW SONGduring calibration so the run returns through setlist/difficulty rather than endlessly retrying the wrong retained difficultyRegression coverage
Adds tests proving that V9:
up, up, up, confirmfor configured Easy andup, up, up, down, confirmfor configured MediumThis is intentionally still diagnostic: the next useful live run is now a real Easy chart, which isolates note timing from the accidental Medium difficulty and from disabled-lane false inputs.