fix: gate 文件清单三防线——edited/rename 溯源/3000 fail-closed(ADR-0016) - #22
Conversation
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
|
Warning Review limit reached
Next review available in: 3 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 (1)
Comment |
PR Summary by QodoHarden ADR gate against edited metadata, renames, and API truncation
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
Git 允许文件名含换行——行流计数(grep -c)可被单文件多行虚增 GOT, 使 3000 截断 fail-closed 失效(GOT 虚增到 == changed_files 后,藏在 截断边界后的 C1 文件不再触发报错)。改为逐页 jq 按 JSON 对象计数 (length)与匹配(test 正则),文件名中的换行不影响任何一层判定。 逐页拉取同时天然覆盖 >100 文件分页场景。
背景
CI-Workflows #8 的 qodo code review 发现 adr-required 实现有三个可绕过路径。本仓
validate.yml的 standards-diff detection 用的是同一模式(同模板移植),同款缺陷同样存在,本 PR 同步加固。三防线
edited——PR check 通过后可编辑 title/body 移除 ADR 引用,不触发重验on.pull_request.types增editedprevious_filename暴露原路径——把standards/、CODEOWNERS等改名移出受管路径可绕过 C1 判定previous_filenamechanged_files即 fail-closed复核
previous_filename;on.pull_request默认 types 为 opened/synchronize/reopened 不含 edited——三项均为平台行为,非推测。ADR: ADR-0016