dock: refresh cached panel titles on language switch
CI / Build & test (Windows) (push) Canceled after 0s
CI / Build & test (Arch) (push) Canceled after 0s
CI / Build & test (Debian) (push) Canceled after 0s
CI / Build & test (Fedora) (push) Canceled after 0s
CI / Build & test (macOS) (push) Canceled after 0s
CI / Build & test (openKylin arm64) (push) Canceled after 0s
CI / Build & test (openKylin x64) (push) Canceled after 0s

PanelHandle snapshots DockPanel::title at registration and the tab strip
renders that cache, so switching the UI language at runtime (menu or
preferences) left every docked tab in the previous language. Capture a
type-erased title reader and notifier from the concrete panel entity and
add DockArea::refresh_panel_titles, which re-reads each title, marks the
panel view dirty for localized content, and repaints the chrome.

Also fix the timeline_view test fixture that missed ClipRenderData's
multicam field (gpui's test target did not compile).
This commit is contained in:
2026-09-28 17:53:08 +08:00
parent c94d7f479e
commit 017dc80a16
15 changed files with 66 additions and 178 deletions
+23 -25
View File
@@ -1,39 +1,37 @@
# Oak Video Editor ![CI](https://github.com/OakVideoEditorCommunity/oak/actions/workflows/ci.yml/badge.svg)
[中文](docs/zh/README.md)
Oak Video Editor is a free non-linear video editor for Windows, macOS, and Linux.
Oak Video Editor is a renamed fork of Olive, aiming to deliver a more complete and user-friendly editing experience.
This project is a community-maintained fork of Olive Video Editor.
![screen](https://olivevideoeditor.org/img/020-2.png)
## Screenshots
![screenshot](docs/imgs/screenshot.png)
**NOTE: Oak Video Editor is alpha software and is considered highly unstable. While we highly appreciate users testing and providing usage information, please use at your own risk.**
# Features
## Binaries
- Premiere-like keyboard shortcut experience
- OpenFX plugin support — the plugin system used by DaVinci Resolve
- End-to-end color management support
- 10-bit display output
- OCIO LUT support
- Proxy editing workflow
- Timeline interchange with DaVinci Resolve, Premiere Pro, and Final Cut Pro via OpenTimelineIO and Final Cut Pro XML
The binary can be downloaded here:
## Download
[v0.4.2](https://github.com/OakVideoEditorCommunity/oak/releases/tag/v0.4.2-alpha)
[v0.5.0](https://github.com/OakVideoEditorCommunity/oak/releases/tag/v0.5.0-alpha2)
[v0.4.1](https://github.com/OakVideoEditorCommunity/oak/releases/tag/v0.4.1-alpha)
## Build Instructions
[v0.4.0](https://github.com/OakVideoEditorCommunity/oak/releases/tag/v0.4.0-alpha)
## Building from Source
See [`docs/build.md`](docs/build.md) for build instructions on Windows (MSYS2), Linux (Debian/Ubuntu, Fedora, Arch Linux), and macOS.
## Documentation
- [Project Storage Architecture](docs/project-storage.md) ([中文](docs/zh/project-storage.md)) — database write-through persistence, node-granular journal, persistent undo
- [Build guide](docs/build.md) · [工程文件格式](docs/zh/project-file-reference.md)
See the [Build Guide](docs/build.md).
## Roadmap
| Version | Theme | Core Deliverables | Boundary Notes |
|:--------|:--|:--|:--|
| **0.3** | **Plugin Architecture Milestone** | Production-ready OpenFX host support | Not about quantity of plugins, but "any OFX plugin loads without crashing" |
| **0.4** | **Color, Audio & Performance** | `.cube`/`.3dl` support, scopes (waveform/vectorscope/histogram), three-way color wheels, waveform auto-sync, BWF timecode sync, audio meters (LUFS/VU), proxy media workflow, hardware-accelerated export (NVENC/VideoToolbox), batch render queue | Combines the previous 0.4-0.6 scope into one usability milestone: color workflow, audio sync, and 4K/8K performance |
| **0.5** | **Animation, Tracking & Collaboration** | Bézier keyframe curve editor, basic point tracking, image stabilizer, full multicam angle switching, OpenTimelineIO, EDL/XML import/export | Combines the previous 0.7-0.8 scope into one timeline/interchange milestone |
| **0.6** | **Stability Milestone** | Project file format freeze (backward compatibility promise), crash recovery, autosave, memory optimization | "Feature freeze" testing period before 1.0 |
| **1.0** | **Production Ready** | Complete documentation, installers, known issues list, community support channels | Declared "ready for serious projects" |
| Version | Theme | Core Deliverables |
|:--|:--|:--|
| **0.5 (current)** | **Rust Rewrite** | Oak rewritten in Rust |
| **0.6** | **Color, Audio & Performance** | AI video editing, scopes (waveform/vectorscope/histogram), three-way color wheel panel, multicam editing support, BWF timecode sync, audio meters (LUFS/VU), batch render queue |
| **0.7** | **Animation, Tracking & Collaboration** | Bézier keyframe curve editor, basic point tracking, image stabilizer |
| **0.8** | **Stability Milestone** | Project file format freeze (backward compatibility promise) — the "feature freeze" testing period before 1.0 |
| **1.0** | **Production Ready** | Complete documentation, installers, known issues list, community support channels — declared "ready for serious projects" |
-96
View File
@@ -1,96 +0,0 @@
# Oak Video Editor
[![CI](https://github.com/OakVideoEditorCommunity/oak/actions/workflows/ci.yml/badge.svg)](https://github.com/OakVideoEditorCommunity/oak/actions/workflows/ci.yml)
[中文](docs/zh/README.new.md)
Oak Video Editor is a free, open-source **non-linear video editor** for Windows, macOS, and Linux.
This project is a community-maintained fork of Olive Video Editor.
> **NOTE: Oak Video Editor is alpha software and is considered highly unstable. We appreciate users testing it and sharing feedback, but please use it at your own risk.**
<!-- SCREENSHOT: main editing window (timeline + viewer) -->
![Screenshot – main window](docs/images/screenshot-main.png)
## Features
- Responsive timeline editing with smart disk/playback caching
- Node-based compositing and effects, including an OpenFX (OFX) plugin host
- Full color management (OpenColorIO): `.cube`/`.3dl` LUTs, configurable display/view/look transforms
- Scopes: waveform, vectorscope, histogram, and audio meters (LUFS/VU)
- Bézier keyframe animation with a curve editor
- Multicam editing and waveform-based audio sync
- Proxy media workflow for smooth 4K/8K editing
- Hardware-accelerated and batch export (H.264/H.265, image sequences, audio)
- Project crash recovery and autosave
<!-- SCREENSHOT: node editor -->
![Screenshot – node editor](docs/images/screenshot-node.png)
## Download
Pre-built binaries for Windows, macOS, and Linux are on the [Releases](https://github.com/OakVideoEditorCommunity/oak/releases) page.
Latest: [v0.4.2-alpha](https://github.com/OakVideoEditorCommunity/oak/releases/tag/v0.4.2-alpha)
## Architecture
Oak is split into small, independently testable components with a pure C ABI at the boundary:
| Component | Kind | Purpose |
|---|---|---|
| `liboakcore` | shared library | Qt-free core types (rational, timecode, bezier, sample buffer, audio/video params) with a pure C ABI |
| `liboakengine` | shared library | the editing engine (node graph, timeline, render, codec, tasks), exposed only through the `oakengine_*` C ABI facade |
| `oak-editor` | application | the Qt GUI; talks to the engine **only** through the C ABI |
| `oak-render-worker` | process | headless render process that executes frames off the GUI thread (NDJSON IPC) |
| `oak-cli` | tool | command-line frontend for the engine: media info, probing, rendering, and transcoding without the GUI |
The C ABI boundary is what makes the engine embeddable and is the foundation for a planned module-by-module rewrite of the engine in Rust (see [`docs/zh/plans/completed/riir.md`](docs/zh/plans/completed/riir.md)).
<!-- DIAGRAM: component / ABI layout -->
![Architecture diagram](docs/images/architecture.png)
## Command-Line Tools
`oak-cli` is a standalone, pure-C-ABI consumer of the engine:
```bash
oak-cli info <file> # media information
oak-cli probe <file> # stream/decoder probe
oak-cli render <project.ove> <out> # render a project range
oak-cli transcode <in> <out> # transcode media
```
## Building from Source
See [`docs/build.md`](docs/build.md) for full instructions (Windows/MSYS2, Linux Debian/Ubuntu/Fedora/Arch, and [`docs/build_macos.md`](docs/build_macos.md) for macOS). In short:
```bash
cmake -B build -G Ninja
cmake --build build
ctest --test-dir build --output-on-failure
```
## Roadmap
| Version | Theme | Core Deliverables |
|:--|:--|:--|
| **0.3** | **Plugin Architecture** | Production-ready OpenFX host support — "any OFX plugin loads without crashing" |
| **0.4** | **Color, Audio & Performance** | `.cube`/`.3dl`, scopes, three-way color wheels, waveform auto-sync, BWF timecode sync, audio meters, proxy media, hardware-accelerated export, batch render queue |
| **0.5** | **Animation, Tracking & Collaboration** | Bézier keyframe curve editor, point tracking, image stabilizer, full multicam, OpenTimelineIO, EDL/XML interchange |
| **0.6** | **Stability** | Project file format freeze (backward compatibility), crash recovery, autosave, memory optimization |
| **1.0** | **Production Ready** | Complete documentation, installers, known-issues list, community support |
## Contributing
Contributions are welcome. Please read [`CONTRIBUTING.md`](CONTRIBUTING.md) first — it covers:
- the code style (naming rules, including `PascalCase` struct typedefs),
- the **Google Test** requirement for all tests,
- the C ABI boundary contract for engine-facing code.
Useful project docs: [`docs/zh/`](docs/zh/) (中文文档), [`docs/zh/facade-migration-roadmap.md`](docs/zh/facade-migration-roadmap.md), [`docs/zh/plans/completed/riir.md`](docs/zh/plans/completed/riir.md).
## License
Oak Video Editor is free software licensed under the [GNU General Public License v3](LICENSE).
Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 KiB

+23 -37
View File
@@ -1,49 +1,35 @@
---
home: true
title: Oak 视频编辑器
heroImage: /images/oak-icon.png
heroText: Oak 视频编辑器
heroFullScreen: false
tagline: 现代开源的非线性剪辑器,强调速度与清晰度。
actions:
- text: 阅读文档
link: /zh/build.html
type: primary
- text: 查看工程文件
link: /zh/project-file-reference.html
type: secondary
features:
- title: 快速剪辑
details: 响应式时间线、智能缓存与高效媒体管理。
- title: 面向创作者
details: 简洁界面、可配置快捷键与清晰的工程结构。
- title: 开源透明
details: 公开开发流程,欢迎社区参与。
footer: Copyright © Oak Video Editor
---
## Oak Video Editor
## 关于 Oak
Oak 视频编辑器是 Olive 的重命名分支,目标是打造更完善、更友好的剪辑体验。
Oak 视频编辑器是 Olive 的重命名分支,目标是打造更完善、更友好的剪辑体验。本网站提供构建说明、工程文件参考与测试计划等贡献者文档。
## 界面
## 快速开始
![screenshot](../imgs/screenshot.png)
- 按《构建指南》在 Windows/macOS/Linux 上从源码构建。
- 在《工程文件参考》了解项目数据结构。
- 在《[工程存储架构](project-storage.md)》了解数据库写穿持久化与持久撤销历史。
- 按《测试计划》确保发布质量。
# 功能
- 类似Premiere的快捷键体验
- OpenFX插件支持,这是Davinci Resolve使用的插件体系
- 端到端色彩管理支持
- 10bit上屏
- OCIO LUT支持
- 代理剪辑工作流程
- 借助OpenTimelineIO和Final Cut Pro XML与Davinci Resolve、Premiere Pro和Final Cut Pro交换时间线
## 下载
[v0.4.0](https://github.com/OakVideoEditorCommunity/oak/releases/tag/v0.4.0-alpha)
[v0.5.0](https://github.com/OakVideoEditorCommunity/oak/releases/tag/v0.5.0-alpha2)
## 构建说明
请查看[构建指南](build.md)
## 路线图
| 版本 | 主题 | 核心交付物 | 边界说明 |
|:--|:--|:--|:--|
| **0.3**(当前) | **插件架构里程碑** | OpenFX 宿主支持完整可用 | 不追求插件数量,追求"任意 OFX 插件加载不崩溃" |
| **0.4** | **调色、音频与性能** | `.cube`/`.3dl` 支持、示波器(波形/矢量/直方图)、三向色轮面板、波形自动同步(双系统录音对齐)、BWF 时间码同步、音频表(LUFS/VU)、代理媒体工作流、硬件加速导出(NVENC/VideoToolbox)、批量渲染队列 | 合并原 0.4-0.6 范围,集中解决调色工作流、音频同步和 4K/8K 可用性 |
| **0.5** | **动画、跟踪与协作** | 贝塞尔关键帧曲线编辑器、基础点跟踪、画面稳定器、完整 Multicam 角度切换、OpenTimelineIO、EDL/XML 导入导出 | 合并原 0.7-0.8 范围,集中处理时间线高级能力和外部工具交接 |
| **0.6** | **稳定性里程碑** | 项目文件格式冻结(向后兼容承诺)、崩溃恢复、Autosave、内存优化 | 1.0 前的"封版"测试期 |
| 版本 | 主题 | 核心交付物 |
|:--|:--|:--|
| **0.5(当前)** | **Rust重写** | Rust重写后的Oak |
| **0.6** | **调色、音频与性能** | AI视频剪辑、示波器(波形/矢量/直方图)、三向色轮面板、多机位剪辑支持、BWF 时间码同步、音频表(LUFS/VU)、批量渲染队列 |
| **0.7** | **动画、跟踪与协作** | 贝塞尔关键帧曲线编辑器、基础点跟踪、画面稳定器 |
| **0.8** | **稳定性里程碑** | 项目文件格式冻结(向后兼容承诺) | 1.0 前的"封版"测试期 |
| **1.0** | **生产就绪** | 文档完整、安装包、已知问题清单、社区支持渠道 | 宣告"可用于严肃项目" |
+3 -3
View File
@@ -10,14 +10,14 @@
| [`ai-agent-design.md`](ai-agent-design.md) | **AI Agent 插件设计**(已按 OPP/1 重写):多模态 LLM 作为外部插件经策展工具面自动剪辑,`render.*` 取帧回喂形成"编辑→看图→再编辑"视觉闭环;事务化编辑、双层确认、声明式 AI 面板、Mock LLM/回放夹具测试、A1–A5 里程碑 | external-plugin-system P1–P3 完成(面板需 P4) |
| [`completed/external-plugin-system.md`](completed/external-plugin-system.md) | **外部功能插件系统**:插件=独立进程(非库加载),JSON-RPC over stdio 控制面 + shm 数据面(泛化 M15 render-worker 传输);策展宿主 API(事务化可撤销编辑、取帧回喂 AI)、声明式/像素面双 UI 路径、能力位与确认模式;含与 ai-agent-design.md 的关系与 P1–P6 里程碑 | 已解锁(RIIR + M15 完成),随时启动 |
| [`completed/external-plugin-protocol.md`](completed/external-plugin-protocol.md) | **插件协议规范 OPP/1**:NDJSON 分帧 + JSON-RPC 2.0 双向信封、握手/心跳/关闭、全量方法/事件/错误码、编辑事务协议、shm 数据面(无头部无锁)、声明式与像素面 UI 协议、限流配额、版本演进规则、AI 粗剪报文示例 | 随 external-plugin-system 启动 |
| [`render-pipeline-threads.md`](render-pipeline-threads.md) | **渲染管线改造**:单解码线程 + 单渲染线程 + 主进程上屏(GPU 单队列,多进程无意义);解码硬解优先且零拷贝(FFmpeg hwaccel 经 DMA-BUF/DXGI/IOSurface/CUDA 导入,CPU 解码上传仅 fallback,手写 GPU 解码为次选);OpenFX 收编进唯一隔离进程;decode→render→present 三队列流水线;内置效果全 GPU 零拷贝;resolve 重写为 match+Job 单循环并升级为 Job 图(GraphInput/GraphOutput 虚拟端点可见、禁删,从输入节点 Kahn 形态 BFS 至全部分支汇聚输出节点);M0a–M5 里程碑 | 已解锁,随时启动(M0a 独立先行) |
| [`test-coverage-90-80.md`](test-coverage-90-80.md) | **测试覆盖率提升(行 ≥90% / 分支 ≥80%)**:测试分两层——单元测试 + 模块边界集成测试;层 2 要求每个模块边界 API 都有正常/异常全矩阵;层 1 可豁免过于简单的函数但仍覆盖正常/异常;覆盖率进 CI(cargo-llvm-cov + nightly `--branch`,逐 crate 地板 + PR diff coverage ratchet);M0 度量基建 → M1 单测 → M2 边界 → M3 app → M4 平台 → M5 收官 | render-pipeline-threads M5 完成(已有基线留档 `render-pipeline-threads-m5-branch-coverage.txt`) |
| [`completed/render-pipeline-threads.md`](completed/render-pipeline-threads.md) | **渲染管线改造**:单解码线程 + 单渲染线程 + 主进程上屏(GPU 单队列,多进程无意义);解码硬解优先且零拷贝(FFmpeg hwaccel 经 DMA-BUF/DXGI/IOSurface/CUDA 导入,CPU 解码上传仅 fallback,手写 GPU 解码为次选);OpenFX 收编进唯一隔离进程;decode→render→present 三队列流水线;内置效果全 GPU 零拷贝;resolve 重写为 match+Job 单循环并升级为 Job 图(GraphInput/GraphOutput 虚拟端点可见、禁删,从输入节点 Kahn 形态 BFS 至全部分支汇聚输出节点);M0a–M5 里程碑 | 已解锁,随时启动(M0a 独立先行) |
| [`completed/test-coverage-90-80.md`](completed/test-coverage-90-80.md) | **测试覆盖率提升(行 ≥90% / 分支 ≥80%)**:测试分两层——单元测试 + 模块边界集成测试;层 2 要求每个模块边界 API 都有正常/异常全矩阵;层 1 可豁免过于简单的函数但仍覆盖正常/异常;覆盖率进 CI(cargo-llvm-cov + nightly `--branch`,逐 crate 地板 + PR diff coverage ratchet);M0 度量基建 → M1 单测 → M2 边界 → M3 app → M4 平台 → M5 收官 | render-pipeline-threads M5 完成(已有基线留档 `completed/render-pipeline-threads-m5-branch-coverage.txt`) |
## 其他参考
- 覆盖率批次未提交测试的 review 报告(假测试与实现语义核查):
[`test-coverage-90-80-review.md`](test-coverage-90-80-review.md)
[`completed/test-coverage-90-80-review.md`](completed/test-coverage-90-80-review.md)
- 构建:`docs/zh/build.md`、`docs/zh/build_macos-zh.md`
- 工程文件:`docs/zh/project-file-reference.md`
- 代码风格与 Google Test 要求:`CONTRIBUTING.md`(仓库根)
@@ -56,10 +56,10 @@
- `crates/oak-render/src/procpool.rs:1-40`:TicketArena → ProcessDispatcher →
N 个 WorkerHandle,stdio NDJSON 控制面 + shm FrameSlotPool 数据面;worker 崩溃
后已认领帧重新入队并重生进程(有界重启)。
- `crates/oak-worker/src/worker.rs`:子进程是单线程 NDJSON 循环,
- `../../../../crates/oak-worker/src/worker.rs`:子进程是单线程 NDJSON 循环,
`handle_render_batch_stream` 在循环线程上同步渲染整批 ticket——worker 内部
**没有**任何渲染线程,并行只来自进程池。
- `crates/oak-render/src/scheduler.rs`:预览帧调度(交错分片认领);自动缓存由
- `../../../../crates/oak-render/src/scheduler.rs`:预览帧调度(交错分片认领);自动缓存由
`autocacher.rs` 驱动。
### 2.2 帧传输是 CPU/shm,显示前再上传 GPU
@@ -233,7 +233,7 @@
- 对上层(oak-app/oak-cli)**ticket API 不变**:RenderManager 仍是唯一入口,
完成仍走 exactly-once 的 TicketPayload。
- 对内,ticket 变成队列项:三条 SPSC/MPSC 环(decode/render/present),
复用 `crates/oak-render/src/ipc.rs` 已有的无锁环实现;取消仍走
复用 `../../../../crates/oak-render/src/ipc.rs` 已有的无锁环实现;取消仍走
`cancelatom`(Olive 的 CancelAtom 对应物)。
- 优先级:交互(seek/单帧刷新)> 播放预取 > 导出 > 自动缓存。调度层
(scheduler.rs)从"分片给 N 个进程"改为"按优先级与依赖关系投队列"。
@@ -587,7 +587,7 @@ fallback。** 解码上传与上屏共用一层 `gpuinteop` 抽象,按后端
- 两节点**默认相连、不可删除、不可复制**(图模型层强约束:新建图
自带这对节点;`remove_node`/`duplicate` 对它们拒绝;序列化把它们
作为图的固定端点写入/读出)。
- **要在节点编辑器里显示出来**(`crates/oak-app/src/panels/node_editor.rs`):
- **要在节点编辑器里显示出来**(`../../../../crates/oak-app/src/panels/node_editor.rs`):
与普通节点同等的渲染与连线交互,但禁删、禁复制、禁改名;样式上
与真节点区分(固定标题/图标),连线规则校验(输入节点不接受入线、
输出节点不接受出线)。
@@ -639,13 +639,13 @@ gpui/ocio/标准库)TOTAL = 区域 53.60% / 函数 49.90% / 行 53.15% /
**分支 27.94%**;关键文件分支覆盖率:`pipeline.rs` 45.37%、`backend.rs`
45.51%、`texture.rs` 54.17%、`eval.rs` 43.53%、`gpuinterop.rs` 50.00%
(硬件导入的真机分支;平台错误回退分支单机走不到)。完整报告与采集/合并
命令见 `docs/zh/plans/render-pipeline-threads-m5-branch-coverage.txt`。
命令见 `render-pipeline-threads-m5-branch-coverage.txt`。
**该轮采集早于 2026-09-17 审计修复(montage/计数器/驻留),且
Windows/macOS 行尚未在对应平台编译——它是阶段性质量快照,不构成 M5
收官证明;M5 关闭以平台编译与真机平台测试完成为准,届时重测。**
另经 2026-09-17 复查:该留档的多对象合并被**陈旧测试二进制**拉低
(同文件多对象 51% vs 干净对象 95%),干净重测的基线是
**行 81.72% / 分支 55.45%**(见 `test-coverage-90-80.md` §4.1 勘误);
**行 81.72% / 分支 55.45%**(见 `completed/test-coverage-90-80.md` §4.1 勘误);
覆盖率门禁以干净对象集为准。
## 5. 不变量与边界
@@ -2,10 +2,10 @@
> 审查对象:工作区全部未提交改动(HEAD `800011ef7`,2026-09-20 快照;
> 63 个修改文件 + 11 个新测试文件,+38180 / −254 行)。
> 审查重点(用户指定):**假测试**、**修改实现语义以匹配测试的行为**。
> 审查重点(用户指定): **假测试**、 **修改实现语义以匹配测试的行为**。
> 报告落笔:2026-09-22。配套计划文档:[`test-coverage-90-80.md`](test-coverage-90-80.md)。
>
> 标注约定:**[实证]** = 审查会话直接核对过代码原文/手算过数值;
> 标注约定: **[实证]** = 审查会话直接核对过代码原文/手算过数值;
> **[子代理]** = 深查子代理报告、审查会话抽样复核过关键链条。
## 0. 结论摘要
@@ -209,7 +209,7 @@ program-window、display、source-window 三个验收测试均新增
- `procpool.rs:2402` `resolve_worker_bin` 对 `OAK_WORKER_BIN` **不检查
存在性**直接采用 → spawn 失败 → 槽位恒空 → 跳过路径必然触发;
- 即普通 CI(`cargo test --workspace` 会把 oak-worker 建到
`target/debug`)能真跑,**coverage job 里这组验收测试静默空转**——
`../../../../target/debug`)能真跑, **coverage job 里这组验收测试静默空转**——
恰好在产出覆盖率数字的那次运行里。
对照:`procpool.rs:2922` 测试侧 `find_real_worker` 对 env 覆盖做了
@@ -396,7 +396,7 @@ M4 的平台/真机 job。
契约同时记入模块文档)。
**修复落地(2026-09-24)**。存储 range 模型定为三个原语
(`crates/oak-node/src/block.rs`),各调用点按上表逐点选择:
(`../../../../crates/oak-node/src/block.rs`),各调用点按上表逐点选择:
- `set_length_and_media_out`:**in 固定、out 移动,media 不动**
(Resize / TrimOut / 缺口向右生长);
@@ -146,10 +146,10 @@ cargo +"$COVERAGE_NIGHTLY" llvm-cov --branch --workspace --locked \
python3 tooling/coverage_report.py --json target/coverage.json
```
- `cargo-llvm-cov` 默认已排除:`tests/`/`examples/`/`benches/` 目录、
- `cargo-llvm-cov` 默认已排除:`tests/`/`../../../../examples`/`benches/` 目录、
`*_tests.rs`、`tests.rs`、`target/`、`CARGO_HOME`/`RUSTUP_HOME`、
vendored 依赖。`--fail-under-lines`/`--fail-under-regions`/
`--fail-under-functions` 可用;**没有 `--fail-under-branches`**,
`--fail-under-functions` 可用; **没有 `--fail-under-branches`**,
分支门禁由 `tooling/coverage_report.py` 解析 JSON 实现。
### 3.2 生产代码口径(主口径)
@@ -160,7 +160,7 @@ python3 tooling/coverage_report.py --json target/coverage.json
`#![cfg_attr(coverage_nightly, feature(coverage_attribute))]`,
所有内联 `#[cfg(test)] mod tests` 与其辅助模块加
`#[cfg_attr(coverage_nightly, coverage(off))]`(M0 机械改造);
workspace 根 `Cargo.toml` 加
workspace 根 `../../../../Cargo.toml` 加
`[lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage,coverage_nightly)'] }`。
- M0 同时测量并留档两个口径:
- **主口径(gate)**:排除内联测试后的生产代码;
@@ -273,7 +273,7 @@ python3 tooling/coverage_report.py --json target/coverage.json
`#[gpui::test]`(seed/iterations/retries)都已可用,仓库已有 110 个
`#[gpui::test]` 先例(`app.rs`、`real.rs`、`mock.rs`、panels)。
- **进程/协议边界**:`oak-worker/tests/ofx_host.rs`(真实宿主 + 崩溃钩子)、
`crates/oak-plugin/tests/fixtures/build_fixture.sh` + `scan_probe`
`../../../../crates/oak-plugin/tests/fixtures/build_fixture.sh` + `scan_probe`
(CI 已接线)、`oak-render/tests/render_threads_test.rs`(线程管线)、
`oak-worker/tests/procpool_integration.rs`。
- **媒体**:`oak_codec::testmedia::write_test_clip[_solid]`(MPEG-2,确定性)。
@@ -440,7 +440,7 @@ python3 tooling/coverage_report.py --json target/coverage.json
1. 聚合地板升到 **行 ≥90%、分支 ≥80%**;
2. 逐 crate 地板按 §7 表锁定;PR diff coverage ≥90%/85% 硬门禁;
3. 冻结 `coverage-thresholds.toml` 并写 `docs/zh/build.md`(本地怎么跑、
3. 冻结 `coverage-thresholds.toml` 并写 `../../build.md`(本地怎么跑、
怎么看报告、豁免怎么登记);
4. 收官报告 `docs/zh/plans/coverage/final-<date>.{json,txt}` 归档,
与 M5 的 `render-pipeline-threads-m5-branch-coverage.txt` 并列。
@@ -841,7 +841,7 @@ python3 tooling/coverage_report.py --json target/coverage.json
超过 2×;coverage job 目标 ≤45 分钟。
- **豁免有账**:`unit-exemptions.md`、`exclusions.md`、边界清单三本账
是验收物,缺登记视为未完成。
- **文档同步**:`docs/zh/build.md` 增加覆盖率章节;`docs/zh/plans/README.md`
- **文档同步**:`../../build.md` 增加覆盖率章节;`docs/zh/plans/README.md`
收录本计划与 `coverage/` 归档目录。
## 10. 交付物清单
@@ -855,4 +855,4 @@ python3 tooling/coverage_report.py --json target/coverage.json
`unit-exemptions.md`、`exclusions.md`、`final-<date>.{json,txt}`、
`merged-<date>.txt`(可选);
4. 新增测试:层 1 单测与层 2 边界测试(按 §6 里程碑分批);
5. 本计划文档与 `docs/zh/plans/README.md` 索引更新。
5. 本计划文档与 `../README.md` 索引更新。