Skip to content

Rename difficulty field to point_class#83

Merged
detjensrobert merged 4 commits into
mainfrom
dr/point-class
Feb 9, 2026
Merged

Rename difficulty field to point_class#83
detjensrobert merged 4 commits into
mainfrom
dr/point-class

Conversation

@detjensrobert

@detjensrobert detjensrobert commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Resolves #71.

This has a dependency on #81 to update how it fetches the info for frontend, whichever is merged later will have to be updated.

This aligns more with how we expect this to be used for configuring points
and not as an expectation of challenge difficulty.

Signed-off-by: Robert Detjens <github@detjens.dev>
This matches the challenge difficulty --> point_class rename in the
previous commit.

Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
This will make it very obvious during validate if there are any misspelled
or unmigrated configuration options.

Signed-off-by: Robert Detjens <github@detjens.dev>
@detjensrobert detjensrobert self-assigned this Feb 4, 2026
@Kajmany
Kajmany self-requested a review February 9, 2026 01:57

@Kajmany Kajmany left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this is pretty uncontroversial, so long as the default-filling is meant to be TODO (or I missed it?)

Comment thread src/commands/validate.rs
bail!("failed to validate challenges");
}
};
// double check specific things about challenges

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One day I still think it'd be worth it to complicate the parsing process or the global once lock init in order to have safe-er structs for use later. That day should not be today, though. The validate call before every other command seems to cover our bases.

}

#[test]
/// Challenges can omit point_class to use the default at deploy

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just to be sure: this a known TODO with front-end and etc? I checked field references and couldn't find any paths that do this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, this default fill-in is currently added in the new frontend deploy POST in #81 and will need to be updated to use the new field once either that or this PR gets merged. There's not really a good way to fill in the default here via a Default trait or serde default function, since the default comes from a value set in the repo config.

@detjensrobert
detjensrobert merged commit fdc6594 into main Feb 9, 2026
3 checks passed
@detjensrobert
detjensrobert deleted the dr/point-class branch February 9, 2026 04:32
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.

Rename difficulty field to point class

2 participants