Fix stale settled paths after hoagie data update#515
Merged
Conversation
The hoagie requirements data update (#514) changed category names in the YAML files, breaking the verifier's settled path matching for existing users. This adds a management command to clear stale settled paths and also: - Adds POR/SPA to AB_CONCENTRATIONS (new local YAML files) - Cleans up verifier imports (removes unused `requests`, fixes `pathlib` placement) - Management command also creates Major DB records for POR/SPA Run on production after deploy: docker compose -f docker-compose.prod.yml exec -T web python manage.py clear_settled_paths --apply Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
clear_settled_pathsmanagement command to clear stale settled paths from all user schedules after the hoagie requirements data update (Feat/hoagie requirements data #514) changed category namesAB_CONCENTRATIONSand creates their Major DB records (matching the new local YAML files)requests, fixespathlibplacement)Context
The hoagie data update (#514) switched the verifier to local YAML files with updated requirement category names (e.g. "Theory" → "Theoretical Computer Science", "Systems" → "Computer Systems"). Users who had manually settled courses to requirements have those old category names stored in their
user_scheduleJSONsettledarrays. The verifier's_mark_settledfunction can no longer match these stale paths to the new requirement tree.Impact: 7,381 out of 8,953 user profiles have stale settled paths.
Fix: The management command clears all settled arrays. The verifier's auto-settle feature will re-assign courses that can only satisfy one requirement. Users only need to manually re-settle ambiguous courses.
Deploy steps
After merging:
Test plan
--applyclears settled paths and creates POR/SPA Major records🤖 Generated with Claude Code