← Back to Pull requests

feat(control): 随规范 rc.7 追加部分实现 app.quit,测试桥照真窗口载入钢琴卷帘 #71

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Oct 26, 2026 17:10 UTC
Author

<!-- pr-agent-generated -->

User description


这个 PR 做了什么

把规范副本同步到 MCP 仓库 feature/v1 的 c8a9541(rc.7 追加的部分),并实现新方法 app.quit。

  • 规范同步(cb7f933):

  • - 新增 app.quit(schema 与 9 个向量);
    - 副作用 tempoRounded 登记进 PROTOCOL 14.6,ui.setWorkspace / ui.setSelection 的描述随之修订,新增向量 ui/set-workspace-tempo-rounded;
    - 第 21 节规则 4 写明:被 ui.setSelection 载入钢琴卷帘的片段,也算编辑器里打开的片段;向量 ui/set-workspace-piano-roll-opendyne 随之修订;
    - .github/spec.lock 锁到 c8a9541(gitTree 997c22a,331 个文件)。rc.7 tag 打出后再改为锁 tag。
  • app.quit(b9fbd3f):照窗口关闭按钮结束 OpenTune,先回复、后退出。

  • 测试桥收尾:TestUiBridge 照真窗口的行为,选择片段或导入聚焦时把片段载入钢琴卷帘,视图不变;切换到 openDyne 时为钢琴卷帘里的片段生成音符。这样修订后的 opendyne 向量在无界面运行器里也能通过。
  • 为什么

  • 用户的工作流程是:做完修音就保存、退出 OpenTune。之前接口没有办法关掉 OpenTune,只能让用户自己点关闭按钮。

  • app.quit 比窗口关闭按钮更严格:有未保存的修改时拒绝(UNSAVED_CHANGES),只有调用方明确给出 discardUnsaved: true 才丢弃。窗口关闭按钮遇到未保存修改不会提示,见「上游行为发现」。
  • 实现要点

  • 检查顺序(任一失败都是 executed: false,不改任何东西):

  • 1. SHUTTING_DOWN;
    2. BUSY:写操作的五个原因,再加上未到终态的作业。作业按类型取原因:import、export、projectOpen/projectSave 分别是 import_in_progress、export_in_progress、project_operation,其余类型是 job_in_progress;同时有多个作业时,前三种优先;
    3. 工程有未保存修改,且没有给 discardUnsaved 时,回 UNSAVED_CHANGES(project_dirty)。「有没有未保存修改」与 project.open 用同一个来源。
  • 结果不是写信封,而是 {quitting, discardedUnsavedChanges, projectPath, exitDeadlineMs, warnings, nullReasons?}:

  • - 丢弃了修改时,带 IRREVERSIBLE(subject 为 project 单例);
    - 工程从没保存过时,projectPath 为 null,nullReasons 为 no_project_path;
    - exitDeadlineMs 取 10 s。真机实测从请求到进程结束是 0.50–0.58 s。
  • 先回复、后退出:

  • - dispatcher 的单一入口新增一个「回复写出之后」的步骤。方法结果一确定就进入停止状态,排在后面的其他会话请求得到 SHUTTING_DOWN,不会执行。
    - 回复写出之后,才把退出步骤投递到消息线程,不靠定时器。
    - 退出步骤先停止服务(关闭连接与监听、删除发现文件),再调用窗口自己的 closeButtonPressed()。JUCE 的 StandaloneFilterWindow 在这里保存插件状态,并调用 JUCEApplicationBase::quit()。
    - 直接调用窗口的函数、不复制它的步骤,所以不需要镜像登记,也没有新的上游钩子。
  • 能力与降级:

  • - 能力 app.quit 与其他依赖编辑器的能力一样,由方法表静态上报。
    - 没有编辑器窗口的实例回 UNSUPPORTED(no_editor_window);桥接关不了窗口时回 UNSUPPORTED(capability_missing)。
  • 测试接缝:ControlDispatcher::setAfterReplyObserverForTesting()。ControlService::stop() 会 join 连接线程,只看客户端有没有收到回复,分辨不出退出步骤是不是排得太早,所以要有这个接缝。
  • 层

    spec-sync PR,不属于单一层(gates 按 L8 运行)。

    变更类型

  • feat - [ ] fix - [x] test - [x] docs - [ ] refactor - [ ] ci - [x] chore - [ ] harden
  • 触碰的上游已有文件

    无。改动都在 Source/Control/*、Source/Standalone/ControlEditorBridge、Tests/Control/*、cmake/OpenTuneControl.cmake,以及规范副本与 .github/spec.lock。

    本地 gates(pwsh .github/scripts/gates.ps1 -Layer L8)

  • LFS 设置检查通过

  • configure + build(RelWithDebInfo,经 with-build-slot.ps1)成功

  • ctest -R Control 全绿(control-on 一轮 99/99,其中 Control 88 个)

  • 上游已有测试全绿(-E ARALifecycleContractTests)

  • 所有测试使用临时 OPENTUNE_DATA_DIR

  • 改到 Dispatcher / Ops / bridge:在真 Standalone 上手动跑了退出场景,见「测试说明」。gates 里的真机两行仍是 SKIP,原因是 gates 尚未接入

  • 新文件 clang-format 18.1.8 无差异,且都有 SPDX 头

  • 署名与身份检查通过

  • check-ignored-delta.ps1 通过
  • gates · b9fbd3f · spec-sync/rc7b · 层 L8 · PASS

    | # | 检查 | 结果 | 说明 |
    |---|---|---|---|
    | 1 | LFS 设置 | PASS | lfs.fetchexclude=
    ;6 个 .onnx 均为未 smudge 的 LFS 指针;models/ 无改动 |
    | 2 | configure | PASS | Ninja Multi-Config;耗时 2.5 s |
    | 3 | build | PASS | RelWithDebInfo,--parallel 8,13 个目标(Standalone、VST3 与测试,不含 ARALifecycleContractTests);耗时 7.6 s |
    | 4 | ctest | PASS | 11/11 通过(排除 ARALifecycleContractTests:在锁定的 ARA SDK 2.3.0 下编不过,属上游问题);每个测试设置了独立的 OPENTUNE_DATA_DIR=<build>\ot-test-data\<测试名>(是否生效见「测试数据隔离」一行);耗时 2.7 s |
    | 5 | control-on(OPENTUNE_ENABLE_CONTROL_API=ON:configure / build / ctest -R Control) | PASS | 99/99 个测试通过(Control 88 个,其余 11 个;排除 ARALifecycleContractTests);构建 16 个目标(Standalone、VST3 与测试,同 CI);每个测试独立的 OPENTUNE_DATA_DIR;耗时 7.3 s;ctest(Control)耗时 278.4 s;ctest(其余)耗时 2.9 s |
    | 6 | 测试数据隔离(control-on 一轮) | PASS | control-on 一轮的 Control 测试前后真实目录无任何新建、修改或删除;上游测试不隔离:其余测试改动了真实目录(新建 5 项、修改 0 项、删除 0 项),已知上游行为,未删除用户目录中的任何文件 |
    | 7 | 测试数据隔离(真实 %APPDATA%\OpenTune) | SKIP | 本构建没有名字含 Control 的测试(控制接口关闭,控制层测试只在 control-on 一轮注册),所以没有可判定的控制层测试;其余上游测试的 ctest 已运行(它们改动了真实目录:新建 5 项、修改 0 项、删除 0 项;已知上游行为);控制层测试的隔离见「测试数据隔离(control-on 一轮)」一行 |
    | 8 | models\ 已删除 | PASS | 删除了 POST_BUILD 生成的 2 个 models\(<build>\OpenTune_artefacts\RelWithDebInfo\VST3\OpenTune.vst3\Contents\x86_64-win\models;<build>\control-on\OpenTune_artefacts\RelWithDebInfo\VST3\OpenTune.vst3\Contents\x86_64-win\models),断言已不存在 |
    | 9 | Standalone 真机启动 | SKIP | 尚无控制接口(随后续 PR 加入) |
    | 10 | 真 Standalone 契约与场景测试 | SKIP | 尚无控制接口 |
    | 11 | fork-checks delta(增量识别) | PASS | 71 个提交、580 个文件;上游基点 addb4f4(upstream/20261008-addb4f4) |
    | 12 | fork-checks attribution-copy(署名规则副本) | PASS | check-attribution.mjs 与 attribution-patterns.txt 的 sha256 与记录一致 |
    | 13 | fork-checks dco-identity(DCO 与身份) | PASS | 71 个提交的作者、提交者与 Signed-off-by 均为允许的身份 |
    | 14 | fork-checks attribution(无 AI 署名) | PASS | 71 条提交信息无 AI 署名 |
    | 15 | fork-checks path-guard(路径守卫) | PASS | 未触碰 models/、
    .onnx、pc_nsf_hifigan/、ThirdParty/、D3D12 运行库;13 个 workflow 均未开启 LFS |
    | 16 | fork-checks ignored-paths(忽略路径越界) | PASS | 100 个被上游忽略的文件均在允许清单内(.github/
    、CLAUDE.md、docs/control-api.md) |
    | 17 | fork-checks scope(改动范围) | PASS | 增量只涉及 L0 路径与可上游路径白名单 |
    | 18 | fork-checks layer(层与可上游路径) | PASS | 层 L8(来自参数);origin/feature/control-api…HEAD 共 45 个文件均符合 |
    | 19 | fork-checks spec-copy(规范副本保护) | PASS | spec-sync/rc7b → feature/control-api 可以更新规范副本(24 个文件);.github/spec.lock 已按 sha256Method、git tree 与文件数复算,三项一致 |
    | 20 | fork-checks spdx(新文件 SPDX) | PASS | 203 个新增源码/脚本/workflow/文档文件都有 SPDX 头(逐字节副本 2 个豁免) |
    | 21 | fork-checks whitespace(上游文件新增行空白) | PASS | 12 个被修改的上游文件:新增行无行尾空白/混合缩进,换行符与 BOM 未变 |
    | 22 | fork-checks clang-format(clang-format 18.1.8) | PASS | 131 个文件与 clang-format 18.1.8 输出一致 |
    | 23 | fork-checks upstream-words(可上游路径禁用字样) | PASS | 148 个可上游路径文件无 Synchain/DLsnows/opentune-mcp 字样 |
    | 24 | fork-checks workflow-triggers(pull_request_target 零命中) | PASS | 13 个 workflow 的触发器均不含 pull_request_target |
    | 25 | fork-checks actions-pinned(action 固定 SHA) | PASS | 55 处 uses: 均固定到 40 位 SHA 并注明版本 |
    | 26 | fork-checks doc-consistency(文档一致性(方法、钩子、镜像、测试名)) | PASS | 方法:README 44 行 = 已注册 43(+ 监听端回答的 1)= 规范 44;钩子:12 个文件 32 处标记 = README 23 行 = CLAUDE.md 11 行;镜像:89 条、17 个组;测试名:381 处引用 / 98 个已注册 |
    | 27 | drift-pins(镜像锁清单三处一致) | PASS | 89 条镜像、17 个组,三处一致 |
    | 28 | gitleaks gitleaks-git(gitleaks 增量提交) | PASS | 71 个增量提交无发现 |
    | 29 | gitleaks gitleaks-dir(gitleaks 增量文件) | PASS | 工作树中 580 个增量文件无发现 |
    | 30 | check-ignored-delta(暂存区) delta(增量识别) | PASS | 71 个提交、580 个文件;上游基点 addb4f4(upstream/20261008-addb4f4) |
    | 31 | check-ignored-delta(暂存区) path-guard(路径守卫) | PASS | 未触碰 models/、.onnx、pc_nsf_hifigan/、ThirdParty/、D3D12 运行库;13 个 workflow 均未开启 LFS |
    | 32 | check-ignored-delta(暂存区) ignored-paths(忽略路径越界) | PASS | 100 个被上游忽略的文件均在允许清单内(.github/*、CLAUDE.md、docs/control-api.md) |

    上游安全自查

  • 接口关闭时,行为与上游一致:所有新代码都在控制接口的选项之内

  • 没有改上游已有文件

  • 没有格式化或重排任何上游文件

  • 未修改 PianoRollComponent / PianoRollToolHandler

  • 没有修上游 bug

  • 镜像:不涉及(直接调用窗口自己的关闭处理函数,不复制其步骤)

  • 内容修改只在消息线程进行;退出步骤在回复写出之后,投递到消息线程执行;网络线程不持 lease

  • 遵守上游代码约定

  • 可上游路径中没有禁用字样

  • 规范副本与 .github/spec.lock 只在本 spec-sync PR 中修改,lock 已按 sha256、git tree 与文件数复算

  • 没有提交模型或二进制

  • 未修改上游 .gitignore

  • token / serverProof 不出现在日志、结果、诊断或测试快照中
  • 规范与 MCP 侧影响

  • 不涉及

  • 规范变更:本 PR 同步的就是规范变更(app.quit、tempoRounded、第 21 节规则 4)

  • 需要 MCP 仓库同步改动:MCP 侧的 opentune_quit 已合入
  • C++ 运行器里,所有 app/(10 条)与 ui/(23 条)向量都通过,包括 ui/set-workspace-tempo-rounded 与修订后的 ui/set-workspace-piano-roll-opendyne。

    MCP 仓库此后又把第 21 节规则 2 的措辞补得更完整:导入聚焦时把片段载入钢琴卷帘,视图不变。这只是把已有行为写成文字。打 rc.7 tag 时,会随重新锁规范一起同步进来。

    上游行为发现

    1. 窗口关闭按钮遇到未保存修改不提示。 JUCE 的 StandaloneFilterWindow::closeButtonPressed 只保存插件状态,然后调用 JUCEApplicationBase::quit()。工程有未保存修改时,它也直接退出,不提示。接口的 app.quit 在这种情况下会拒绝,所以比窗口更严。性质偏功能建议。
    2. (核对)真窗口上,ui.setSelection 不带 openEditor 时,会把片段载入钢琴卷帘,视图不变。之后切换到 openDyne 编辑方案,会为它生成音符(带 SCHEME_GENERATED_NOTES 与 IRREVERSIBLE)。这与 PROTOCOL 第 21 节规则 4 一致。

    测试说明

  • 无界面(真 processor + TestUiBridge),新增 ControlQuitTests,包含:

  • - AppQuit、AppQuitWithoutWindow、AppQuitResult、AppQuitSequence、AppQuitStopping、AppQuitVectors;
    - 九个 app/quit-* 向量全部通过。endsSession 的向量会检查:连接关闭、端口拒绝连接、发现文件已删除、窗口恰好收到一次关闭请求。
  • 反证,三处改动都会让对应场景变红,已还原:

  • - 去掉「提前进入停止状态」:AppQuitStopping 变红;
    - 把退出步骤排在回复之前:AppQuitSequence 与 AppQuitStopping 变红;
    - 去掉作业检查与脏检查:AppQuit 变红。
  • 真机(本分支构建的 Standalone,临时 OPENTUNE_DATA_DIR 与私有用户目录,官方模型),72 项检查全部 PASS:
  • | 情形 | 结果 |
    |---|---|
    | 干净工程,3 次 | 进程 0.50–0.52 s 退出,退出码 0,发现文件已删除;projectPath 为 null,nullReasons 为 no_project_path |
    | 脏工程,不带 discardUnsaved | UNSAVED_CHANGES(project_dirty),executed: false;4 s 后进程仍在,仍应答 session.info |
    | 脏工程,带 discardUnsaved | 0.54 s 退出,退出码 0,warnings 含 IRREVERSIBLE(project) |
    | 导入并分析完一个片段后丢弃并退出 | 0.56 s 退出,退出码 0 |
    | 首次引导未关 | BUSY(modal_open),进程仍在;ui.dismiss 之后 app.quit 0.58 s 退出 |
    | ui/set-workspace-piano-roll-opendyne 的步骤在真窗口上回放 | 10 项 PASS:选择后片段载入钢琴卷帘、视图不变;切到 openDyne 生成 9 个音符;ui.setWorkspace 只改视图 |

    运行前后,真实用户目录 %APPDATA%\OpenTune 的文件与哈希都没有变化。窗口关闭时写出的设置文件落在私有用户目录里,这说明退出走的是窗口关闭按钮的真实路径。

    DCO 与署名

    两个提交都由 DLsnows <noreply@synchain.ca> 签署(Signed-off-by),没有 AI 署名。

    ___

    PR Type


    Enhancement, Tests, Documentation

    ___

    Description


  • Add app.quit control method, replying before exiting
  • Quit via the window close button, after the reply
  • Stop the control service before the window closes
  • Sync OTCP spec copy to rc.7, with tempoRounded
  • Test bridge models piano roll loads and quit requests
  • ___

    Diagram Walkthrough

    flowchart LR
      req["app.quit request"] -- "checks: shutting down, busy, unsaved" --> disp["ControlDispatcher"]
      disp -- "result written first" --> reply["Reply to connection"]
      reply -- "then exit step on message thread" --> stop["ControlService stop"]
      stop -- "requestQuit" --> win["Window close handler"]
    

    <details> <summary><h3> File Walkthrough</h3></summary>

    <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>7 files</summary><table>
    <tr>
    <td><strong>AppQuitOps.cpp</strong><dd><code>Implements app.quit checks, result, and exit step</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-2c0087c3be7d6c9aca63f4eec1abb7112c195f9934f5642dc828c7f1a1ecadc2">+179/-0</a>&nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlDispatcher.cpp</strong><dd><code>Runs exit step after result is written</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-0de8380a483321a95bcfd57c53802532e4bc4c78fff619a94aacf72c0fd85d52">+55/-0</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>OpsRegistry.cpp</strong><dd><code>Registers app.quit and end-instance hook</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-e2d7e990375ef9369bc35c012f40bc5f7d746529d0786b18c1c38ba360ff6d09">+8/-0</a>&nbsp; &nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>OpsRegistry.h</strong><dd><code>Adds endInstanceAfterReply to operation context</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-11cdbdf2f715d3ea3a03b427c2bedbf32db68aab656fa60675501fdc543baefe">+15/-0</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlJobs.cpp</strong><dd><code>Lists kinds of unfinished jobs for BUSY check</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-6ff14890a769ed1f5b24180d966021304f678ca7570d7d31e0d7d6cbf922e71f">+11/-0</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlUiBridge.h</strong><dd><code>Adds canQuit and requestQuit bridge interface</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-665138ddb0ca3abef4df83f315df685adbf2871a654dc39a34e5c3916db2aa50">+13/-0</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlEditorBridge.cpp</strong><dd><code>Closes Standalone window through its close handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-6d9332a5ca656aca646cd3adcefef70025470232ee13cd5c24d3af3464f8aaba">+31/-0</a>&nbsp; &nbsp; </td>

    </tr>
    </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>5 files</summary><table>
    <tr>
    <td><strong>AppQuitOps.h</strong><dd><code>Documents app.quit registration and its check order</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-eff3fcdfc162ed835ca59ceab85ef902f616d84ca3dc82acba86bd4de0591e48">+42/-0</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlDispatcher.h</strong><dd><code>Declares after-reply steps and test observer seam</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-435ca177c66a035a56eb3b2c57ab693b883528f5c7e6800c851c9a3965f58fd9">+27/-1</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlJobs.h</strong><dd><code>Declares activeKinds accessor for unfinished jobs</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-f24eaf895f10e5fdf2cc8f47b1d9010b6bdde3fc00ab95973967b74451a77a83">+3/-0</a>&nbsp; &nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlEditorBridge.h</strong><dd><code>Declares quit methods on the editor bridge</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-1d556148275eada21578c50a9133ed51797695d9924bb238ad58e264aebc3898">+4/-1</a>&nbsp; &nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>README.md</strong><dd><code>Documents app.quit flow, checks, and measurements</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-4b9875c04a91e8f44c49e112693531adb0b13a46c60d24c631cd2354f85fe829">+121/-14</a></td>

    </tr>
    </table></details></td></tr><tr><td><strong>Configuration changes</strong></td><td><details><summary>2 files</summary><table>
    <tr>
    <td><strong>ControlProtocol.cpp</strong><dd><code>Maps app.quit method to its capability</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-eab48f442dc43573a9933bfc5120b0dea4087aecf7f083cfee340656833c1767">+1/-0</a>&nbsp; &nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>OpenTuneControl.cmake</strong><dd><code>Adds app.quit sources, tests, and timeouts</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-d21efdcd53912b4d4be0788b040f7b4aa24c484f7b4b7d877612f400ca14acc4">+19/-0</a>&nbsp; &nbsp; </td>

    </tr>
    </table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>6 files</summary><table>
    <tr>
    <td><strong>ControlQuitTests.cpp</strong><dd><code>Adds app.quit scenarios and vector runner</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-c98662fc135ce5592ea63eef1e8eec0180f51e25a6054a6498969bfbb1a23517">+900/-0</a>&nbsp; </td>

    </tr>

    <tr>
    <td><strong>TestUiBridge.h</strong><dd><code>Test bridge records quit and models piano roll</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-f77415365bd5a9df99a811f7139ab590f680f4f488ee340c7612fff05e57b8ea">+26/-0</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlSelectionTests.cpp</strong><dd><code>Generates piano roll notes on scheme change</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-febc291706f2bbe9b122b97f3d56a327d8c9747ac319e515ab3f556e8209cc21">+40/-3</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlDispatcherTests.cpp</strong><dd><code>Updates capability lists and skips app.quit vectors</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-e267f4b4811f90d21b36713bf526a926d437cbfacdd1da7d614fe6c899185eec">+12/-6</a>&nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlProcessorTests.cpp</strong><dd><code>Registers app.quit scenarios in processor test runner</code>&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-bb23ce4a7d20d5f85e1b0044a21a60bc2d50943ee41d183273cc40e558a8fe1a">+7/-1</a>&nbsp; &nbsp; &nbsp; </td>

    </tr>

    <tr>
    <td><strong>ControlProcessorSupport.h</strong><dd><code>Declares app.quit scenario functions for tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-928850f315e065c378c24ceff0de985abde12b8199ef476eed8e4d2cda1f1587">+20/-0</a>&nbsp; &nbsp; </td>

    </tr>
    </table></details></td></tr><tr><td><strong>Additional files</strong></td><td><details><summary>1 files</summary><table>
    <tr>
    <td><strong>REVIEW-CHECKLIST.md</strong></td>
    <td><a href="https://github.com/synchain-oss/OpenTune/pull/71/files#diff-75b0bca2c0c31fd9cb1842557213b02be0fc2a96f7b5e6d9b81cf65c3b5283c0">+5/-4</a>&nbsp; &nbsp; &nbsp; </td>

    </tr>
    </table></details></td></tr></tr></tbody></table>

    </details>

    ___

    <hr>
    <details> <summary><strong>⚙️ Agent run details</strong></summary>

  • Model: anthropic/claude-haiku-5-5

  • Tokens: 59,273 in / 3,153 out / 62,426 total

  • Time cost: 12.9s

  • AI calls: 1
  • </details>

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: github-actions[bot] Review duration: 4m
    All Vouch review confidence checks passed
    Residual risk 0.42 = Change Risk (0.52) × (1 − Review Confidence (0.19)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 26% · Reviewer familiarity: 35%
    19%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #71"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 19.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 19.5% · Lower = rushed or shallow review
    19.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 41.9% · Moderate risk
    41.9%