test: restore mnote-web lib baseline

This commit is contained in:
lix-2026
2026-05-25 23:34:03 +08:00
parent e90b8cb632
commit 36a5a0dc3a
6 changed files with 68 additions and 39 deletions
@@ -1,7 +1,7 @@
# 3-24 mnote-web 全量 lib 测试失败分类 v1
> 创建时间:2026-05-25
> 状态:`process`
> 状态:`done`
> 来源:`design/03-rust-web/done/3-21-final-sidebar-runtime-extraction-v1.md` 归档时拆出的横向测试债。
## 1. 背景
@@ -34,8 +34,8 @@ cargo test --manifest-path rust/Cargo.toml -p mnote-web --lib -- --test-threads=
- [x] 复跑全量命令,记录失败测试名称列表。
- [x] 按第 3 节给每个失败项归类。
- [x] 标出可在一批内快速修复的低风险测试。
- [ ] 对疑似真实回归新建或补充对应 `bugs/03-rust-web/process/` / `bugs/07-ai/process/` 条目。
- [ ] 修复或豁免后再决定本文件是否移动到 `done/`
- [x] 对疑似真实回归新建或补充对应 `bugs/03-rust-web/process/` / `bugs/07-ai/process/` 条目。
- [x] 修复或豁免后再决定本文件是否移动到 `done/`
## 5. Reasonix 只读审计
@@ -121,3 +121,26 @@ routes::web_shell::tests::page_aggregate_endpoint_allows_sqlite_granted_local_fo
- 每个失败项都有明确分类和 owner。
- 能立即修复的低风险失败已修复,或已拆成独立 bug。
- 本文件不再承担多个不相关失败的长期追踪。
## 10. 完成记录
2026-05-25 本轮已完成收口,未再拆新 bug:
- watcher 两项在后续全量复跑中恢复通过,不再作为本文件阻塞。
- legacy auth proxy 断言已改为验证 `/api/auth` 由 Rust auth 主链处理,不再代理旧 Next/Convex cookie。
- access policy 与 web shell 断言已对齐当前外置 runtime / JSON bootstrap / 本地 Markdown 标题契约。
- Hermes block tools 403 已确认为测试 fixture 缺少当前 manifest 要求的联合 capability scope,已补齐 `block.* + page.*`
- resource trash 503 已确认为测试 fixture 缺少 `mediaAssets:listByIds`,已补齐媒体资源查询 fixture。
最终验证:
```bash
cargo fmt --manifest-path rust/Cargo.toml --all --check
cargo test --manifest-path rust/Cargo.toml -p mnote-web --lib -- --test-threads=1
```
结果:
```text
test result: ok. 549 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 14.79s
```