Grade an assignment

Upload the JSON bundle downloaded from school.xtec.dev (the "Baixa JSON" button on an assignment view). The bundle's scoped result_token is the only auth needed — grades are POSTed back automatically.

Accepts both kind: "exam" (OCR + grade scanned pages) and kind: "practice" (clone + grade student repos) bundles.

Safety notes

  • Practice bundles clone the student repo into a tmpdir and let the LLM run Bash inside it as the server user. Don't grade untrusted repos on a host you care about.
  • Exam bundles are read-only (OCR only) and never execute student-supplied content.
  • The result_token in the bundle expires 24h after download. If upload fails, the bundle is still downloadable from the job page so you can drop it on the "Puja resultat" button in the school UI.
Drives Ollama Cloud (or local claude CLI) on the host.