Skip to content

fix(plugin): 修复 GitHub 插件官方信任回填判据 - #3238

Merged
MagicLizi merged 3 commits into
makecindy:mainfrom
nothingyuancando:fix/3041-github-trust-backfill-authority
Aug 26, 2026
Merged

fix(plugin): 修复 GitHub 插件官方信任回填判据#3238
MagicLizi merged 3 commits into
makecindy:mainfrom
nothingyuancando:fix/3041-github-trust-backfill-authority

Conversation

@nothingyuancando

Copy link
Copy Markdown
Contributor

这次改了什么

摘要

修复 Cindy GitHub 插件官方信任回填使用安装目录 .cindy-trust.json 作为完成判据的问题。现在以 Host 投影的 installed.trust 作为权威事实:当目录镜像看似完整、但权威信任仍未完成时,仍会按既有校验和安装锁流程触发安全回填。

变更类型

  • fix 缺陷修复
  • feat 新功能
  • refactor / perf 重构或性能优化
  • docs / test / chore 文档、测试或工程维护

范围

UI 变化

  • 引用的设计规范:不涉及:仅修改插件市场主进程判据和测试,无视觉、交互或文案变化。

怎么验证的

自动验证

pnpm --filter desktop exec vitest run src/main/plugin-market/__tests__/service.test.ts
结果:110 tests passed

git diff --check
结果:通过

手工验证

不涉及;该修复覆盖插件市场后台回填逻辑。

未执行的验证

未执行 packaged macOS 升级现场验证;CI 将覆盖跨平台构建与相关单测。

风险

风险分类

  • 权限 / 安全 / 用户数据
  • 无已知风险
  • SQLite / migration
  • 协议兼容
  • 跨平台差异

影响与回滚

  • 影响范围:仅官方市场 cindy-github 的存量 trust 回填资格判断;既有下载 SHA、manifest digest、approval、来源和安装锁校验保持不变。
  • 回滚 / 降级方式:回滚本提交即可恢复原判据;不会修改用户凭证或数据库结构。

提交前检查

  • 已 review 完整 diff
  • 每个 commit 都带 DCO 签名(git commit -s
  • UI 改动已在「UI 变化」注明引用的设计规范章节(不涉及 UI 则跳过)
  • 未提交凭证、令牌或授权文件
  • 已确认测试结果或说明未执行原因

Signed-off-by: nothingyuancando <1579035512@qq.com>
@nothingyuancando
nothingyuancando requested a review from a team as a code owner August 22, 2026 08:53
@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown

Greptile Summary

修复 GitHub 官方插件信任回填的完成判据,改由 Host 投影的 installed.trust 判断权威信任状态。

  • 使用 isCindyOfficialTrustInfo(installed.trust) 替代安装目录元数据检查
  • 更新已有官方 receipt 的测试夹具以包含完整信任投影

Confidence Score: 5/5

当前未发现仍需阻止合并的故障,PR 看起来可以安全合并。

未发现阻塞性故障仍然存在。

Important Files Changed

Filename Overview
apps/desktop/src/main/plugin-market/service.ts 将官方信任回填资格切换到 Host 权威信任投影,现有来源、审批、摘要匹配及安装锁门禁保持不变。
apps/desktop/src/main/plugin-market/tests/service.test.ts 为已有官方 receipt 场景补充完整的官方信任投影夹具,使测试符合新的完成判据。

Reviews (2): Last reviewed commit: "修复插件市场测试夹具信任类型" | Re-trigger Greptile

Signed-off-by: nothingyuancando <1579035512@qq.com>
@MagicLizi MagicLizi added the touches:plugin-base 改动碰到插件基座(review-pr 自动维护,仅展示) label Aug 22, 2026
@MagicLizi

Copy link
Copy Markdown
Contributor

这条 PR 改到了插件市场的官方信任回填判据(看运行时 trust 信息,而不再看安装目录元数据),属于插件基座,需要维护者确认后再合。

讨论 issue:#3243

维护者请直接在本 PR 上 Approve;若要修改请 Request Changes。作者这边先不用再推,除非维护者点名要改。

@MagicLizi

Copy link
Copy Markdown
Contributor

@nothingyuancando 👋 这个 PR 目前与 main 有合并冲突,auto-review 因此暂时跳过、没法继续审查 / 合并。

请在本地 merge 最新的 origin/main 解决冲突后推送;冲突解除后,下一轮 auto-review 会自动重新处理这个 PR。

Signed-off-by: nothingyuancando <1579035512@qq.com>
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

No reviewable files after applying ignore patterns.

@MagicLizi MagicLizi added status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) and removed awaiting-discussion 等待维护者讨论(review-pr) touches:plugin-base 改动碰到插件基座(review-pr 自动维护,仅展示) status:awaiting-bot-review 等外部审查机器人表态(review-pr 自动维护,仅展示) labels Aug 25, 2026

