fix(grading): committed profiles.yml is now a hard-fail blocker#9
Merged
Conversation
Previously a committed profiles.yml only cost 5 points inside Level 2, so a student could still pass at 60/100 with a leaked Postgres password in the repo. Add a blocker() helper to grader_lib.sh that forces write_score() to report pass=false regardless of the earned score, and wire it into the profiles.yml check. Co-Authored-By: Claude Sonnet 5 <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
profiles.yml(with a real DB password) previously only lost 5/15 Level 2 points and could still pass overall at 60/100.blocker()helper tograder_lib.sh: prints likefail()but also forceswrite_score()to reportpass=falseno matter the point total.profiles.ymlcommitted check now callsblocker()instead offail(), and the message now also tells the student to rotate the password since it was pushed to GitHub.Test plan
bash -n .hyf/test.sh/bash -n .hyf/grader_lib.shprofiles.yml, ran.hyf/test.sh, confirmedscore.jsonreports"pass": false(score 43) even though it's independent of the passing-score comparison — verified the blocker overrides pass regardless of score.🤖 Generated with Claude Code