Repository navigation
feat(desktop): add macOS native preview support - #2056
Conversation
|
已按评审处理:诊断进程组的管道收集与 reader 关闭现受 deadline/cancellation 约束,错误路径立即返回,并补充进程组逃逸回归测试;README/VALIDATION 的资格记录指引已改为 sqlite-atomic-683e2db0-v1(与 bundled contract 匹配),中文 README 已与英文同步(macOS 构建、Keychain、诊断注册路径与未签名边界)。 |
|
CI 失败根因:master |
|
Please resolve the merge conflicts with |
hireview001
left a comment
There was a problem hiding this comment.
- Resolve merge conflicts with the target branch.
1edfa21 to
63b451a
Compare
|
@AlexStocks PTAL |
Resolve the Kimi installation assertion conflict by preserving master's exact installed-path and placeholder checks alongside the macOS preview changes. Qualify the d9a7856 Server contract with a newly built wheel and the product Rust protocol modules. Preserve historical qualification identities and update the current selection and protocol evidence in the Desktop docs. Validation: 108 harness tests, 43 Rust protocol tests, 32 UI tests, 56 API contract tests, five fixture qualification tests, four real SQLite Server modes, generated Desktop and Dify contracts, TypeScript, Vite build, Rustfmt, lint, and remaining type checks passed. make check reports the unchanged upstream task import in the cross-host acceptance fixture. Native macOS and Windows packaging and installed UI acceptance require platform CI.
AlexStocks
left a comment
There was a problem hiding this comment.
Approving as AlexStocks at the author's explicit request, on reviewed head 17754f89.
- Scope reviewed: 29 changed files / +1315 −84 (declared 29, fetched 29), full read of the diff; desktop-only surface — macOS native preview path, Windows lifecycle harness, docs and build config.
- Blocking findings: none. No P0/P1 identified in this head.
Non-blocking P2 items already posted inline; they are suggestions and do not block merge:
desktop/README.md:126/desktop/README.zh.md/desktop/VALIDATION.md— the new macOS prerequisite list omits a JDK.desktop/package.jsonchainsgenerate:checkinto bothlintandbuild, anddesktop/scripts/generate.mjsinvokes the Java OpenAPI generator unconditionally at top level, so a clean macOS host following the documented steps fails at the first command. CI is green only becausemacos-15images ship Temurin preinstalled, which is not reproducible evidence.desktop/VALIDATION.md:138— the acceptance narrative citessqlite-atomic-caf2a35a-v1, while the same file (line 25) declares the current record to besqlite-atomic-d9a78567-v1, and caf2a35'scontractSha256(e43c7034…) does not match the bundledoperations.json(a6758fd3…). Under thecompatiblepredicate insession.rsthe described save/search/exact-read run cannot occur against that record; the statement should be re-pointed at the record actually exercised, and the macOS UI gap that this exposes noted.desktop/src-tauri/src/diagnostic_process_macos.rs:177—SIGKILLis sent to-pgidviadrop(group)aftertry_wait()has already reaped the child, closing the normal-completion path into a PID-reuse window.waitid(WNOWAIT)+ kill +wait()removes it.desktop/src-tauri/Cargo.toml:55—libc = "0.2"is the only dependency in the file not exactly pinned (lock resolves0.2.189), which is inconsistent with the README'sCargo.lockpinning statement.
Verification basis: trusted CI on this head reused (52 checks green), including Desktop validation / macos (macos-15) job 119738990580, whose log contains Running tests/macos_diagnostics.rs with 4 passed plus 9 lib unit tests — confirming the #![cfg(target_os = "macos")] file is exercised rather than skipped. No local build of the fork source was performed.
AI usage statement: this review was AI-assisted (model-driven diff reading plus CI log inspection) and is submitted from my account, for which I take responsibility. Consistent with the repository's AI policy, merge responsibility stays with a human maintainer.
Which issue or RFC does this PR close?
Refs #1654; follows RFC #1455. This internal preview does not close the platform or release qualification issues.
Rationale for this change
The Windows-oriented Desktop preview lacked macOS persistent credentials, packaged-page navigation, native diagnostic execution and app/DMG packaging. Ordinary builds also needed an explicitly qualified Server profile matching the bundled API contract.
What changes are included in this PR?
sqlite-atomic-d9a78567-v1, identifying Server commitd9a785675dedb72cd72a386b346e590f4c067ac0and OpenAPI digesta6758fd35296abefb55ab86b152584a369d5f2deedfee7a3f9822e16ad1edc25.Are there any user-facing changes?
macOS users can build the unsigned native preview, use Keychain or explicit session-only credentials, run constrained local diagnostics, and explicitly select a compatible Server and exact Scope for memory operations. Desktop does not install or manage a Server or LaunchAgent.
The current Server record has protocol-level qualification on Linux x86_64. Native macOS UI acceptance against that record remains unverified. Historical UI acceptance for
sqlite-atomic-caf2a35a-v1is separately identified indesktop/VALIDATION.md; it is not evidence for the current bundled contract. Signing, notarization, clean-machine installation, actual IME composition and accessibility remain release gates.How was this change tested?
try_wait()behavior (ECHILD: the child had already been reaped). It passes withwaitid(WNOWAIT), proving the exited child remains waitable until process-group cleanup. Existing tests cover nonzero exit, cancellation, timeouts, descendants and escaped pipe writers.cargo +1.95.0 test --locked --manifest-path desktop/src-tauri/Cargo.tomlpassed 61 tests. Cargo fmt and Clippy (--all-targets -- -D warnings) passed.UV_NO_SYNC=1 make checkandgit diff --checkpassed. The exact libc constraint requires no Cargo.lock change and locked Rust builds pass.d9a78567byte for byte. This ran on Linux x86_64 with Python 3.12.13 and Rust 1.95.0, excluding the Tauri GUI shell; it was not repeated during this fix.984e8c60fed262f60e1054c17c8b7d84489af999, whose bundled contract matchedsqlite-atomic-caf2a35a-v1. It covered save/search/exact reads, clipboard paste-back, app restart and independent Server survival. The observed app executable digest is recorded indesktop/VALIDATION.md; that record does not identify its exact build source revision. This fix did not repeat that UI acceptance or native Windows/Intel execution. Refer to checks on the current head for remote CI results.AI usage statement
OpenAI Codex assisted implementation, tests, documentation, native-app operation and PR preparation. The author confirmed the historical manual acceptance; current-contract macOS UI acceptance remains open.