Repository navigation
wordy: document the exception message the tests require - #3182
Closed
Mike-7777777 wants to merge 1 commit into
Closed
Mike-7777777 wants to merge 1 commit into
Mike-7777777 wants to merge 1 commit into
Conversation
This was referenced Nov 22, 2026
Mike-7777777
marked this pull request as ready for review
November 23, 2026 01:56
Member
|
Similar to the all-your-base PR, this is not needed. |
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.
Pull Request
Closes #3184
The eight error tests in
WordProblemSolverTest(unknown operation, non-math question, missing operand, no operands, two operations in a row, two numbers after an operation, postfix and prefix notation) all expectbut nothing in the exercise says so.
instructions.mdonly says the parser "should reject" these inputs, and the stub gives no hint about the exception type or message. A student who throwsIllegalArgumentException("unknown operation"), for example, fails all eight tests with no way to know why until the test file is opened.This PR adds
.docs/instructions.append.mdwith an "Exception messages" section, written in the same format as the Java track'spovexercise, stating the exception type and the exact message. The Python track'swordydocuments its messages the same way. Tests and the example solution are unchanged.How I checked it, against the current
wordytests onmain(27 tests, all enabled):.meta/src/reference/java/WordProblemSolver.javainstructions.mdand the stub aloneinstructions.mdplus the newinstructions.append.mdThe four solutions were written by separate model runs that saw only the docs and the stub, never the tests.
markdownlint-cli2(the repository's.markdownlint-cli2.jsonc) reports 0 errors.The same gap shows up when the exercise is used as a hidden-test benchmark (the Aider polyglot benchmark and the Harbor
aider_polyglotadapter build their prompts from.docs/instructions*.md): in our evaluation runs, 39 of the 41 failing attempts at this exercise failed only on these eight message assertions.Reviewer Resources:
Track Policies