@MagicLizi MagicLizi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对照当前 head 54d8be5fdd66186e461838ebb460a750341e043fmain,本 PR 的 diff 为空(0 files / 0 lines),但描述仍声称修复了 GitHub 插件官方信任回填判据。

  • [P1] (无改动文件)— 当前 head 相对 base 没有任何代码变化。合并只会留下空 squash,无法实现描述中的修复。请确认修复是否已在 main(若已进入主干请关闭本 PR);若尚未进入,请重新把改动提交到本分支后再请求审查。

@MagicLizi MagicLizi added the status:awaiting-author 等作者修改(review-pr 自动维护,仅展示) label Aug 25, 2026
@MagicLizi
MagicLizi dismissed their stale review August 25, 2026 19:38

这些问题已在当前 head 的后续 commit 中修复(格式门/安全门已通过),自动 dismiss 旧的 CHANGES_REQUESTED 以解除合并阻塞。

@MagicLizi MagicLizi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:请关闭本 PR,不要合并。

  • apps/desktop/src/main/plugin-market/service.ts:455 — 相对当前 main,本 PR 的 unique diff 为空(files=0 / additions=0)。描述里的官方信任回填已由 #3094 合入主干。合并本 PR 是空操作。
  • 不要在当前 main 上重放旧 commit 0c4156b2:那会丢掉 #3094|| !hasCindyOfficialTrustMetadata(installed.dir) 半边,导致缺 .cindy-trust.json 镜像时不再自愈。

请 close as superseded。

@MagicLizi MagicLizi added status:awaiting-author 等作者修改(review-pr 自动维护,仅展示) and removed status:awaiting-author 等作者修改(review-pr 自动维护,仅展示) labels Aug 25, 2026
@MagicLizi
MagicLizi dismissed their stale review August 25, 2026 22:33

这些问题已在当前 head 的后续 commit 中修复(格式门/安全门已通过),自动 dismiss 旧的 CHANGES_REQUESTED 以解除合并阻塞。

@MagicLizi MagicLizi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对照当前 head 54d8be5fdd66186e461838ebb460a750341e043fmain,本 PR unique diff 仍为空(0 files / 0 lines)。

  • [P1] (无改动文件)— 描述声称的 GitHub 官方信任回填已由 #3094 进入主干。合并本 PR 是空 squash。不要重放旧 commit 0c4156b2,那会丢掉 #3094|| !hasCindyOfficialTrustMetadata(installed.dir) 半边。请 close as superseded。

@MagicLizi MagicLizi removed the status:awaiting-author 等作者修改(review-pr 自动维护,仅展示) label Aug 26, 2026

@MagicLizi MagicLizi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论

当前 head 54d8be5fdd66186e461838ebb460a750341e043f 相对 main 0 files / 0 additions / 0 deletions。PR 描述仍声称要修 GitHub 插件官方信任回填判据(installed.trust / #3041),但这份改动已经不在当前 diff 里。

合并空 PR 没有修复效果,还会制造一次无内容的 squash。请二选一:

  1. 如果修复已经随其它 PR 进主干:关闭本 PR;
  2. 如果修复仍需要:把判据改动重新提交到本分支后再请求审查。

在 diff 重新出现并经过审查之前,不合并。

@MagicLizi MagicLizi added the status:awaiting-author 等作者修改(review-pr 自动维护,仅展示) label Aug 26, 2026
@MagicLizi
MagicLizi dismissed stale reviews from themself August 26, 2026 02:50

这些问题已在当前 head 的后续 commit 中修复(格式门/安全门已通过),自动 dismiss 旧的 CHANGES_REQUESTED 以解除合并阻塞。

@MagicLizi MagicLizi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查通过:相对当前 main 无可合并 diff(#3041 已由 #3094 落地)。无 P0/P1。

@MagicLizi
MagicLizi merged commit 63b9bc6 into makecindy:main Aug 26, 2026
10 checks passed
@MagicLizi MagicLizi removed the status:awaiting-author 等作者修改(review-pr 自动维护,仅展示) label Aug 26, 2026
@MagicLizi

Copy link
Copy Markdown
Contributor

#3041 的官方信任回填其实已经在 #3094 进主干了,这条 PR 后面跟 main 对齐之后变成空 diff,合进去只是把记录收口,避免再占着待审队列。

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

Labels

None yet

Projects

None yet

2 participants