Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Custom test input during battles

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

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker-compose, javascript, nextjs, nodejs

調査の方向性

Start with frontend/pages/battle.js and compare the custom-input flow in frontend/components/practice/ArenaPractice.js; trace the practice run endpoint's parsing and runner before adapting it for battles. Check docker-compose.judge0.yml for the real Judge0 setup, then run npm test and node scripts/check-boundary.js. Done means custom runs work across supported languages, validate parameter types and rate limits, and keep results private from the opponent without affecting submissions or ratings.

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted

Practice lets players run their code on their own input (customInput in frontend/components/practice/ArenaPractice.js). Battles do not, so in a battle the only way to check an edge case is to submit, which costs time and gives away nothing useful.

What to do

  • Add a "Custom input" panel to the battle editor (frontend/pages/battle.js) that runs the player's code on input they type, showing output, errors and runtime.
  • Reuse the practice run endpoint's parsing and runner rather than writing a second path.
  • Validate the input against the problem's parameter types before sending it to Judge0, with a clear error on mismatch.
  • Rate limit custom runs per player per battle (for example 1 every 3 seconds) so Judge0 is not flooded.
  • Custom runs never count as submissions and never affect ratings or tie-breaks.

Things that must hold

  • The opponent never sees custom input or its output.
  • A custom run cannot be used to probe hidden tests: it returns only the player's own output, never an expected value.

Definition of done

  • Works in all supported languages, checked against a real Judge0 (docker-compose.judge0.yml).
  • Tests for type validation, rate limiting and the opponent not receiving the result.
  • npm test and node scripts/check-boundary.js pass.
主要言語
JavaScript
スター
0
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

sennaicodes/codearena のほかの issue

sennaicodes/codearena の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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