feat: add tool to check alternate_subcategory consistency with category#490
Draft
feat: add tool to check alternate_subcategory consistency with category#490
Conversation
Agent-Logs-Url: https://github.com/qbreader/website/sessions/ea992a68-ede0-4576-a2b8-6d281692dd3e Co-authored-by: geoffrey-wu <42471355+geoffrey-wu@users.noreply.github.com>
Agent-Logs-Url: https://github.com/qbreader/website/sessions/ea992a68-ede0-4576-a2b8-6d281692dd3e Co-authored-by: geoffrey-wu <42471355+geoffrey-wu@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
geoffrey-wu
April 10, 2026 12:55
View session
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
tools/check-alternate-subcategory-consistency.js, a command-line tool that iterates all tossups and bonuses in the database and logs any question whosealternate_subcategoryis inconsistent with itscategory.Logic (using
CATEGORY_TO_ALTERNATE_SUBCATEGORIESfromquizbowl/categories.js):alternate_subcategorymust be one of those values —null/undefinedis flagged as inconsistent.alternate_subcategorymust benull/undefined— any set value is flagged.Usage: