Grading follow-ups from PR #394

未关闭
#397 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@DarioDeSilva 已经在做这个了。

开始于 2026年10月27日。

评估

这个 Issue 还没有评估数据。

描述

A few small leftovers from the #394 review. None of them blocked the merge.

Timeout handling

  • upload_assignment_autograder still stores NULL when autograder_timeout is left out. upload_submission falls back to 300, but code_editor.py::submit_code uses the raw value, so editor submissions get no time limit at all. The fix is to store the default when the field is missing, or to resolve the timeout in one place that every grading path uses.
  • The timeout has no upper bound. A huge value fails the INTEGER column only after the image is built, and large valid values hold the assignment lock for that long. nginx cuts requests off at 300s anyway, so a cap of around 600 seems reasonable.

Grade script

  • If setpriv is missing from the image, or the autograder file is missing, the script exits 93. That gets recorded as a score-0 "Autograder Error" even though student code never ran. Exit codes 125/126/127 inside the script could map to a setup exit code instead.
  • A hang during reset or copy-in, or an exec-level 137 during setup, is still recorded against the student. This is rare and needs an infrastructure failure.
  • results.json and the autograder log have no size limit before they're read into backend memory.

Cleanup

  • Use KILLED_EXIT_CODE in the script and tests instead of a bare 137. Drop the unreachable GRADE_EXIT_TIMED_OUT entry from student_code_ran.
  • Add the submission id and partial stderr to the hung-exec warning.
  • The "Failed to prepare/cleanup container" messages now also cover Docker CLI errors. Reword them.

Stress test

  • test_submission_burst.py --cleanup deletes the assignment but leaves the generated students enrolled in the course.
主要语言
Python
星标
13
派生
0
平均合并
9 天 7 小时
30 天内合并 PR
5

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

kiat/codeAssist 的其他 Issue

查看 kiat/codeAssist 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。