fix(catalog): 合集子技能的根 NOTICE 交付认可客户端附加回读 (#459)

让诊断规则 `installed-notice-delivery`
认可**合集子技能**已有的客户端附加回读证据。这一条依据是客户端的真实安装行为,不新增豁免字段。

## 修改内容

| 类型 | 模块或功能 | 本次修改 |
| --- | --- | --- |
| 修复 | `installed-notice-delivery` 诊断 | 合集安装(有 `children`)时,如果有效的
`acceptedClientAttachedNotices` 回读里,该子技能的 `attached` 列出了这份根
NOTICE(`sourceName` 等于它的路径,`sha256` 等于新 pin 上的字节哈希),这一行就降为
`info`,并在证据里记录哈希和客户端提交;回读里没有这一项或哈希过期时,仍然 `blocked` |
| 不变 | 独立技能 | 独立技能的客户端只附加许可证据文件,就算回读里写了 NOTICE 也不认 |
| 新增 | 测试 | 新增 4 个单测:合集放行、合集缺项仍阻断、合集哈希过期仍阻断、独立技能声称附加 NOTICE 仍阻断 |
| 更新 | 文档 | `docs/verified-update-automation.md` 按安装类型说明根 NOTICE 的交付规则 |

依据:desirecore 客户端(v10.0.214–v10.0.219,已核验的合集实现 `28128a15`)安装合集子技能时,会调用
`stageMarketSkillDirectory(…, { attachNoticeFilesFrom: contentDir })` →
`listRootNoticeFiles`,把合集根目录的**所有** `LICENSE*`/`NOTICE*`/`COPYING*`
都附加进安装副本。独立技能走的是 `requiredRootNotice`,只附加
`governance.license.evidencePath` 这一个文件。

## 修改前后

| 场景 | 修改前 | 修复后 |
| --- | --- | --- |
| gamedev-agent-skills `c6ca6c41→523eb36d`(79 个子技能;已有回读记录了 NOTICE,sha
`2dcb65b1…`,新旧 pin 上 NOTICE 相同) | 79 行 `installed-notice-delivery:
blocked`,草稿 #446 无法修复 | 用现有专项复核原样审核,直接通过,不需要补任何字段 |
| blog-repurpose(独立技能,新增根 NOTICE) | 阻断 | 仍然阻断(真实快照验证) |

## 影响范围

| 文件 | 行号 | 改动 |
| --- | --- | --- |
| `scripts/catalog/update_diagnostics.py` | 212-231 | 合集回读证据的 NOTICE
交付判定 |
| `scripts/catalog/test_update_diagnostics.py`(测试) | 616-678 | 4 个测试 |
| `docs/verified-update-automation.md` | 206-216 | 按安装类型说明规则 |

## 验证

| 检查项或场景 | 预期结果 | 实际结果 | 证据 |
| --- | --- | --- | --- |
| 新测试在没有本改动时 | 放行用例失败 | 1 failed / 3 passed(3 个阻断用例本来就通过) | 本地 |
| `pytest test_update_diagnostics.py test_tracked_updates.py` | 全部通过 |
120 passed | commit `032ea45` |
| 其余 catalog 测试脚本(audit / validate / collection / health / propose /
review) | 全部通过 | exit 0 | 本地 |
| 真实快照:gamedev #446、blog-repurpose | gamedev 通过、blog 仍阻断 | 符合 | 本地审核器 |
| `validate_catalog_metadata.py --require-complete` / `validate-i18n.py`
| 0 error | 0 error,105 warning(main 原有) | 本地 |
| CI | 全部通过 | 等待中 | 本 PR checks |

这是审核规则改动,需要维护者复核。请勿自动合并。合并后会接着给 #446 开正式 PR。

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mashaguaandDevin authored and GitHub committed 2026-12-06 11:59:10 +08:00
1 parent 5f1ffcd699
commit 815916a4aa
3 files changed
+94 -4

No files matched your search

+11 -3
View File
@@ -203,9 +203,17 @@ blocks on facts that cannot affect the installed payload:
directory. `LICENSE*`/`NOTICE*`/`COPYING*` text files and dependency manifests stay
protected.
Root `NOTICE` delivery is unchanged: the verified client implementations attach only the
catalog license evidence file, so a client-attach review cannot clear
`installed-notice-delivery` for a separate root `NOTICE`.
Root `NOTICE` delivery depends on the install type, because the verified client
implementations differ:
- **Standalone installs** attach only the catalog license evidence file
(`governance.license.evidencePath`). A client-attach review cannot clear
`installed-notice-delivery` for a separate root `NOTICE`, even if a readback lists one.
- **Collection child installs** attach every root `LICENSE*`/`NOTICE*`/`COPYING*` file
(`attachNoticeFilesFrom` → `listRootNoticeFiles`). When the valid
`acceptedClientAttachedNotices` readback for a child scope lists the root notice with
`sourceName` equal to its path and the SHA-256 of its bytes at the new pin, the row is
`info`. A missing entry or a stale hash keeps it `blocked`.
### Audited carry-forward rules (reducing repetitive Drafts without skipping checks)