feat(autograder): shared grader_lib + 8 hygiene checks from c55 reviews#4
Open
lassebenni wants to merge 3 commits into
Open
feat(autograder): shared grader_lib + 8 hygiene checks from c55 reviews#4lassebenni wants to merge 3 commits into
lassebenni wants to merge 3 commits into
Conversation
added 3 commits
May 22, 2026 13:47
Same grader_lib.sh as week-1 — shared bash library with pass/fail/warn helpers and static-analysis checks from c55 PR review analysis. New warning checks for week-2 specific patterns: - check_silent_zero_in_except: AST-based detection of 'x = 0' in except blocks (reviewer c55#3: "sets price/revenue/vat to 0 instead of skipping the row — silently corrupts output") - check_exception_logged: warns when except-block log call doesn't include the exception variable 'e' (reviewer c55#5,#7: "log the error type!") - check_ruff F401/E302: unused imports + missing blank lines between functions (c55#3,#1: "This import isn't used" / "add new line after func") - check_no_print_statements: logging over print() - check_no_notimplemented: stubs left in (c55#3) - check_gitignore_python: __pycache__/ and .env ignored - AI_DEBUG.md traceback check - Screenshot format: 7/20 pts (warn) for .jpg, full 10/20 for .png Scoring ladder unchanged (60/20/20, passing=60).
…t -e) Same fix as week-1. Verified: scaffold 20/100 fail, solution 100/100 pass.
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
Adds
.hyf/grader_lib.sh(same shared library as week-1). Adds 8 warning checks for patterns flagged by reviewers across 6 c55 week-2 PRs.New checks (0-pt warnings — scoring ladder unchanged):
check_silent_zero_in_exceptcheck_exception_loggedcheck_ruff F401,E302,E303check_no_print_statementslogging, notprint()check_no_notimplementedcheck_gitignore_python__pycache__/and.envshould not be committed.jpggives 7/20 pts + warning;.pnggives full 10/20 ptsScoring: Task 1: 60 pts, Task 2: 20 pts, Task 3: 20 pts, passing = 60. Screenshot partial credit (7 vs 10) is the only scoring change.
Test plan
.hyf/test.shfrom repo root — confirm hygiene section appears at end= 0in an except block in transforms.py — confirm WARN appears.jpginstead of.pngfor screenshot — confirm WARN + 7 pts (not 10)🤖 Generated with Claude Code