fix: §8 直推检测增加初始建仓导入豁免清单(ADR-0016 附录) - #56
Conversation
|
Warning Review limit reached
Next review available in: 49 minutes Limit details: You’ve used all 3 included reviews currently available. 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 within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day 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 (2)
Comment |
PR Summary by Qodo修复 §8 初始建仓直推误报
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. drift-check.sh uses admin token
|
改了什么
governance/expected-state.json:新增direct_push_exemptions字段——.github初始建仓导入的 2 个直推 commit 完整 SHA 逐一登记governance/drift-check.sh§8:豁免清单读取与逐 SHA 匹配(grep -qF全 SHA 精确匹配,非子串);命中豁免输出 OK 行注明依据,未命中照常走关联 PR 复核为什么
.github仓初始治理树导入(9b056b3a / 416f5f5,"feat: GitHub 企业级安全与质量体系搭建")发生在 policy_effective(2026-08-19T00:00Z)之后、gate/PR 机制建立之前——彼时仓库尚不存在,初始 commit 结构上无法走 PR(flows.new_repo step1-2 的固有形态)。§8 直推检测将它们报为 P0 漂移属误报。豁免采 GM-2 破玻璃回填的机器可读形式:逐完整 SHA 落盘登记 + ADR 背书(ADR-0016 附录),不引入时间窗/消息模式等可被滥用泛化的弱判据——豁免范围被 SHA 唯一钉死,新直推 commit 不可能搭便车。
窗口外核查:同消息的 6a00fbf(2026-08-18T21:08Z)早于 policy_effective,天然在窗外,无需豁免。
怎么验证
GH_TOKEN=… bash governance/drift-check.sh:30 OK / 0 DRIFT / exit 0——§8 输出repo '.github' commit 9b056b3a/416f5f57 初始建仓导入(§8 豁免清单,ADR-0016 附录回填),四仓 no-direct-push 全绿bash -n通过;jq -eJSON 解析通过风险 / 回滚
ADR: ADR-0016