Protect case manifests from validation report output aliases
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #964 来自 @hiyouwhatsapp —— 已合并
评估
调研方向
阅读 tools/validation_reports.py 及其现有的受保护输入别名测试,然后检查 tools/run_runtime_cases.py、对象运行器和源代码检查运行器中的调用方。将使用的清单 tests/cases/cases.toml 加入共享的受保护输入集合,并验证直接、规范化和现有文件别名都会在保存任何报告之前失败。完成标准是:在 preflight 和正常路径中清单保持完好,同时安全的目标仍能收到报告。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 56
- 派生
- 21
- 平均合并
- 4 小时 44 分钟
- 30 天内合并 PR
- 57
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wavefnd/Wave 的其他 Issue
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
enhancement good first issue needs testing
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Distinguish Rust character literals from lifetimes in the spacing helper可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
documentation enhancement good first issue
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
peteonrails/voxtype#909 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
alchemyplatform/rundler#1358 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
selkies-project/pixelflux#52 · 4 条评论 ·
维护者通常 1 天内回复
-
llm translation
难度 2/5 1-3 小时 新手友好度 78/100
BerriAI/litellm#47884 · 1 条评论 ·
维护者通常 1 天内回复
-
area:testing bug good first issue platform:windows priority:medium
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复