feat: harden contribution and map validation - #17
Open
tommywutong wants to merge 7 commits into
Open
tommywutong wants to merge 7 commits into
tommywutong wants to merge 7 commits into
Conversation
Contributor
PR Review Swarm未完成的阶段/范围:
Verdict: incomplete Findings (0):
|
Contributor
Author
跟进:补齐贡献入口与地图链接校验在上一次提交后继续盘点并追加两项低风险、可验证的改进:
新增提交:
完整回归已重新通过: bash -n bootstrap.sh check-updates.sh update-sources.sh progress.sh tests/*.sh
./tests/progress.test.sh
./tests/track-ref.test.sh
./tests/check-updates-status.test.sh
./tests/maps-integrity.test.sh
./tests/prompts-integrity.test.sh
git diff --check当前自动 Shell CI 为 pass。PR Review Swarm 的所有可见执行阶段均为 pass,但最终 verdict 仍是 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
仓库已经有源码地图、版本清单、教学提示词和 Shell 更新脚本,但贡献入口较短,地图与提示词的静态结构没有 CI 保护。此 PR 补齐贡献者需要的执行规则,并增加不依赖上游下载的完整性检查,降低地图入口漂移和教学路由失效的风险。
改动
1. 扩展
CONTRIBUTING.md补充以下可执行规则:
bootstrap.sh --check用法;maps/**/AGENTS.md,不要直接在源码目录创建游离文件;sources.sh和.gitignore相关配置,不应复制清单到三个脚本;2. 增加
tests/maps-integrity.test.sh新增静态地图完整性检查,故意不下载上游源码,因此可以在全新 clone 上运行。检查内容包括:
AGENTS.md都有对应的CLAUDE.md;CLAUDE.md保持三行指针并指向AGENTS.md;sources.sh的 11 个 target 都有对应的地图根目录;3. 增加
tests/prompts-integrity.test.sh新增教学提示词路由检查,验证:
该测试只验证稳定的配置契约,不尝试对 LLM 的自然语言输出做脆弱的快照测试。
4. 接入 Shell CI
在
.github/workflows/shell-tests.yml中加入:现有 Shell 回归测试保持不变。
5. 修正一处源码地图路径
maps/swift-foundation/AGENTS.md中将AsyncMessage.swift修正为实际路径:该路径已对照本地准备好的 Swift Foundation 工作区验证,当前文件为
Sources/FoundationEssentials/NotificationCenter/AsyncMessage.swift。有意不包含的内容
README 状态漂移原本属于候选改动,但现有 PR #13 已经专门负责 README 重构。为避免与维护者正在审阅的 PR 重复,本 PR 不修改
README.md;README 的数量、目录和视觉结构由 #13 统一处理。本 PR 也不修改上游源码版本、生产配置、GitHub Actions 的第三方 workflow pin,避免扩大变更边界。
提交拆分
8b0f1c4 docs: expand contribution guide68cd0e6 test: validate source map integrity294d0f7 test: validate teaching prompt routes681ba7b docs: fix async message map patha03e798 test: avoid hardcoded map count验证
以下命令均已在本分支执行并通过:
bash -n bootstrap.sh check-updates.sh update-sources.sh progress.sh tests/*.sh ./tests/progress.test.sh ./tests/track-ref.test.sh ./tests/check-updates-status.test.sh ./tests/maps-integrity.test.sh ./tests/prompts-integrity.test.sh git diff --check源码证据检查:
./check-updates.sh objc4在当前仓库因没有本地源码返回缺失提示;未静默下载源码;objc4,检查结果为UPTODATE;CFRunLoop.c3955 行、objc-runtime-new.mm9959 行、Applequeue.c9085 行;AsyncMessage.swift的 117/125 行路径。审查重点
tests/maps-integrity.test.sh是否符合维护者对地图目录和未来新增 target 的预期;sources.shtarget 到地图根目录的显式映射是否应在未来抽象成清单字段;CONTRIBUTING.md的规则是否需要进一步与合并策略、Issue 模板或许可证政策对齐。