Grading follow-ups from PR #394

Aperta
#397 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@DarioDeSilva ci sta già lavorando.

Dal 27/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.
Lingua principale
Python
Stelle
13
Fork
0
Merge medio
9g 7h
PR unite (30g)
5

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kiat/codeAssist

Tutte le issue di kiat/codeAssist

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.