Custom test input during battles
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker-compose, javascript, nextjs, nodejs
- 領域
- backend, security, testing-qa
調査の方向性
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 の本文から書いたものです。
説明
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 testandnode scripts/check-boundary.jspass.
- 主要言語
- JavaScript
- スター
- 0
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sennaicodes/codearena のほかの issue
-
Add issue and pull request templates再び着手できるかも @franciscorodr26 が 18 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンdocumentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
sennaicodes/codearena#13 · コメント 1 件 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
sennaicodes/codearena#31 ·
sennaicodes/codearena の issue をすべて見る
似ている issue
-
[CLI] Clarify distinction between 'capture camera' and 'capture screen' in help text and outputオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
espressif/esp-vision#18 ·
-
verified
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信