mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-12-05 20:39:33 +08:00
feat(market): 专项复核支持合集成员与根 Notice 的精确接受哈希 (#307)
为 `special-review` v1 增加两个可选接受字段,使 Class C 专项复核能在**精确匹配**时接受合集成员变化和根目录 LICENSE/NOTICE/COPYING 变化。这不是无条件绕过硬门槛:哈希或路径集合不对、不完整,审计仍然失败。 本 PR **只改审计工具、schema 和单元测试**,不更新任何技能 pin,也不把失败草稿标成 Ready。 ## 新字段 - `acceptedRootEvidenceSha256`:根目录 LICENSE/NOTICE/COPYING 路径 → 新快照文件字节的 SHA-256。当根证据有变化时,该映射必须**恰好等于**新增或变更路径及其新哈希。删除这些文件仍一律阻止,即使复核记录省略了被删路径。`excludePaths` 仍不能用来隐藏许可、Notice 或依赖清单。若声明的 `licenseEvidencePath` / `noticePath` / `license.evidencePath` 同时变化,也必须被同一接受哈希覆盖,否则该检查仍失败。安装范围内的许可/Notice 变化仍是硬门槛,本次不加豁免。 - `acceptedCollectionPaths`:必须恰好等于新快照 `discover_children` 的成员路径集合。接受后用发现结果作为审核树、预算和后续检查的路径,并据此重建 `entry.children` 与 sidecar `spec.collection.children`(写入 id、path,以及 frontmatter 归一化后的 version)。新成员必须同时提供 `acceptedFrontmatterSha256`,且**不会自动编造翻译**。已有成员的 frontmatter 规则和版本回退保护保持不变。没有该字段时,新增成员仍会以「合集成员」被阻止。 ## 本地验证 在当前 `origin/main`(`d463565237fab79b9e6eb5e944246a4e14dd625e`)上: - `scripts/catalog/test_audit_skill_update.py`:22/22 - `scripts/catalog/test_validate_catalog_metadata.py`:62/62 - `scripts/catalog/test_propose_upstream_updates.py`:9/9 本 PR 不代表运行或安全认证,也不自动合并。
This commit is contained in:
1 parent
d463565237
commit
b329b8cc30
3 files changed
+188
-22
No files matched your search
@@ -31,6 +31,17 @@
|
||||
"type": "object",
|
||||
"description": "Map of install path (empty string for a repo-root skill) to SHA-256 of stable_frontmatter(new SKILL.md).",
|
||||
"additionalProperties": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
||||
},
|
||||
"acceptedRootEvidenceSha256": {
|
||||
"type": "object",
|
||||
"description": "Map of repo-root LICENSE/NOTICE/COPYING path to SHA-256 of the *new* snapshot file bytes. When root evidence changes, this map must exactly equal the added or changed paths; deletions of LICENSE/NOTICE/COPYING are never accepted.",
|
||||
"additionalProperties": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
||||
},
|
||||
"acceptedCollectionPaths": {
|
||||
"type": "array",
|
||||
"description": "Exact set of new collection membership install paths when discovered children differ from the old entry. Must equal the discovered path set. Newly added members also require acceptedFrontmatterSha256 for that path.",
|
||||
"items": { "type": "string", "minLength": 1 },
|
||||
"uniqueItems": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user