[correctness][confirmed-defect][sort] Conflicting repeated field separators are silently accepted
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
Hướng nghiên cứu
Đọc builtins/sort/sort.go:154 và builtins/sort/sort.go:207-221 để theo dõi quá trình đăng ký và xác thực cờ dấu phân cách. Thêm một kịch bản hồi quy tại tests/scenarios/cmd/sort/flags/repeated_separator_conflict.yaml và chạy các kịch bản sort tập trung; hoàn thành khi các dấu phân cách lặp lại không tương thích tạo ra mã thoát 2 và thông báo chẩn đoán sort: incompatible tabs, trong khi các kịch bản sort hiện có vẫn chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 31
- Fork
- 3
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataDog/rshell
-
[correctness][missing-coverage][sort] Strict uniqueness checks lack numeric-key equivalence coverageĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[correctness][missing-coverage][sort] Mixed files and repeated stdin lack a combined regressionĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của DataDog/rshell
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken Claude manifestĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
[Chore] Remove dead AutogenV2 feature flagCó thể đã có người làm @geeknishantkyeus đã nhận hôm nay. Đang mởbug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
kyverno/kyverno#17936 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100