Repository navigation
Write the input-through-prompt suite in the YAML DSL - #67
Merged
Merged
Conversation
The DSL now has context-level before/after (universal-judge#924), so the prompt() shim no longer forces a JSON suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TomNaessens
force-pushed
the
enhancement/9723-dsl-before-after
branch
from
November 5, 2026 16:46
df2de02 to
53a24ef
Compare
TomNaessens
marked this pull request as ready for review
November 6, 2026 10:05
TomNaessens
enabled auto-merge
November 6, 2026 10:05
bmesuere
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
tested/javascript/input-through-promptsuite was JSON only because the DSL had no contextbefore. It does since dodona-edu/universal-judge#924, so the suite is nowsuite.yaml, with the same 3 contexts, the sameprompt()shim and the same expected output. The README describes the YAML version.Part of the Courses box in https://github.com/dodona-edu/dodona/issues/9723.
One difference: the DSL always adds a trailing newline to string
stdin. The program now getsWorld\nwhere the JSON suite gaveWorld, and the stdin in the testcase description gets that newline too. The shim calls.trim()before it splits, soprompt()returns the same value and the outcome stays the same.Manual testing
enhancement/9723-dsl-before-after.tested/javascript/input-through-prompt/evaluation/suite.yaml. Each context'sbeforepoints at the shim, defined once underdefinitions(a YAML anchor) and unchanged from the oldsuite.json.docker run --rm --platform linux/amd64 -v <universal-judge at master>:/judge -v $PWD/tested/javascript/input-through-prompt:/exercise ghcr.io/dodona-edu/dodona-tested bash -c "cd /judge && python3 -m tested.cli -e /exercise -p javascript -t /exercise/evaluation/suite.yaml -f". All 3 tests are correct."Hi, " + name. All 3 tests are wrong.Verification
Judge: universal-judge master at 785879e1 (merge of #924), in
ghcr.io/dodona-edu/dodona-tested:latest.dodona-authoring
verifyprocedure on the YAML suite:// wrong): 3 wrongJSON against YAML, normalized judge output (one line per output command), diffed:
WorldvsWorld\n, same forDodonaandAlice). Same statuses (3 correct) and the same expected and generated stdout.Hi,+ name): same differences only. Both give 3 wrong.data(|-block, no trailing newline).🤖 Generated with Claude Code