Skip to content

Return 422 when the evaluation function rejects a submission - #38

Merged
m-messer merged 4 commits into
mainfrom
feature/invalid-submission-422
Oct 5, 2026
Merged

m-messer merged 4 commits into
mainfrom
feature/invalid-submission-422

Conversation

@m-messer

@m-messer m-messer commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

When the evaluation function reports that it can't process a submission (e.g. an unparseable expression), shimmy now responds with 422 Unprocessable Entity instead of 500.

  • New supervisor.InvalidSubmissionError, returned by:
    • the RPC adapter when the worker sends JSON-RPC error code 422 (InvalidSubmissionRpcCode)
    • the file adapter when the worker sends error.code == "INVALID_SUBMISSION" (InvalidSubmissionFileCode)
  • runtime: getErrorStatusCode maps InvalidSubmissionError to 422, and newErrorResponse returns only the evaluation function's message, without the wrapping context. If a worker response has no result, the worker's error message is now used instead of a generic unmarshal error.
  • muEd ServeEvaluate: non-200 runtime responses are now converted to muEd ErrorResponse bodies (422/400 → VALIDATION_ERROR, anything else → INTERNAL_ERROR), instead of passing the legacy body through.
  • mued_v0.1.0.yml: adds the 422-UnprocessableSubmission response to /evaluate.

CI change

Also disables the sandbox integration test job: nsjail fails to remount /proc/sys/fs/binfmt_misc on the current ubuntu-24.04 runner image, so every sandboxed launch exits 255. Pinning nsjail to an older commit didn't fix it and was reverted. The job should be turned back on once this is fixed.

Related

🤖 Generated with Claude Code

m-messer and others added 4 commits October 5, 2026 16:23
Introduce `InvalidSubmissionError` for worker feedback on unprocessable submissions, with new constants and improved error handling across file, RPC, and runtime adapters. Expand tests and schema to support `422 UnprocessableEntity` responses.
Upstream nsjail HEAD (Oct 2026) now fails closed when remounting
submounts such as /proc/sys/fs/binfmt_misc, which breaks sandboxed
workers using --chroot / and fails the sandbox integration tests.
Pin CI and the Docker image to 187855988a, the last commit that passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nsjail fails to remount /proc/sys/fs/binfmt_misc on the current
ubuntu-24.04 runner image, so every sandboxed launch exits 255.
Skip the job until that is resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m-messer
m-messer merged commit 4a41fe4 into main Oct 5, 2026
18 checks passed
@m-messer
m-messer deleted the feature/invalid-submission-422 branch October 5, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant