[correctness][confirmed-defect][sort] Conflicting repeated field separators are silently accepted
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
builtins/sort/sort.go:154 と builtins/sort/sort.go:207-221 を読み、セパレータフラグの登録と検証を追跡してください。tests/scenarios/cmd/sort/flags/repeated_separator_conflict.yaml に回帰シナリオを追加し、対象を絞った sort シナリオを実行してください。競合するセパレータが繰り返し指定された場合に終了コード 2 と診断 sort: incompatible tabs が出力され、既存の sort シナリオも引き続き成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Generated by the rshell behavior correctness scanner.
- Contract:
BEH-005 - Classification:
confirmed-defect - Impact:
medium - Target:
sort - Scanned commit:
514d1cb8188fda6b1accca5955dfab3b0e8aa34a
Conflicting repeated field separators silently use the final value instead of rejecting the invocation. GNU reports incompatible tabs and exits 2. This can silently sort by unintended keys. No applicable documented divergence was found.
Contract sources
docs/BEHAVIOR_CONTRACTS.md:51-55: Repeated, short, long, and attached flags must follow documented or reference behavior.SHELL_FEATURES.md:33: Supports -t SEP and -k KEYDEF without a repeated-separator divergence./usr/bin/sort: Native GNU coreutils 9.4 reproducibly emitted the exact expected diagnostic and status.
Implementation references
builtins/sort/sort.go:154: Registers the separator as one string value, retaining only the final occurrence.builtins/sort/sort.go:207-221: Validates only the final separator; does not detect conflicting prior values.
Fixture setup
No files required. Both engines were executed twice through Python subprocess.run with captured stdout/stderr/status, LC_ALL=C, and a new tempfile.TemporaryDirectory(prefix='zz_correctness_scan_') for each run.
Reproducer
printf 'b:2\na:1\n' | sort -t : --field-separator=, -k2,2n
Commands used:
GOENV_VERSION=1.26.3 timeout 300s go build -o /tmp/zz_correctness_scan_rshell ./cmd/rshell/tmp/zz_correctness_scan_rshell --allowed-commands rshell:sort,rshell:printf -c "printf 'b:2\na:1\n' | sort -t : --field-separator=, -k2,2n"LC_ALL=C bash -c "printf 'b:2\na:1\n' | sort -t : --field-separator=, -k2,2n"GOENV_VERSION=1.26.3 timeout 300s go test ./tests -run '^TestShellScenarios$/^cmd$/^sort$/^(basic|flags|errors|help|pathological|zz_correctness_scan_cases)$' -count=2 -timeout 240s
Expected
Exit code: 2
stdout:
stderr:
sort: incompatible tabs
Actual
Exit code: 0
stdout:
a:1
b:2
stderr:
Verification
- Reproduction runs: 2
- Reference: GNU coreutils 9.4 under LC_ALL=C. Two clean direct reproductions; the GNU-derived exact YAML expectations also failed in both focused scenario runs.
- Temporary test: tests/scenarios/cmd/sort/zz_correctness_scan_cases/zz_correctness_scan_repeated_separator.yaml; removed after verification. Script, stdout, and stderr used YAML |+ scalars.
- Suggested regression-test location:
tests/scenarios/cmd/sort/flags/repeated_separator_conflict.yaml
Fingerprint: 6d4358f484ac1b96dbd4011e33187a11575a8c6deb58d7a3bc317d247dd20537
- 主要言語
- 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
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mvanhorn/cli-printing-press#5146 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AvengeMedia/DankMaterialShell#3853 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信