## 实际功能与范围 在原 PR 上继续完善,不新开机制 PR。使用 main 的可信代码与策略重新发现上游、读取精确旧新 pin、重建真实差异并绑定最终 SHA;不执行 PR 或上游代码,不把 listing-only 自动提升为 installable。 已正常 merge 最新 main,包含 #356、#357 以及其他 worker 完成的 #359;没有 rebase、force-push,也没有修改 #358–360 工作分支。本 PR **不合并、不部署自身**。 ## 修改前后对照 | 修改点 | 修改前 | 修改后 / 实际效果 | |---|---|---| | Git 固定来源更新 | 主线发现更新后提出快照 PR,无法统一覆盖本轮发现的准入缺口 | 沿用精确 pin 的真实 delta 核验;新增门禁同样用于提案与可信自动合并重审。每轮最多审核 5 个新 Git 候选,另可只读复核 5 个已有 PR,不改其内容、不重复开 PR | | ZIP / Web 新版本发现 | 主线主要检查链接可访问性,不发现新版 | 只通过显式登记的 ClawHub / GitHub release asset / GitHub file 适配器发现与固定来源,不猜版本、不把新哈希当作审核通过。目前实际登记高德 ClawHub;其他来源须另配可信跟踪;嵌套 ZIP 安装目录尚未适配 | | 市场本地技能 | 不自动同步第三方上游 | AI News Radar 使用上游精确映射与文件清单,保留市场包装和本地补丁;上下游同时修改或映射范围不一致即暂停,不覆盖本地补丁。目前只登记此本地包 | | 主许可通知是否随安装交付 | 能核对根及嵌套许可变化,却不能证明根主通知随 source.path / 所选 child.path 交付 | 分别检查每个所选目录;vendor/LICENSE 或 SKILL 中单行 MIT 不能替代主项目完整版权、授权和免责通知。README/SKILL 内完整等效文本可通过,不强制 standalone LICENSE;未证明交付时阻断或转人工,不擅改安装方式 | | NOTICE 的实际交付 | 根 NOTICE 存在或哈希已审可能被误当作安装交付 | 声明的 NOTICE 未证明随目录交付会阻断;未声明根 NOTICE 的适用性保守转人工。非标准/嵌套等效通知需人工复核,不把扫描未命中说成没有合法许可 | | 精确 pin 人工例外 | README 文本没变时可能将旧许可例外扩展到新 pin | 单行 MIT 的旧 pin 例外不能自动继承;新 pin 必须另有真实人工授权。#359 的新 pin 例外是另一 worker 独立补审后合入 main 的决定,不是本机制自动扩大旧授权 | | 版本、双语与派生目录 | 结构化字段通过不代表说明文字、两种语言和派生目录一致 | 使用明确版本源提示旧版本文案;根插件版本不强加给所选子目录,不把任意数字当版本。检查 entry/catalog 子项语言镜像,描述变化转人工;历史英文回退单独标记,不伪称已翻译 | | 安装内容、权限、依赖和行为差异 | 依赖哈希接受或简短专项说明容易被误读为完整行为审核 | 直接比较完整 Git 对象和安装路径,报告新增/删除/权限差异,不依赖截断的 GitHub compare。授权、凭据、配置、网络相关命名实现的变化保守转人工;明确这只是复核提示,不是已证实漏洞。开发依赖不冒充所选技能运行依赖 | | 失败原因及真实回执 | 首个异常后缺少精确路径和未检查阶段;后续校验失败可能覆盖旧回执或仍显示已审 | 逐项输出技能/路径、精确旧新 pin、门槛、原因、修法与实际状态,区分历史遗留、本次引入、人工待审、实际失败和失败后未完成;保留真实旧回执,独立保存失败命令/输出,不生成假成功回执。物化 ZIP/local 的临时 Git ID 不当作真实来源 pin | | 当前候选 PR 与 main 重放分层 | 对 main 旧元数据重放的失败,可能被误说成当前已修订 PR 仍未修;旧回执错误与许可根因混在一起 | 只读当前 PR 精确 head 的 entry、sidecar、旧回执与实时 checks;不 checkout、不执行候选。每行标注 main 重放或当前候选 head。reviewedRef / receipt ref / receipt scope 三类未签新回执的派生错误与主通知交付根因分开;读取失败明确未检查,不停止其他独立候选,也不当作通过 | | unhealthy report / issue 展示 | 健康 issue 在审核前生成、单语、每日时间戳驱动更新,并用评论关闭 | 健康结果 + Git 审核 + ZIP/Web/local 结果在审核后汇总为中英双语;复用原 upstream-health issue,稳定托管区、无变化不编辑、不发评论,完整确认解决才关闭,新问题重开同一 issue。首次迁移保留 #213 现有手动双语内容为历史快照,托管区外人工内容保留;完整 JSON/日志保存在 audit-results 工件 | | 自动合并的信任与最终 SHA 门禁 | 不能靠“有标签/有回执”证明可合并;原先还错误要求所有语言任务必须存在 | 只接受可信 main 重审得到的完整预期差异,检查当前 main 与最终 SHA;validate、translate、Copilot wait 为具名基线,实际存在的最新 CodeQL/Analyze、statuses、workflow runs 也必须完成且成功,适用检查缺失/失败/进行中均不放行。PR 自带 JSON 或任意标签不能授权 | | 纯版本例外与真人审核 | 所有字节变化要求第二真人过宽,但也不能用版本号掩盖行为变化 | 保留可独立证明的 SKILL.md 顶层 semver-only 例外:其余字节、文件集和权限均相同才与完全相同 payload 一样无需额外行为批准;其他实质变化仍需最终 SHA 的有权限真人维护者审核,真人审核不能豁免独立机器门禁 | | hold、冲突、凭据及发布身份 | 不能把配置不足或冲突伪装成更新成功 | hold / 双边修改 / 范围变化 / 未确认许可均暂停。实际发布与合并身份验证为 mashagua;MARKET_MAINTAINER_TOKEN 未配置时只审核,不冒用机器人发 PR。保留分支保护与预期 SHA squash,无 admin 绕过;每轮最多合并一项,本轮不执行合并 | ## 本轮真实案例与限制 - **#358 / Addy**:固定 `8c99fa36d90068c82d547f7c12a9d67a3e95f4ee` → `e997ac5b9a74eab332d5e9793bb38a38c8cfdd74`。包括 `skills/api-and-interface-design` 在内,根主 MIT 通知未被证明随所选子目录交付;是旧版本已有的缺口。0.6.18 双语文案已由 #358 独立修复,不能把 main 的旧文案误称为该 PR 仍未修复。 - **#359 / Follow Builders**:旧 pin `22c2e72e1a4bb0fc0f3e19f992fc55615b48989e` 的例外不自动覆盖 `65452b9258f31ed2893734c86481216d2e4105ff`。新 pin 的人工例外、22 文件真实回执及四个 JSON 数据变更由另一 worker 补审,现已合并 main;本 PR 已正常同步,未碰其分支。 - **#360 / Last30Days**:`331025e662756ca51e86dfddcf59969f6dba25a0` → `7c2e1c2b099b13abd4397910168c4f53e638bb21`,范围 `skills/last30days`。主通知在目录外,bird-search vendor 许可不能替代;真实差异包含授权/配置/网络实现,依赖专项接受不代表完整行为复审。没有删除资源、缩范围或改变交付方式。 - **#361 / Matt Pocock**:上游仍为 `5863806dd4e15c63174bee4e7515a4256792ecfa` → `d65391149dbb5fe76478e76fa8d5122b2aa5a70e`;当前候选 head `4cd8c6a4a31ef4512a871d15a355dd8dcf670cb0` 已补39成员、78条双语并处理34条历史英文回退。本轮实际只读复审确认:当前候选成员缺项0、英文回退0,但39/39安装目录仍未证明携带完整主 MIT 通知。独立 PR 复核记录为39目录109文件均无完整必要通知,旧38也已有缺口;因此保持 Draft,不伪造新回执。 - 对 main 旧登记重放的原失败仍是登记38/解析39;物理 SKILL 39→39、无新增/删除/移动,software-factory 仅因 YAML 修好重新可发现,chief-of-staff 描述另变,yaml 是根开发依赖。**这是历史 main 基线,不是说当前候选没补成员/翻译。** - 当前候选 validate 真实失败;reviewedRef 不对应目标、旧 receipt.source.ref 不对应目标、旧 receipt.scope38 不覆盖39,是**未签新回执的三项派生错误**,不是三项新许可变更。translate、CodeQL、三个 Analyze 成功;Draft 的 Copilot wait 为 skipped,不称实质审核批准。先解决通知根因并真实复审,不能只改 ref/scope 凑绿灯。 - 证据:[当前PR实际复核说明](https://github.com/desirecore/market/blob/4cd8c6a4a31ef4512a871d15a355dd8dcf670cb0/docs/reviews/mattpocock-skills-pr361-d65391149dbb.md) · [JSON记录](https://github.com/desirecore/market/blob/4cd8c6a4a31ef4512a871d15a355dd8dcf670cb0/docs/reviews/mattpocock-skills-pr361-d65391149dbb.json)。 自动通知证明采用有界、保守的直接目录文本匹配;不声称覆盖一切合法非标准许可写法,也不代替真实安装回读或全部行为审查。客户端携带父级通知的实现需要另行授权,并让实际产物、摘要、锁记录、升级和回滚一致;本 PR 不跨仓修改客户端。 实现说明:[docs/upstream-audit-reporting.md](https://github.com/desirecore/market/blob/2bf76eade1644ff4b928c873cbb5d9139a322973/docs/upstream-audit-reporting.md)。现有报告:[issue #213](https://github.com/desirecore/market/issues/213);当前手动双语不等于持久模板已部署,主线旧任务仍可能覆盖,须本 PR 经审核合入 main 后才生效。 ## 最终 SHA 验证 最终 head:`2bf76eade1644ff4b928c873cbb5d9139a322973`。功能提交:`574f9c904da19eb4ce5c970c45b798bc6d3d3f72`、`e0d7ef0d936872f08d8fb6bd20166d98ddf46952` 与 `2bf76eade1644ff4b928c873cbb5d9139a322973`;正常 merge main 提交为 `950ae45cc985f8510a13eb9487896e1d516a8613`。新提交 author/committer 均为 `mashagua <993498039@qq.com>`。 - 完整 `pytest scripts`:**306 passed、397 subtests passed**;仅一条环境 pytest 插件弃用警告。 - `validate_catalog_metadata.py --require-complete`、`validate-i18n.py`、`translate.py --check`、`git diff --check`:全部 exit 0。目录原有治理/英文回退警告未冒称已修。 - 同一最终 SHA 的远程 **validate、translate、CodeQL、Analyze (actions/python/javascript-typescript) 均 success**。 - `wait-for-copilot-review` 最新读取仍 **in_progress**,尚无 review 或行内评论;不冒称已完成 Copilot 审核。 不合并 #354,不部署;不修改 AI News Radar 的五条既有告警,不修改任何技能资源、结构、子项选择或安装方式。
8.1 KiB
Verified upstream updates
This is update automation, not automatic first admission, runtime acceptance or a security certification. The issue tracker remains enabled and is independent of admission evidence. No credentials, private feeds or user tokens belong here.
Trusted inputs and scope
- The daily upstream-health job still checks Git pointers. The Git proposer uses exact old/new SHA, the existing delta auditor and the old admitted evidence.
config/verified-updates.v1.jsonadds explicit tracking for non-pointer/local sources. Currently registered: the owner-qualified ClawHub AMap package and the local AI News Radar edition. No unregistered source is guessed.clawhubverifies the registered owner, gets an explicit stable latest version, downloads its version-specific ZIP and verifies the old pinned digest again. Registry MIT-0 metadata is not permission to override package MIT evidence.github-fileresolves a configured repository/branch/path to an immutable commit, then retrieves that exact raw file. This is the Web discovery adapter.github-releaseselects one explicitly configured asset from an actual stable GitHub release, never an inferred version string. Mutable assets whose old bytes no longer match the admitted digest are blocked.- Automatic artifact auditing currently supports root-layout packages. A nested install scope needs an explicitly reviewed layout adapter. Arbitrary hosts, symlinks, executable ZIP entries, path traversal, duplicate/case-colliding names, encrypted archives and over-budget artifacts fail closed.
- A new hash is identification only. Old/new bytes undergo the existing license, notice, dependency, frontmatter and metadata delta audit. Receipts name the actual SHA-256/upstream SHA; temporary Git objects only transport comparisons.
For a new Web source, add a reviewed tracking entry such as:
{"adapter":"github-file","repo":"example/project","branch":"main","path":"SKILL.md"}
A release ZIP uses adapter: github-release, repo, and an exact asset name.
The old market pointer/digest/admission must already be valid. These examples do
not enable first-time installs or authorize any unreviewed source.
Local editions
The local-git map records the exact upstream SHA, upstream path/hash, installed path/hash/mode, and every market-only wrapper. No newly discovered files are silently imported. Missing/moved files, added upstream license/notice obligations, changed permissions and mapping drift block advancement. Unmodified imported files can be replaced; a file changed by both upstream and market is a conflict, never a blind overwrite. Market wrappers/translations remain intact.
AI News Radar tracks the actual upstream master branch. Its existing generator
and the five previously reported alerts are not changed by this tooling PR.
Real read-only discovery currently detects a conflict in locally formatted CSS
(assets/styles.css); the safe result is a draft/manual reconciliation, not
an overwritten wrapper or a claim that the newer upstream already passed.
Publication and merge authority
Both publishers verify gh api user is mashagua; published commits use the
maintainer's designated identity. Configure an appropriately scoped maintainer
credential as the Actions secret MARKET_MAINTAINER_TOKEN through approved secret
management. This change neither creates nor reads credential values. With no
credential the workflows run audit/verification only; there is no bot-identity
fallback. Checkout credentials are not persisted; publishing uses an ephemeral
git credential helper environment. The issue-reporting step retains the normal
workflow token and its existing behavior.
The merge workflow runs after validation-related workflow completions, hourly at minute 47, and manually. It only checks out current main, not PR files or workflow artifacts; it never runs PR/upstream code. Labels and PR JSON are not trust roots. For each same-repository maintainer update PR it:
- Independently rediscovers/re-fetches the target and recomputes the complete allowed proposal using trusted-main policy and special-review records.
- Requires the complete PR diff to equal that result. Tooling/workflow changes, changed review exceptions, foreign paths or forged receipts cannot enter.
- Automatically clears byte/mode-identical installed payloads and proven
top-level
SKILL.mdsemver-only changes (all other bytes, inventory and modes identical). A version bump alone no longer needs a second human or a special approval marker. This is not a behavioral security audit: instructions, scripts, dependencies, license/NOTICE and install-scope changes are not covered by that proof. Substantive installed-content changes still need an APPROVED human maintainer review on the exact head, with:market-reviewed-no-expansion: <full-head-SHA>. The reviewer must be a different non-bot user with write/maintain/admin access; stale/dismissed/self reviews do not count. This clearance cannot override license, dependency, inventory, permission or receipt failures. No PR JSON, label or timeout of the Copilot wait check serves as behavioral approval. - Requires all applicable check/context results complete and successful on the exact final head, including mandatory validate, translate and Copilot wait. CodeQL/Analyze are required to pass when actually scheduled, not required to exist on a JSON-only update where GitHub does not schedule them; outstanding changes-requested reviews block. No ignored CodeQL failures.
- Requires current-base ancestry, a clean server state, and active strict server-side up-to-date rules for validate/translate to close the base race. The merge API binds the expected head SHA, uses squash, and has no bypass.
- Merges at most one PR per run, then stops because main has advanced. Behind branches remain held for a normal merge update and new final-head checks.
Thus this does not promise unreviewed autonomous merging of arbitrary changed skill scripts/prompts. A real exact-head human no-expansion review is the additional behavioral authority; automation does not invent that attestation. This mechanism PR itself is outside the allowed diff and must be reviewed/merged separately by a maintainer.
Daily discovery remains 09:23 Asia/Singapore (GitHub can delay execution). Git and configured-source publishers each have a five-candidate cap. An existing open PR for a skill is preserved, not overwritten; the same closed candidate is not recreated. Discovery/audit/validation failures retain old admission and become drafts/manual findings. Nothing automatically promotes listing-only.
Offline checks
uv run scripts/catalog/validate_catalog_metadata.py --require-complete
uv run scripts/i18n/validate-i18n.py
uv run scripts/i18n/translate.py --check
uv run --with pytest --with jsonschema --with pyyaml --with 'lxml>=5.3,<7' --with 'defusedxml>=0.7' python -m pytest scripts
uv run scripts/catalog/publish_tracked_updates.py performs real discovery and
audit planning without publication. merge_verified_updates.py defaults to
verification-only and must run from current main; --merge additionally requires
the maintainer credential, collaborator-permission read access and every gate above. Do not run publishing/merge flags
as a smoke test against real PRs.
Direction-review correction (2026-11-25)
The original implementation incorrectly required every CodeQL language job on all updates, including JSON-pointer changes that do not schedule those jobs. Only baseline jobs are mandatory by name; every latest applicable returned check, status and workflow run must still succeed. No CodeQL failure is ignored. The byte-change gate was also too broad: an independently proven SKILL version-only change is now automatic. This deliberately does not promise that metadata checks can prove arbitrary upstream script/instruction behavior safe. Expanding that coverage needs a real behavioral review mechanism, not deletion of the safeguard. Identity verification, trusted-main re-audit, local-patch preservation, finite budgets, exact-head binding, strict server rules and no-admin/no-force stay intact.