Unify Java harness validation error messages
Maintainers usually reply within 1 day
@weichieh0204 is already working on this.
Since Nov 26, 2026.
Assessment
This issue has not been assessed yet.
Description
Java harness validation errors include the exception class name, while the equivalent checks in C, C++, JavaScript and Python report the message alone. This follow-up covers the existing Java checks together rather than changing only the ancestor guard in #846.
At PR #846 head 5bdd0551268c4c3d8e55e7cc8776e688f533f70a, javaCase in web/compiler-explorer.js serializes caught exceptions with error.toString(). The ancestor guard therefore reports:
java.lang.IllegalArgumentException: Returned ancestor must be an original input node.
The other four runners report:
Returned ancestor must be an original input node.
Existing Java graph, list and tree validation checks use the same exception convention. Tests currently accommodate the prefix with endsWith. These observations are based on source inspection; no additional runtime reproduction was performed for this draft.
Introduce a dedicated harness-validation exception, such as the HarnessCheck suggested in the review comment, whose toString() returns only its message. Use it consistently for harness validation failures while preserving the exception class name for errors thrown by candidate code.
Acceptance criteria:
- Equivalent harness refusals have exactly matching error text across the five runners, including ancestor identity, graph and list checks.
- Candidate-thrown exceptions, including
IllegalArgumentException, retain their class name and message. - Regression tests use exact equality for harness messages and cover candidate-thrown exceptions separately.
- Valid answers, null-result handling and continuation after a per-case refusal retain their existing behavior.
Related work: #725 addresses null graph neighbors; #783 addresses Python and JavaScript runtime-error locations. This follow-up concerns Java harness error formatting.
- Dominant language
- Rust
- Stars
- 236
- Forks
- 153
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 187
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sysprog21/codetrial
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Inferred void class operations are never checked against the starter's return typePossibly taken @papaya0112 claimed this today. Open
sysprog21/codetrial#871 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwritePossibly taken @BOBOGUAGUA428 claimed this today. Open
sysprog21/codetrial#869 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Highway Billboard Leasing accepts a solution that greedily leases the largest offer firstPossibly taken @PeteChiang1211 claimed this today. Open
sysprog21/codetrial#868 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in sysprog21/codetrial
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
manaflow-ai/cmux#59692 ·
Maintainers usually reply within 1 day
-
Retire stale Python-parity labels in Rust ingress and auth testsPossibly taken @github-actions claimed this today. Openfactory factory:building factory:unowned ralph-status:in-progress via:opencode-free/hy4-flash-free
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
JoshCLWren/comic-pile#5874 · 2 comments ·
Maintainers usually reply within 1 day
-
status:ready unit
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nonagenticai/conveyor#787 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day