docs: hand off private Windows runtime integration

This commit is contained in:
Codex committed 2026-10-21 16:32:11 +09:00
1 parent bef87520c2
commit 0f3986fc80
6 files changed
+110

No files matched your search

@@ -0,0 +1,44 @@
# Windows 内置运行时:交付 01
日期:2026-10-21。源码提交:`bef87520c263890f0ddd64a12d9c6a5104844daf`。
基线:`759df7060d854f758b9d2029fd5722a537460125`。
## 用户范围
集成 Windows 版 Node.js、Python、Git,并提供启用设置。用户参考图仅红框“内置运行时”卡片有效;实际入口为设置 → 安全中心,不复制删除保护、审计或其他内容。
## 已实现
- Windows x64:Node 24.22.0 + npm/npx 11.19.1;CPython 3.14.8 + pip 26.2.1/venv;PortableGit 2.56.0.windows.2 + Bash。
- 已实际下载官方压缩包,归档哈希和完整提取树校验通过。约 113 MB 压缩包、572 MiB 解包资源;不是预留空目录。大二进制不提交 Git,安装包构建自动下载、校验并收录;离线可预置已校验缓存。
- 安全中心总开关和三个单项开关;只展示真实文件可用状态。独立偏好文件原子保存、串行更新,损坏/不可读不会静默变为全部启用;保存错误有重读入口。
- 仅作用于新建终端、Claude 内核和 MCP stdio 子进程。Windows PATH 大小写归一、保留既有凭据过滤和 MCP 最小继承环境;不改系统/用户 PATH、注册表、权限模式或发送/排队/回合逻辑。
- npm prefix/cache、Python userbase/pip cache 位于 YCode userData;保留项目 venv 使用方式,详见工具链文档中的 pip 安装注意事项。
- 打包 beforePack 校验缺失/损坏/非 x64/内容树漂移并失败退出;PortableGit 做确定性的必要后处理,不执行 Windows 自解压程序或首次启动安装脚本。
## 验证
- 后端 15 组回归通过,包含总/单项开关、缺失资源、非 Windows、PATH 大小写与 SDK 合并、设置重启持久化、并发更新及失败/损坏配置。
- UI 18 项 DOM 检查通过,包含开关保存、禁用保留选择、读写失败、重试、卸载期间提交和非 Windows。
- 打包 4 项回归通过;实际 Node 1992、Python 1377、Git 9614 文件完整哈希通过。重复 prepare + verify 成功。
- `npm test`、严格 `test:alignment:dom`、生产构建通过;新 CSS 无 token 违规,既有六项 token 失败未改 baseline。
- 独立审查已修复 PATH 冲突、异步启动竞态、共享配置覆写和 Git 后处理问题。
- 证据:[目录](evidence/windows-runtimes-01)。
## 明确未验证
Linux 环境不能运行 Windows 二进制:`runtimes:smoke` 输出 SKIP,不登记为成功。未生成或启动 Windows 安装包、未做原生 GUI/截图像素验收、未验证 Git HTTPS/实际包联网下载/升级迁移。一次 Claude 集成测试因可能联系外部服务被执行权限审查阻止,未重试,未计入通过;未使用用户电脑或外部模型服务验证。
## Windows 验收步骤
```powershell
npm ci --legacy-peer-deps
npm run runtimes:prepare
npm run runtimes:verify
npm run runtimes:smoke
npm run dist:installer
```
在隔离 Windows x64 环境启动打包应用,安全中心逐一切换并重开终端/新会话;核对 `Get-Command node, npm, python, pip, git, bash` 的路径和各版本。开关关闭不禁止系统已有工具。验证含空格/中文路径、无系统 Node/Python/Git 的机器、MCP 新连接,以及原有会话不被中断。不得将这些待验步骤描述成已运行。
详细设计、构建和许可记录:[Windows 内置工具链](../Windows内置工具链.md)。随包保留上游许可证和出处;公开发布二进制之前须核实适用的对应源码/分发义务,本轮未发布安装器。
@@ -0,0 +1,16 @@
PASS defaults and complete bundle activate all tools
PASS private tools precede original system paths, including spaces
PASS disabled global preference preserves original environment exactly
PASS per-tool disabled does not inject its paths
PASS missing and incomplete bundle never reports active
PASS Linux and macOS preserve original environment
PASS case-insensitive PATH becomes one canonical key and survives MCP SDK merge
PASS overlay introduces no credentials or unrelated variables
PASS writable private caches and prefixes are scoped to active tools
PASS overlay idempotence
PASS IPC patch validation rejects malformed and unknown values
PASS serialized updates merge toggles and preserve unrelated config
PASS settings survive module restart without exposing config credentials
PASS failed atomic save leaves the committed enable policy unchanged
PASS corrupt, incomplete, and unreadable stored policy never silently enables tools
Private runtimes: 15 regression groups passed; no Windows executables run.
@@ -0,0 +1,8 @@
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 runtimes:verify
> node scripts/verify-runtime-bundle.mjs
node 24.22.0: verified 1992 files (5cb4f80767f68d2c32d28fa4dbc51a3c00681e72e60288a783692df99458e53f)
python 3.14.8: verified 1377 files (70d377bec4650e9a72cfc1395733c5d3a1010ecf597fb72e3a8460ef6ca14162)
git 2.56.0.windows.2: verified 9614 files (8c7762472d6c1bb90c8a9b623fc2baf3a112efb108fbd2dacf32120b67a05349)
@@ -0,0 +1,6 @@
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm.
> ycode@0.0.7 runtimes:smoke
> node scripts/smoke-runtime-bundle.mjs
SKIP: native toolchain smoke requires Windows x64; no Windows binaries executed.
@@ -0,0 +1,12 @@
✔ source lock uses reviewed official HTTPS endpoints and fixed digests (1.103571ms)
✔ inventory is deterministic and notices content changes (7.198965ms)
✔ Python convenience launcher is relocatable and uses module pip (3.97465ms)
✔ packaging rejects wrong platform and wrong arch (0.999448ms)
ℹ tests 4
ℹ suites 0
ℹ pass 4
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 101.164492
@@ -0,0 +1,24 @@
{
"result": "PASS",
"checks": [
"exactly four accessible switches",
"ready status derives from backend",
"duplicate clicks produce one patch",
"saving retains acknowledged value and disables all controls",
"tool patch is narrow",
"master off preserves individual choices",
"master on restores choices",
"failed save does not change persisted checkmark",
"retry succeeds and clears error",
"reopen reloads saved choices",
"missing bundle is disabled with honest status",
"non-Windows disables controls and explains support",
"read failure offers recovery without enabling controls",
"read retry recovers actual state",
"save acknowledged after navigation is read on reopen",
"no unrelated security controls",
"future process and system fallback warning present",
"no uncaught renderer errors"
],
"limits": "Controlled DOM/API fixture, not Windows execution or screenshot pixel parity."
}