Skip to content

fix(build): 修复 CI 内测安装包云服务配置缺失并统一更新源 - #7

Merged
Aparencia merged 2 commits into
mainfrom
dev
Jul 31, 2026
Merged

Aparencia merged 2 commits into
mainfrom
dev

Conversation

@Aparencia

Copy link
Copy Markdown
Owner

背景

内测用户反馈注册页报「云服务尚未配置,请先在 .env 中设置 VITE_SUPABASE_URL 和 VITE_SUPABASE_ANON_KEY」。

根因

client/.env.production 被根 .gitignore 忽略从未入库,CI 打包时渲染进程 VITE_SUPABASE_*/VITE_API_BASE_URL/VITE_AI_GATEWAY_URL 全部为空且构建静默通过——CI 产物的 Supabase 认证、云同步、云端 AI 网关整体失效(本地打的包因开发机存在该文件而正常,掩盖了问题)。

变更

  • fix(build): .env.production 入库(均为公开值:sb_publishable_ 前端公开密钥 + 公网 URL)+ vite 构建期防护(关键 VITE_ 变量缺失时构建直接失败)+ 知识卡片沉淀
  • build(release): CDN 更新源固化进 electron-builder.yml,删除 release.yml 的 sed 行锚定改写(本地包与 CI 包产物完全一致)

验证

  • 正向构建通过,渲染产物含真实 Supabase 域名
  • 负向测试(移走 env 文件)构建 exit 1 并输出缺失变量清单
  • lint 0 errors;单测 42 文件 / 428 用例全过;两个 YAML 语法校验通过

发布影响

合入后 semantic-release 将切 patch 版本,CI 重新打包出修复后的内测安装包。

详见知识卡片:docs/knowledge/bugs/2026-07-ci-env-production-gitignore-supabase-placeholder.md

根因:client/.env.production 被根 .gitignore 忽略从未入库,CI 打包时渲染进程
VITE_SUPABASE_*/VITE_API_BASE_URL/VITE_AI_GATEWAY_URL 全部为空且构建静默通过,
内测安装包注册/登录报「云服务尚未配置」,云同步与云端 AI 网关整体失效。

- .gitignore 增加 !client/.env.production 例外(文件内均为公开值:
  sb_publishable_ 前端公开密钥 + 公网 URL,本就随安装包分发)
- vite.config.ts electronBuildConfigPlugin 增加构建期防护:
  关键 VITE_ 变量缺失/占位符时构建直接失败,杜绝静默残废包
- 沉淀知识卡片 docs/knowledge/bugs/2026-07-ci-env-production-gitignore-*
generic 更新源直接写为 https://dl.entropydecrease.com/downloads(公开下载域名,
非密钥),本地打包与 CI 打包产物的 app-update.yml 完全一致。

release.yml 删除 DOWNLOAD_BASE_URL 注入与 sed 行锚定改写步骤:该模式在
electron-builder.yml 对应行变动后会静默失效。secret 仍被 release job 的
CDN 预热步骤使用,保留不动。
@Aparencia
Aparencia merged commit ee27194 into main Jul 31, 2026
5 checks passed
@Aparencia

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 0.28.12 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Aparencia added a commit that referenced this pull request Aug 4, 2026
- #5: Gemini generate_stream iteration moved into thread pool via
  asyncio.to_thread, unblocking the event loop during streaming
- #6: providers return real input/output token split; fallback cost
  tracking prefers it and falls back to 60/40 estimate instead of
  the misleading 50/50 split (output priced 2-3x higher)
- #7: balance queries use Key pool primary key (plural env vars),
  DeepSeek balance no longer silently skipped
- #8: JWKS fetch distinguishes network failures (stale cache reuse
  with 60s retry backoff) from HTTP/key errors (fail-closed),
  preventing whole-site 401 on transient Supabase hiccups
- #9: import_concept registered in TIMEOUT_CONFIG/RATE_LIMITS plus
  startup validation warning for unregistered features
- #10: error_pattern cache key includes user_id and hashes full
  content, preventing cross-user result reuse
Aparencia added a commit that referenced this pull request Sep 13, 2026
批 8 T16(欠账 #7 掉地项 + jsdom 措辞的代码面)。

- app/src/test/motionHarness.ts(147 → 147,净增 0):边界段 :50-53 就地改写 —— 理由句
  收窄为「jsdom 做级联(类规则 / ID / 子选择器 / 继承 / !important 实测全生效);不可得的是
  var() 不解析 · 简写→长写不展开 · 几何全 0 · 伪元素不命中」。
- app/src/ui/primitives/surfaceResidual.ts(229 → 230):① SHADOW_RESIDUAL 的
  AiConversationDock 条目 reason 就地更正(原写「登记给批 5」而批 5 已收口 = 掉地项 ⇒
  批 8 已认领、本批不迁、具名归属 = 控制方);② 增一行登记:非棘轮圆角档不在任何守卫内。
  file / kind / count 一字未改(导出数据深比对:tmp/t16/p10-behaviour.json 15/15)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant