fix(ci): grant contents:read so grader runs + align autograder with rubric#9
Merged
Merged
Conversation
…ubric 1. .github/workflows/grade-assignment.yml: add 'contents: read' to the job permissions. The reusable auto-grade.yml requests contents:read (its actions/checkout needs it); a reusable workflow cannot request a permission the caller did not grant, so every run was startup_failure and no grader comment ever posted. Week 10's working workflow already has it. 2. .hyf/test.sh Level 3: accept psycopg2/psycopg imports, not just sqlalchemy. The rubric allows 'sqlalchemy or psycopg2'; the grader only credited sqlalchemy, under-scoring a valid psycopg2 submission by 5 pts. 3. .hyf/test.sh Level 4: count any H3 heading as a documented panel instead of only '### Panel'. A student who titles entries by metric name rather than 'Panel N' was scored 0 panels despite documenting them. Verified: no regression on a passing submission (95 -> 95); a psycopg2 app now gets the import point; panels titled by metric name are counted.
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.
What this fixes
Three defects found while verifying the Week 11 autograder against the open student PRs.
1. Grader never runs → no PR comments (the big one)
grade-assignment.ymlwas missingcontents: readin itspermissionsblock. The reusableHackYourFuture/github-actions/.../auto-grade.ymldeclarespermissions: contents: read(foractions/checkout). A reusable workflow cannot request a permission the caller did not grant, so every run wasstartup_failureand no grader comment was ever posted on any PR. Week 10's working workflow already grantscontents: read; this brings Week 11 in line.2. Autograder rejected psycopg2 (rubric allows it)
Level 3 only credited
import sqlalchemy. The rubric explicitly allows "sqlalchemy or psycopg2", so a valid psycopg2 submission lost 5 pts. Now acceptssqlalchemy,psycopg2, orpsycopg.3. Panel count was heading-text-dependent
Level 4 counted panels via
^### Panel, so a student who titled entries by metric name (e.g.### Trip count by payment type) scored 0 panels and lost up to 10 pts. Now counts any###heading.Verification
🤖 Generated with Claude Code