Skip to content

Commit 68a18d9

Browse files
beachdwellerclaude
andcommitted
fix: soft-fail code detection in prompt pipeline
Change from sys.exit(1) to logging.warning when Python code is detected in prompt.txt. Let test_syntax.py in the grader handle scoring (2 pts deduction) rather than hard-failing the pipeline, which would prevent all grading feedback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5377996 commit 68a18d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

prompt_pipeline/entrypoint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ def main() -> None:
8585
sys.exit(1)
8686

8787
if contains_python_code(student_prompt):
88-
logging.error(
89-
"Prompt contains Python code constructs. "
88+
logging.warning(
89+
"Prompt appears to contain Python code constructs. "
90+
"This will be penalized by the grader. "
9091
"Write a natural language description, not code."
9192
)
92-
sys.exit(1)
9393

9494
logging.info("Prompt length: %d chars", len(student_prompt))
9595

0 commit comments

Comments
 (0)