Protect case manifests from validation report output aliases
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #964 của @hiyouwhatsapp — đã merge
Đá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
- 86/100
Hướng nghiên cứu
Đọc tools/validation_reports.py và các bài kiểm thử hiện có về bí danh đầu vào được bảo vệ, sau đó kiểm tra các bên gọi trong tools/run_runtime_cases.py, trình chạy đối tượng và trình chạy kiểm tra mã nguồn. Thêm manifest được sử dụng tests/cases/cases.toml vào tập đầu vào được bảo vệ dùng chung, đồng thời xác minh rằng các bí danh trực tiếp, đã chuẩn hóa và bí danh của tệp hiện có đều thất bại trước khi lưu bất kỳ báo cáo nào. Hoàn tất khi manifest vẫn nguyên vẹn trên các luồng preflight và thông thường, trong khi các đích an toàn vẫn nhận được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The case validation report guard protects Wave sources, compiler inputs and std files, but omits tests/cases/cases.toml. A report destination can therefore replace the configuration used to select the cases, even during a failed preflight.
Starting points: shared protected-input discovery, runtime preflight and its first save, and the default manifest path.
Reproduction
Executed at canonical master d59bdab376bdc04edacdc8029b256cb8d55b5adf on Linux amd64 with Python 3.14.8. The following invokes the production runtime runner with only its checkout location redirected to a disposable fixture. No compiler or VM starts; the unknown target makes selection fail.
Run from the repository root:
import tempfile
from pathlib import Path
from types import SimpleNamespace
from unittest.mock import patch
from tools import run_runtime_cases as runtime
root = Path(tempfile.mkdtemp(prefix="wave-report-manifest-"))
(root / "tests/cases").mkdir(parents=True)
manifest = root / "tests/cases/cases.toml"
before = "version = 2\n# disposable manifest sentinel\n"
manifest.write_text(before)
(root / "tests/cases/test1.wave").write_text("fun main() {}\n")
compiler = root / "wavec"
compiler.write_text("unused compiler sentinel")
with patch.object(runtime, "ROOT", root):
status = runtime.execute(SimpleNamespace(
report_json=manifest,
wavec=compiler,
sources=["test1.wave"],
target_id="unknown-audit-target",
))
print(status, manifest.read_text() == before)
Observed 2 False: the manifest sentinel is replaced by runtime-report JSON. In the real checkout, --report-json tests/cases/cases.toml selects that configuration file as the report destination and has the same missing pre-write guard. Do not run the destructive case against the real manifest.
Scope
Include the consumed case manifest in the shared protected-input set before initial, preflight, progress and final report writes. Keep the scope to actual runner inputs; std/manifest.json is already protected by the existing std-tree scan, and unrelated documentation does not need to become a protected input.
Related #811 protected compiler/entry sources and #906 extended std/import protection. Neither covers the case configuration file; #941 is the separate source-encoding error path.
Difficulty: easy. This extends an existing helper and its established alias tests; no reporting redesign is needed.
Completion criteria
- Direct, normalized and existing-file alias report paths to the manifest fail before any save.
- Preflight failures and normal runner paths preserve the manifest sentinel.
- Check the shared callers so object, source-check and runtime reports agree.
- Safe report destinations still receive normal success/error reports.
- Ngôn ngữ chính
- Rust
- Star
- 56
- Fork
- 21
- Merge trung bình
- 4 giờ 41 phút
- Pull request đã merge (30 ngày)
- 58
Chuẩn bị môi trường
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 wavefnd/Wave
-
bug good first issue
Độ 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
-
enhancement good first issue needs testing
Độ 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
-
bug good first issue
Độ 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
-
Distinguish Rust character literals from lifetimes in the spacing helperCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug good first issue
Độ 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
-
documentation enhancement good first issue
Độ 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
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 2 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 8 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
swc-project/swc#12576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue gpu serve
Độ 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