Skip to content

Validate catalog course identities - #37

Merged
tiankaima merged 1 commit into
masterfrom
fix/snapshot-course-identity-guard
Aug 10, 2026
Merged

Validate catalog course identities#37
tiankaima merged 1 commit into
masterfrom
fix/snapshot-course-identity-guard

Conversation

@tiankaima

Copy link
Copy Markdown
Member

What changed

  • require every catalog lesson to contain exactly one nested Course with a valid upstream ID
  • enforce Course ID-to-code and code-to-ID one-to-one consistency within a generated snapshot
  • verify that previously cached course codes keep the same upstream ID before replacing semester cache data

Why

The server loader now treats the upstream Course ID as its identity source of truth. The producer must therefore reject incomplete or internally inconsistent snapshots before publishing them.

Validation

  • 45 pytest tests
  • Ruff check
  • Ruff format check

@tiankaima
tiankaima marked this pull request as ready for review August 10, 2026 09:23
@tiankaima
tiankaima merged commit b07edcc into master Aug 10, 2026
3 checks passed
@tiankaima
tiankaima deleted the fix/snapshot-course-identity-guard branch August 10, 2026 09: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