fix(autograder): level-based grader with 5 bug fixes#2
Merged
Conversation
…grader Five bugs in the original test.sh: 1. file_is_filled() only matched standalone TODO lines, so `-- TODO: GROUP BY ... HAVING COUNT(*) > 1` passed the check AND triggered the HAVING COUNT keyword match → scaffold scored 45/100 and crossed the old passingScore 50 threshold automatically (untouched scaffold = instant pass). 2. Task 1.4 (orphaned-key LEFT JOIN / NOT EXISTS check) not graded at all. 3. Task 2: negative fare filter (WHERE fare_amount >= 0) not verified — the core cleaning step could be omitted with no point loss. 4. Task 2: pickup_datetime::TIMESTAMP cast not verified — students who skip it break their own Task 4 time-pattern queries but still scored full marks. 5. score.example.json had passingScore 50 while test.sh wrote passingScore 60. Changes: - Add grader_lib.sh (shared pass/fail/warn helpers from Week 6 autograder). - Rewrite test.sh: 7 levels, structured pass/fail output per check, rich feedback messages pointing to the exact task and pattern needed. - Fix file_is_filled() to catch any occurrence of TODO (case-insensitive). - Grade all four Task 1 checks, including the relationship orphan check. - Grade Task 2 fare filter and TIMESTAMP cast explicitly. - Align score.example.json passingScore with the 60-point threshold in the grader (was 50, now 60). - Update .hyf/README.md with the grading table. Ladder verified: scaffold → 10/100 (fail), working solution → 100/100 (pass). Co-Authored-By: Claude Sonnet 4.6 <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
test.shwith a 7-level structured grader that usesgrader_lib.sh(shared from the Week 6 autograder pattern)Bugs fixed
file_is_filled()only caught standaloneTODOlines —-- TODO: GROUP BY … HAVING COUNT(*) > 1passed the check AND triggered keyword matchespassingScore: 50threshold automaticallyWHERE fare_amount >= 0) not verifiedscore.example.jsonhadpassingScore: 50whiletest.shwrotepassingScore: 60Grading ladder (verified)
validation_queries.sql: 4 checks (duplicates, NULLs, range, orphans)schema_setup.sql: views defined + fare filter + TIMESTAMP castdata_dictionary.md: grain + primary key + measuresverification_results.sql: borough + revenue + time-pattern queriesassets/borough_count.pngscreenshotAI_ASSIST.md: 4 sections filledScaffold → 10/100 (fail) · Working solution → 100/100 (pass)
Test plan
.hyf/test.shagainst the unmodified scaffold in this repo — should score 10/100 (fail).hyf/test.shagainst a completed solution — should score ≥60/100 (pass)🤖 Generated with Claude Code