feat: check:* 防线注册表 + ADR-0012——ADR-0011 遗留项清零(配套 .github#16) - #8
Conversation
ADR-0011 两项遗留全部处置:
1. team.schema v2(跨仓 .github#16):destroy_condition 字段 + re-check-sample 枚举
+ 实例语义全面对齐(jsonschema 实测 v1 13 处不符→v2 三实例全 PASS)
2. check:* 注册表化(本仓):
- standards/checks.yaml 登记 9 项 check(status: active|planned + where)
- validate.py 两向校验:check:<id> 引用 ⊆ 注册表(未登记=悬空防线=CI 拒绝,
文本扫描覆盖 description/enforced_by/post_conditions);反向——登记无消费方=漂移
(consumed_externally 标记平台仓消费项)
- 负向测试:注入 check:nonexistent-guard → FAIL exit=1
发现(登记显性化):
- adr-required 无 CI 实装(CT-CUR-003 expected 悬空)→ planned + 实装待办
- main 双 ADR-0011 编号冲突 → ADR-0012 记录消歧约定(引用必须带主题限定;不重编号)
附带:curator-main 引用形式规范化(adr-required check→check:adr-required);
AGENTS.md 索引 +1 行(27 行,仍 ≤30);ADR-0011 遗留段改为处置记录。
验证:validate OK + simulate 12 场景全通。
|
Warning Review limit reached
Next review available in: 6 minutes Limit details: You’ve used all 3 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Comment |
PR Summary by Qodo建立 check:* 防线注册表与双向 fail-closed 校验
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1. Registry schema remains unchecked
|
* fix: gate 文件清单三防线——edited 重触发/rename 溯源/3000 上限 fail-closed(ADR-0016) CI-Workflows #8 qodo review 发现的同款缺陷在本仓 validate.yml 同样存在: 1. on.pull_request.types 增 edited:PR title/body 是可变输入,check 通过后 编辑掉 ADR 引用必须触发重验(反向:补引用救活 check 同理) 2. previous_filename 纳入 C1 判定:standards/CODEOWNERS 等 C1 资产改名移出 受管路径同样是 C1 变更 3. files API 3000 文件硬上限:返回数 < changed_files 即 fail-closed * fix: 文件清单计数与 C1 匹配改 jq 结构化处理——换行文件名绕过截断检测(qodo review) Git 允许文件名含换行——行流计数(grep -c)可被单文件多行虚增 GOT, 使 3000 截断 fail-closed 失效(GOT 虚增到 == changed_files 后,藏在 截断边界后的 C1 文件不再触发报错)。改为逐页 jq 按 JSON 对象计数 (length)与匹配(test 正则),文件名中的换行不影响任何一层判定。 逐页拉取同时天然覆盖 >100 文件分页场景。 --------- Co-authored-by: randypanding <randypanding@users.noreply.github.com>
解决什么
ADR-0011(team-collaboration) 的两项遗留全部清零,不留到后面:
变更
check:* 注册表(standards/checks.yaml 新建)
登记 9 项 check(gate / intent-ratified / test-tree-freeze / pr-identity-path-matrix / adr-required / rollback-plan-required / flag-enable-owner-only / retro-debt-aging / precedent-non-normative),每项
status: active|planned+where(实现或计划位置)。validate.py 两向校验(fail-closed,与词表/ct-coverage 同模式)
check:<id>引用必须 ∈ 注册表——未登记 = 悬空防线 = CI 拒绝。文本级扫描(引用嵌在 description/enforced_by/post_conditions 自由文本中)consumed_externally标记平台仓消费项如 gate)check:nonexistent-guard→FAIL exit=1(悬空防线拦截生效)摸底证实了悬空风险是真实的
adr-required被三处引用(profiles enforced_by、curator post_conditions、CT-CUR-003 expected),但无任何 CI job 实装——CT-CUR-003 声称的防线行为当前不可执行。处置:登记planned+ ADR-0012 记录实装待办(validate.yml 增 job:PR 触及 C1 路径且无ADR-\d{4}引用则 fail——C1 流程机器化)。现行防线仍是 CODEOWNERS owner-only(CT-CUR-002)。附带发现:ADR 编号冲突
main 现存两个 ADR-0011(runtime-egress 供应链线 PR#6 / team-collaboration 团队协作线 PR#7),均已合并、授权凭证完整。ADR-0012 记录消歧约定:引用 ADR-0011 必须带主题限定;不重编号(本仓 30+ 处引用 vs 0 处,重编号成本不对称)。新 ADR 自 0012 顺延。
验证
python3 scripts/validate.py→ OK(tools=5 skills=2 agents=9 teams=3 models=5 ct=29)python3 scripts/simulate-wave.py→ 12 场景全通流程
C1(decisions/ + standards/ + scripts/ 变更):PR + ADR-0012 + owner merge。ADR-0011 遗留段已改为处置记录。