The problem
PlatformEngr runs hands-on courses where people build real things, Argo CD setups or Helm charts, in their own GitHub repositories. The exams had to answer one question reliably: did this person do the work? And they had to do it with no human reviewer, with results in minutes, and with every input coming from someone who might want a pass without the work.
That is a general enterprise problem in a small package: making automated decisions on untrusted input, where a wrong “yes” is costly and the system must hold up without anyone watching it.
Threat model first
Before the exam flow existed, I wrote down what was worth protecting (what a certificate means, grader spend, the signing secret, the GitHub App’s key, the hidden question bank, learner data), who might attack it (a dishonest learner, an outsider burning money, a malicious repository, a written answer aimed at the AI), and seven trust boundaries between the browser, the portal, GitHub, the runner and the AI provider. Every control below traces back to a line in that document, and each “accepted” risk says why.
Deterministic where possible
An attempt passes only if all three parts pass:
- Repo checks: declarative rules that parse the learner’s files. Repositories are untrusted, so nothing in them is ever executed, installed or rendered with their scripts.
- Multiple choice, drawn per learner from a hidden bank and tied to a personalised scenario, graded in the portal at submit. The score never leaves the portal.
- One short written answer, graded by a model against a rubric.
AI only where code can’t decide
The model has one job: judging whether a free-text answer says the right thing in different words. It sees only the question and the answer, passed as delimited, untrusted data; a test guards that nothing else reaches it. It returns structured JSON with a score per criterion and a “suspected manipulation” flag, which fails the answer. Because the other two parts are deterministic, the AI part alone can never pass an attempt.
It is cheap by design: a small model on a flex tier at low reasoning effort, behind a provider interface (OpenAI or Anthropic, switched by config), with a daily call cap and a provider spend limit. A hand-run eval of about 20 cases per certificate is re-run whenever the rubric or the model changes.
No queue to run: GitHub Actions is the queue
The portal starts a workflow and gets the result back; there are no workers or brokers to operate.
- Signed callbacks. HMAC-SHA256 over timestamp, method, path and body hash, compared in constant time, with a five-minute window. The secret is only present in the two steps that sign, never in the steps that touch learner content.
- No replays. Each dispatch stores a fresh nonce on the attempt, and a result is applied with a single conditional update that requires the attempt to still be running with that nonce. A late result from an earlier run can’t overwrite a newer one.
- The callback doesn’t decide. The portal computes the final verdict from all three parts itself.
- Failure is cheap. Model calls retry; a final failure marks the attempt as an error that can be re-run without using an attempt; work stuck for six hours can be re-dispatched. Results stream to the browser over Server-Sent Events, with an email as backup.
Testing the claim against AI agents
For a timed track, the bar was that an AI agent working alone must fail. I tested it: a coding agent passed every lab, twice, even after the labs were redesigned. A statically graded lab has to keep the root cause visible in its files, so an agent that reads the repo will find it. Rather than add agent traps, the decision (recorded as an ADR) was to change what the certificate claims: the lab may be solved with any tools, and the parts an agent alone must fail are a timed question round and a written answer graded against the learner’s own change.
Outcome
Grading runs end to end with no reviewer, and results arrive in minutes. Certificates can be checked by anyone on a public /verify page and as Open Badges 3.0 credentials. The portal runs on my Kubernetes platform, with metrics, dashboards and alerts like every other service there.
Astro
React
TypeScript
PostgreSQL
Drizzle
GitHub App
GitHub Actions
- HMAC
- Server-Sent Events
- OpenAI / Anthropic
Open Badges 3.0
