Unify Java harness validation error messages

オープン
#872 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@weichieh0204 がすでに取り組んでいます。

2026年11月26日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
Rust
スター
236
フォーク
153
平均マージ
1日 9時間
マージ済み PR(30日)
187

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sysprog21/codetrial のほかの issue

sysprog21/codetrial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。