[correctness][missing-coverage][sort] Mixed files and repeated stdin lack a regression test
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
builtins/sort/sort_test.go:380-415 の既存の入力ソーステストと、tests/scenarios/cmd/sort/basic/ 以下のシナリオテストを読んでください。説明されているファイルと、繰り返し指定する - オペランドを使って、提案されたケース tests/scenarios/cmd/sort/basic/mixed_files_repeated_stdin.yaml を追加してください。go test ./tests -run '^TestShellScenarios$/cmd/sort' を実行してください。このケースが成功し、終端されていないレコードが別々に扱われた期待どおりのソート済み出力を確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Generated by the rshell behavior correctness scanner.
- Contract:
BEH-004 - Classification:
missing-coverage - Impact:
low - Target:
sort - Scanned commit:
514d1cb8188fda6b1accca5955dfab3b0e8aa34a
Existing tests cover stdin, one '-' operand, multiple files, and unterminated records separately. They do not meaningfully cover their interaction: a file followed by repeated '-' operands must consume stdin once and preserve separate record boundaries when both inputs lack final newlines. The tested behavior matched GNU; no defect was demonstrated.
Contract sources
docs/BEHAVIOR_CONTRACTS.md:45-49: Standard input, '-', file operands, and multiple inputs must interact like the reference command.sort --help: Command help promises sorted concatenation and stdin reading for '-' operands.builtins/sort/sort_test.go:380-415: Existing input-source tests exercise these cases separately.
Implementation references
builtins/sort/sort.go:372-387: Operands are read individually and their records appended before sorting.builtins/sort/sort.go:427-446: Each '-' operand wraps the same stdin reader.
Fixture setup
Create data.txt with exact bytes "b\nd" and stdin.txt with exact bytes "c\na" in a fresh temporary directory. Neither file ends with a newline.
Reproducer
sort data.txt - - < stdin.txt
Commands used:
GOENV_VERSION=1.26.3 timeout 300s go build -o /tmp/zz_correctness_scan_rshell ./cmd/rshellIn a fresh fixture directory: /tmp/zz_correctness_scan_rshell --allowed-commands rshell:sort --allowed-paths "$PWD" -c 'sort data.txt - - < stdin.txt'In an equivalent fresh fixture directory: LC_ALL=C bash --noprofile --norc -c 'sort data.txt - - < stdin.txt'GOENV_VERSION=1.26.3 timeout 300s go test ./tests -run '^TestShellScenarios$/cmd/sort' -count=2 -v
Verification
- Reproduction runs: 4
- Reference: GNU sort 9.4 matched the expected result twice from fresh fixtures. Both CLI executions and both temporary scenario executions passed.
- Temporary test: tests/scenarios/cmd/sort/zz_correctness_scan_cases/zz_correctness_scan_mixed_inputs.yaml (removed)
- Suggested regression-test location:
tests/scenarios/cmd/sort/basic/mixed_files_repeated_stdin.yaml
Fingerprint: f38bb9f21b7f40b8e04041b1bb63daaa0387a24dcc0256fd43134ff98b63622f
- 主要言語
- Go
- スター
- 31
- フォーク
- 3
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataDog/rshell のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[correctness][confirmed-defect][builtins/wc] wc pads regular-file stdin as though it were a pipeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
validateDeclaredPath lets control characters through into the Gradle init script's Groovy literalオープンagent-butler-finding agent-research bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jordansmall/spindrift#5821 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/rocketmq-dashboard#7243 ·
メンテナーはふだん 3 日以内に返信
-
Missing example coverage: getClock対応中かも @camunda-sdk-automation が今日担当しました。 オープンnew-operations
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
camunda/orchestration-cluster-api-go#75 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
praetorianer777/Stator#465 ·
メンテナーはふだん 1 日以内に返信