ランダムな入力でのテストで、失敗した入力をファイルに保存し、tests/cases/ に移せるようにする
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start with converters/tests/run_random_tests.py, especially the failure reporting and MAXIMUM_LENGTH, then inspect the repository’s CI workflow for its artifact upload steps. Save each failing input and both expected outputs as raw bytes, and report the case number and saved paths. Done when failures can be copied into tests/cases/ and CI retains the saved files as artifacts.
Written by the indexing model from the issue text.
Description
解決したい課題
converters/tests/run_random_tests.py の docstring(11〜12行目)は「失敗したときは、再現に使う乱数の種と入力を表示する。固定のケースにしたい場合は、その入力を tests/cases/ に追加する」としています。しかし失敗の表示は、入力を {data!r:.200} で先頭 200 文字に切っています(123・129・135・139・151行目)。
入力は最大 70,000 文字(MAXIMUM_LENGTH、59行目)なので、長い入力での失敗(読み込みの区切りをまたぐ場合など、このテストで狙っている失敗)は、表示からは入力を取り出せません。乱数の種を指定すれば同じ入力の列を作り直せますが、何件目の入力かは表示されないため、手で取り出すのは手間です。
望ましい動作
- 失敗した入力を、そのままのバイト列でファイルに保存する(例:
RANDOM_FAILURES_DIRで指定した場所、既定は一時ディレクトリー)。期待した出力(to_comma_period.txt・to_touten_kuten.txt)も同じ形で保存し、tests/cases/<名前>/にそのまま移せるようにする - 表示には、何件目のケースか(
RANDOM_SEEDと組み合わせて再現できる番号)と、保存したパスを出す - CI では、保存したファイルを成果物(
actions/upload-artifact)として残す
(2026-11-04 のコードレビューで起票。#122 のブランチ night/additive-improvements-2026-10-22(5e0ecaf)のコードを読んで確認したもので、#122 がマージされた後の main に当たる。既存の Issue と重複しないもの。行番号はこの時点のもの)
- Dominant language
- C#
- Stars
- 0
- Forks
- 3
- Avg merge
- 11h 52m
- Merged PRs (30d)
- 26
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 Sh1n1230/PunctuationToggle
-
enhancement good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
Sh1n1230/PunctuationToggle#308 ·
Maintainers usually reply within 1 day
-
documentation question
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
Sh1n1230/PunctuationToggle#307 ·
Maintainers usually reply within 1 day
-
enhancement github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Sh1n1230/PunctuationToggle#305 ·
Maintainers usually reply within 1 day
-
enhancement github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Sh1n1230/PunctuationToggle#302 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Sh1n1230/PunctuationToggle#300 ·
Maintainers usually reply within 1 day
All issues in Sh1n1230/PunctuationToggle
Similar issues
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endercodezz/BYDLO#336 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
sebastienros/jint#4449 ·
Maintainers usually reply within 1 day
-
clawsweeper:bulk-filed clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openclaw/openclaw-windows-node#2010 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
imazen/imageflow-dotnet#72 · 1 comment ·