Skip to content

Conversation

@lumakyns
Copy link

@lumakyns lumakyns commented Dec 3, 2025

Description

Due to needing a unique id for individual requirements, and a unique id not being served by DegreeWorks, a hash consisting of a requirement's features was added.

The unique id is served as requirementId in the requirements column of major, minor, specialization, and college_requirement tables.

Additionally, due to jsonb's being too large for the unique index in college_requirement, a requirements_hash column was added to enforce uniqueness on.

Related Issue

#185

Motivation and Context

Reason for unique id comes from issue.

How Has This Been Tested?

Scraper has been ran locally, database updates verified, and API calls tested for both rest and graphql

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code involves a change to the database schema.
  • My code requires a change to the documentation.

@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch 2 times, most recently from 384b064 to a7c6013 Compare December 6, 2025 23:25
@lumakyns lumakyns marked this pull request as ready for review December 6, 2025 23:26
@lumakyns lumakyns marked this pull request as draft December 6, 2025 23:47
@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch from a9fb47e to 696b2bc Compare December 7, 2025 19:22
@lumakyns lumakyns marked this pull request as ready for review December 7, 2025 19:24
@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch from 696b2bc to 32d1ff6 Compare December 7, 2025 21:18
@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch from 32d1ff6 to 70d29ad Compare December 15, 2025 08:18
@lumakyns lumakyns marked this pull request as draft December 15, 2025 08:19
@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch from 70d29ad to a10d47d Compare December 18, 2025 06:31
@lumakyns lumakyns marked this pull request as ready for review December 18, 2025 06:46
@laggycomputer laggycomputer self-requested a review December 20, 2025 18:01
Copy link
Member

@laggycomputer laggycomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work thus far. This will need rigorous testing to verify due the sensitive nature of the problem.

This is not SemVer breaking, by the way, so I removed that from the PR description.

Copy link
Member

@laggycomputer laggycomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit messages (and therefore PR titles) must obey Conventional Commits.

@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch from a10d47d to e75ffed Compare December 20, 2025 21:42
@lumakyns lumakyns changed the title programs: Add unique hashed ID for requirements feat(programs): Add unique hashed ID for requirements Dec 20, 2025
@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch 2 times, most recently from 6aa5494 to 2517795 Compare December 20, 2025 21:45
Copy link
Member

@laggycomputer laggycomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architecture is sane.
No new comments, but previous review comments have been updated and should be addressed first.

@lumakyns lumakyns force-pushed the enhancement/provide-block-id branch from 2517795 to a41874f Compare January 5, 2026 22:20
@laggycomputer laggycomputer self-requested a review January 5, 2026 23:16
}

generateRequirementId(rule: Rule, childRequirementBlockIdentifier: string): string {
generateRequirementId(requirementType: string, coursesSalt: string): string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also can't call this a "courses salt" because it's sometimes made up of requirement IDs instead!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laggycomputer Which of these seems best?

  1. ContentSalt
  2. RequirementSalt
  3. RequirementBlockSalt

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