fix(autograder): stop penalizing left-in guide comments and schema-qualified views#8
Merged
Conversation
…alified views Two grader bugs in .hyf/test.sh were failing correct submissions: 1. file_is_filled() failed any file containing the word "TODO", so students who left the scaffold's "-- TODO:" guide comments above their finished, correct queries were scored as empty stubs. Now SQL line-comments are stripped before the check and only a line whose content *begins* with TODO (an unreplaced markdown placeholder) marks a file as a stub. The instruction line "...Replace every TODO." no longer trips it. 2. The vw_dim_zones / vw_fact_trips detection grepped for "VIEW <name>" and missed schema-qualified names like "VIEW dev_halyna.vw_dim_zones" — i.e. it penalized the own-schema pattern the assignment requires. The regex now allows an optional "<schema>." prefix. Verified against the 7 open student PRs: scores move from 15/30/15/15/85/30/95 to 100/100/95/95/100/100/95. Genuine gaps are still caught (unfilled AI reflection prompts in two PRs, a misnamed screenshot in one). Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Problem
The Week 9 autograder (
.hyf/test.sh) was failing correct student submissions. Running it against the 7 open PRs, 5 of 7 passing students scored 15–30/100 despite complete, correct SQL. Two bugs caused it:1.
file_is_filled()flagged any file containing the word "TODO". The SQL scaffold ships guide comments like-- TODO: GROUP BY the three columns …. Students wrote the correct query below the comment and (reasonably) left the guide comment in place. The grader treated the whole file as an empty stub. The markdown header line…Replace every TODO.tripped it too.2. View detection missed schema-qualified names. The check grepped
VIEW[[:space:]]+vw_dim_zones, which does not matchCREATE VIEW dev_halyna.vw_dim_zones— i.e. it penalized the own-schema pattern the assignment explicitly requires. Halyna's correct submission lost 10 points to a false "view not found".Fix
file_is_filled()now strips SQL line-comments and blank lines, requires real remaining content, and only treats a line whose content begins with TODO (an unreplaced markdown placeholder likeTODO: what did you ask?) as a stub. Leaving a-- TODO:guide comment above finished SQL is now harmless;…Replace every TODO.is fine.vw_dim_zones/vw_fact_tripsgreps now allow an optional<schema>.prefix.Verified against all 7 open PRs
borough_count.png.png✅Real gaps are still caught, so this is not a blanket pass-everything loosening.
🤖 Generated with Claude Code