Skip to content

feat: add tool to check alternate_subcategory consistency with category#490

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-command-line-tool-to-log-inconsistent-question
Draft

feat: add tool to check alternate_subcategory consistency with category#490
Copilot wants to merge 3 commits intomainfrom
copilot/add-command-line-tool-to-log-inconsistent-question

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Adds tools/check-alternate-subcategory-consistency.js, a command-line tool that iterates all tossups and bonuses in the database and logs any question whose alternate_subcategory is inconsistent with its category.

Logic (using CATEGORY_TO_ALTERNATE_SUBCATEGORIES from quizbowl/categories.js):

  • If the category has a non-empty alternate subcategory list: the question's alternate_subcategory must be one of those values — null/undefined is flagged as inconsistent.
  • If the category has an empty alternate subcategory list: the question's alternate_subcategory must be null/undefined — any set value is flagged.

Usage:

node tools/check-alternate-subcategory-consistency.js

Copilot AI and others added 2 commits April 10, 2026 12:53
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