按需安装引擎并统一模板与文件卡片适配 - #396
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b14fd662a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const candidates = app.isPackaged | ||
| ? [path.join(process.resourcesPath, "server", "dist", "constants.json")] | ||
| : [path.resolve(__dirname, "../../..", "constants.json")]; |
There was a problem hiding this comment.
Resolve engine versions from inside the packaged ASAR
In every packaged desktop build, constants.json is staged under server/dist and included by the builder's files: server/**/*, so it lives inside app.asar, not at process.resourcesPath/server/dist/constants.json (only bundled templates are copied there as an extra resource). This lookup therefore fails and all engine versions become unknown; installation then requests assets such as ipollowork-engine-codex-harness-...-unknown.tar.gz, while the release workflow publishes versioned filenames, causing optional engine downloads to return 404. Add the packaged __dirname/../server/dist/constants.json location or copy the constants file into extraResources.
Useful? React with 👍 / 👎.
结果
验证
pnpm --filter @ipollowork/app typecheckpnpm --filter ipollowork-server typecheckgit diff --checkapp-smoke通过已知的基线测试差异
服务端全量测试为 533 passed / 3 skipped / 3 failed。失败项是两个已下架竖屏视频模板的目录断言,以及一个已经返回
sessionId但测试仍按旧响应断言的用例;均不在本次改动路径。