Skip to content

Fix stale settled paths after hoagie data update#515

Merged
DIodide merged 1 commit intomasterfrom
fix/clear-stale-settled-paths
Mar 28, 2026
Merged

Fix stale settled paths after hoagie data update#515
DIodide merged 1 commit intomasterfrom
fix/clear-stale-settled-paths

Conversation

@DIodide
Copy link
Copy Markdown
Member

@DIodide DIodide commented Mar 28, 2026

Summary

  • Adds clear_settled_paths management command to clear stale settled paths from all user schedules after the hoagie requirements data update (Feat/hoagie requirements data #514) changed category names
  • Adds POR (Portuguese) and SPA (Spanish) to AB_CONCENTRATIONS and creates their Major DB records (matching the new local YAML files)
  • Cleans up verifier.py imports (removes unused requests, fixes pathlib placement)

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_schedule JSON settled arrays. The verifier's _mark_settled function 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:

# Dry-run first
docker compose -f docker-compose.prod.yml exec -T web python manage.py clear_settled_paths

# Apply
docker compose -f docker-compose.prod.yml exec -T web python manage.py clear_settled_paths --apply

Test plan

  • Verify management command dry-run shows expected numbers
  • Verify --apply clears settled paths and creates POR/SPA Major records
  • Verify verifier still works for existing majors (COS-BSE, ECO, etc.)
  • Verify users with FIT/SPO majors still see requirements (their YAML files still exist)

🤖 Generated with Claude Code

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>
@DIodide DIodide merged commit efd5fc8 into master Mar 28, 2026
1 check passed
@DIodide DIodide deleted the fix/clear-stale-settled-paths branch March 28, 2026 04:25
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.

1 participant