requires: declare commands that must resolve, and report where each landed
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
Bắt đầu bằng việc truy vết cách front matter xử lý path: và PATH đã ghép được truyền tới các session như thế nào, sau đó kiểm tra hành vi mở rộng env: hiện có và golden-test runner. Thêm bước phân giải requires: trước session đầu tiên, tuân theo PATHEXT và nêu các thư mục đã tìm khi thất bại. Báo cáo từng lệnh đã phân giải, đường dẫn của lệnh, số lượng tệp và số lượng session để một lần chạy cho thấy nó thực sự đã kiểm thử những gì.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
tryscript resolves a command through PATH and says nothing about where it landed. For a
golden suite, that is the difference between a proven result and a green check.
A golden test's whole claim is that a particular program produced particular bytes.
path: prepends to the inherited PATH rather than replacing it, so if a declared entry
fails to resolve — variable unset, build directory cleaned, a typo, a cross-compiled
layout — lookup continues into the inherited PATH and finds whatever is installed there.
The suite then passes while exercising a build nobody selected, with no diagnostic.
That is not hypothetical. It happened in fdu: every golden selected its build with
path: - $TRYSCRIPT_GIT_ROOT/target/debug, and whenever that failed to resolve the
sessions silently fell through to ~/.cargo/bin/fdu — the developer's installed copy —
and passed.
Proposal
requires:
- fdu
Named commands must resolve before the first session runs. If one does not, abort with a
message naming the command and the directories searched, rather than letting a hundred
confusing diffs appear later.
And report where each landed:
resolved fdu -> /…/target/debug/fdu (12 files, 129 sessions)
The reporting half is the one that matters. It makes a run legible rather than merely
correct — the same reason a good test harness says what it ran, not just whether it
passed. Today the only way to know which binary a suite exercised is to reason about
PATH composition and hope.
Notes
- Lookup should respect
PATHEXTon Windows rather than assuming a bare name. - Resolution should use the same composed
PATHthe sessions get, includingpath:
entries, so it answers the question the sessions will actually ask. - Worth failing rather than warning: a suite that runs without the program it is about
does not produce a weaker result, it produces a meaningless one.
Context
fdu worked around this by naming the binary's directory through a variable and
preflighting it in an external runner script before invoking tryscript. That works, but it
is machinery every project would otherwise have to build for itself, and it cannot report
what tryscript itself resolved.
Related: jlevy/tryscript#51, which made env: expand variables the way path: already
did — the same family of "front matter should be able to say what it means about which
program runs".
- Ngôn ngữ chính
- TypeScript
- Star
- 13
- Fork
- 1
- Merge trung bình
- 3 giờ 38 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 jlevy/tryscript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của jlevy/tryscript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Đang mởbug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Client support matrix inclusion Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
calcite-components needs triage refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Esri/calcite-design-system#15203 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
danielmiessler/LifeOS#2218 ·