[correctness][missing-coverage][sort] Mixed files and repeated stdin lack a regression test
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
- 83/100
Hướng nghiên cứu
Đọc các bài kiểm thử hiện có về nguồn đầu vào trong builtins/sort/sort_test.go:380-415 và các bài kiểm thử kịch bản trong tests/scenarios/cmd/sort/basic/. Thêm trường hợp được đề xuất tests/scenarios/cmd/sort/basic/mixed_files_repeated_stdin.yaml bằng các tệp đã mô tả và các toán hạng - lặp lại. Chạy go test ./tests -run '^TestShellScenarios$/cmd/sort'; công việc hoàn tất khi trường hợp này chạy qua và xác nhận đầu ra đã sắp xếp như mong đợi với các bản ghi không có ký tự kết thúc được tách riê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-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
- 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
-
[correctness][confirmed-defect][sort] Conflicting repeated field separators are silently acceptedĐang mở
Độ 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
-
Độ 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ự
-
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
-
enhancement model:sonnet phase-2-optimize runtime:claude security size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
FootprintAI/Containarium#2416 ·
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 66/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