Skip to content

Stop silently tracking against wrong logic - #69

Merged
flee135 merged 23 commits into
wafo:masterfrom
tanjo3:improve-logic-loading-errors
Sep 11, 2026
Merged

flee135 merged 23 commits into
wafo:masterfrom
tanjo3:improve-logic-loading-errors

Conversation

@tanjo3

@tanjo3 tanjo3 commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Before the tracker works, it downloads two things: the randomizer's logic files and a decoded copy of the settings string. Either download can fail, and the tracker continues as if nothing happened. A settings string that couldn't be decoded either crashed to the "Something went wrong" screen (on downloaded versions) or silently ran the tracker on default settings (on bundled versions). In the second case, you'd play a whole seed with checks marked available or unavailable for the wrong reasons, with no hint that anything was off. Additionally, logic files that couldn't be downloaded made the tracker silently switch to the built-in 9.0.0 logic.

This PR ensures that if the tracker can't be certain its logic matches your seed, it indicates it.

  • The settings service response must succeed, be readable, and match the settings shape. Otherwise, loading stops with a plain error and a "Try again" button instead of a crash or silent defaults. The tracker still accepts settings it has never seen, so forks keep working. Opening check tracking without a settings string is stopped with a message to relaunch from the main page.
  • The loader reports where its files came from. When the requested version can't be downloaded, a dismissible yellow banner appears at the top of the checks tracker. It shows which version is in use and that check availability may be wrong, with the reason behind a "Details" toggle.
  • Logic-file downloads give up after 30 seconds, and settings decode after 10. A stalled connection triggers the banner or error screen instead of an endless loading frog. Closing the window or retrying cancels the ongoing download, and a slow response from an abandoned attempt cannot overwrite a newer one.
  • Checks whose logic rule cannot be parsed are left out of the tracker. Error messages name the file or rule that failed. A rule that fails to parse is reported as such instead of being miscounted as "missing from the location table". Logic files with Windows line endings or a comment on the last line no longer fail to parse.

A few ways to test some of the changes:

  • On the main page, pick version 9.1.0, type any nonsense as the settings string, and launch.
  • Before: a "Something went wrong" crash screen with a "Reset saved data" button.
  • After: a spinning HashFrog with a clearer error message and a "Try again" button.
  • Repeat with version 9.0.0.
  • Before: the tracker loaded and looked normal (default settings).
  • After: the same error screen as above.
  • Launch any 9.1.0 preset and let it load once. In the tracker's Developer Tools, go to Network and block GitHub (right-click any raw.githubusercontent.com request, then click "Block request domain"). Then refresh the tracker.
  • Before: the tracker loaded silently on 9.0.0 logic.
  • After: the tracker loads with a yellow warning banner along the top.
  • Launch any preset, then in the tracker's Developer Tools, go to Application/Storage, then Local Storage, and delete the settings_string entry. Then refresh the tracker.
  • Before: either a crash screen (9.1.0) or a tracker that appears normal on the defaults (9.0.0).
  • After: a spinning HashFrog with a clear error message and a "Try again" button.

@flee135

flee135 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

It'd be nice to update the text box below the preset to say something like "version can be found in the generator url." But it's not always obvious if all you have is a seed link, e.g. https://ootrandomizer.com/seed/get?id=2145256

The page says generated on Dev-Rob, but the correct version string is devrreal_, and this string is not found on the page. So I guess the user just has to know? Or we can show common versions somewhere. I'm not sure what the best solution is.

@tanjo3

tanjo3 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Added Dev, Dev-Rob, and Dev-Fenhl to the version dropdown as aliases for the latest logic on each branch. Users can still input a custom version if desired. The version can now be written as a seed page shows it, such as "Dev-Rob v9.0.2-17", instead of needing to know it maps to "devrreal_9.0.2-17". Both forms work, and the presets use the friendly names too. The info box has been reworded to be clearer. The dropdown should be enough for most cases.

This also revealed two bugs. Upstream dev versions such as "dev_9.1.29" were never fetched and silently fell back to the bundled 9.0.0 logic. Separately, the build number was discarded, so a dev version always loaded HEAD. The tracker now loads the exact build's logic at the specified build number. It checks that the build is still available before downloading and uses the branch with a warning if it isn't.

@flee135
flee135 merged commit 2f98c55 into wafo:master Sep 11, 2026
1 check passed
@tanjo3
tanjo3 deleted the improve-logic-loading-errors branch September 11, 2026 22:27
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.

2 participants