Skip to content

跨平台样片渲染器、原生 Windows 安装脚本与有声片 E2E 闭环 - #274

Draft
ZLHad wants to merge 1 commit into
mainfrom
codex/ovh-phase1-3b
Draft

ZLHad wants to merge 1 commit into
mainfrom
codex/ovh-phase1-3b

Conversation

@ZLHad

@ZLHad ZLHad commented Dec 3, 2026

Copy link
Copy Markdown
Owner

做了什么

  • 纯标准库跨平台样片渲染器 tools/swatch_render.py:
    • 完整等价承接 styles/_swatch/render.sh 全部参数与流程(HyperFrames 与 Blender 双引擎、纯 Python staging 替代 rsync/cp -R/find/wc、procutil 进程组超时与卡死看门狗、platform_env.resolve_exe 可执行文件解析、精确 POSIX cksum 算法保持 Blender --stamp 与 determinism.sh 兼容、macOS sandbox-exec 沙箱保留、x264 -threads 1、AAC 真峰值 ≤ -1.5 dBTP 重混循环与音频 QA 门禁);
    • styles/_swatch/render.sh 收敛为 3 行 POSIX 兼容转发薄壳(通过 shellcheck -S warning);
    • 修复 styles/_swatch/boot.js 在脱离 HyperFrames 运行时单独加载 staged HTML 时正确回退读取 data-composition-variables 默认值。
  • 去 Bash 化与共享浏览器探测:
    • 新增 tools/hf_browser.py 抽取 HyperFrames 浏览器查找逻辑,供 tools/cli.py 与 tools/styles.py 复用且零循环依赖(完整保留 tools/ci-paths.txt 原有 18 条窄依赖规则);
    • tools/cli.py、tools/styles.py、tools/components.py、tools/recipes.py 全部改调 tools/swatch_render.py / tools/readcheck.py / tools/textcheck/textcheck.mjs 并经 platform_env.resolve_exe 解析 node/uv/ffmpeg/ffprobe;
    • tools/audio/mux.py 统一经 platform_env.resolve_exe 解析 ffmpeg/ffprobe,并将 <out>.mux.json 相对路径归一化为正斜杠 /。
  • 原生 Windows 安装脚本 install.ps1:
    • 兼容 Windows PowerShell 5.1 与 PowerShell 7+(纯 ASCII 无 BOM、显式启用 TLS 1.2、不改全局 PATH、不提权、零 Invoke-Expression);
    • 支持 -Dir、-Refs、-NoSkill、-Skill、-Mirror、-Obscura、-Studio、-DryRun、-Help;依赖探测跳过 WindowsApps 占位并容忍失效 OVH_PYTHON;安全浅更新保护 LOCAL.md/projects/ 与未提交编辑;通过 bin\ovh.cmd settings --json 注入镜像环境。
  • 端到端验收与文档:
    • tools/ci/py/static_checks/cli_portable.py 新增样片 staging 回归、mux.json 正斜杠回归、Windows PowerShell 5.1 & 7 的 install.ps1 AST 语法校验 + -Help + -DryRun 冒烟,并在 --with-e2e 中新增纯 stdlib 合成 48 kHz 立体声 WAV → ovh mux → ovh check --json(verdict == "pass")有声片闭环;
    • .github/workflows/ci.yml 的 windows-latest 路径门控补齐 install.ps1;
    • 同步更新 README.md、README.zh-CN.md 与 changes/ovh-swatch-and-win-install.md。

怎么验证的

  • 本地 Core 全量 CI:tools/ci.sh --committed 43/43 组全部通过(19 分 24 秒);
  • cli_portable.py --with-e2e 在 POSIX pipe 与 OVH_CDP_TRANSPORT=ws 双通道下均通过(含 48 kHz 立体声有声片 mux -> check);
  • shellcheck、pyflakes、Python 3.9 语法编译、keyreads、module_paths、portable_primitives、browser_portable、ci_select --check、doc_checks、style_checks、components_checks 均通过;
  • 等待 GitHub Actions(Ubuntu / macOS / 原生 windows-latest 含 PowerShell 5.1 & 7)全绿后准备合并。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant