fix: 集成实跑校准——cnb-drill 实仓语义 + 燃料链契约对齐(#334 试点全链打通) - #105
Conversation
|
Warning Review limit reachedNext included review available in 4 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Summary by QodoFix cnb-drill static verdict: YAML EX-id, self-layer mode, REMOVAL semantics
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Self-layer comment is wrong
|
| # 自层模式:根含 REMOVAL.md ⇒ 本仓即桥接层本体(整仓在删除区内)—— | ||
| # 层内引用不构成越界(三接缝口径只约束治理仓),verdict 直接 green。 | ||
| # 桥形判定:accounts.yaml+cnb_pool.py 共存(REMOVAL.md 有无正是被检项—— | ||
| # dirty fixture 曾因含 REMOVAL 被误判自层,实测收紧 2026-08-25) |
There was a problem hiding this comment.
1. Self-layer comment is wrong 🐞 Bug ⚙ Maintainability
The newly added “自层模式” comment and the module docstring both describe REMOVAL.md as a general/static-mode requirement and even as the basis for identifying a self-layer repo, but the code actually detects self_layer via accounts.yaml and cnb_pool.py and only requires REMOVAL.md when self_layer is true. This documentation/comment mismatch can mislead operators about report/exit-code meaning and cause future changes to implement or test against an incorrect mental model, potentially regressing detection and verdict behavior.
Agent Prompt
## Issue description
Update the documentation and comments in `pipeline/drill/cnb-drill.py` to accurately reflect the current behavior: `self_layer` detection is based on the presence of `accounts.yaml` and `cnb_pool.py` (not `REMOVAL.md`), and in static mode `REMOVAL.md` is only required for `self_layer` (bridge) repos while governance-style repos can be green without it when there are no violations.
## Issue Context
- Current self-layer detection logic is:
```py
self_layer = (root / "accounts.yaml").is_file() and (root / "cnb_pool.py").is_file()
```
- The verdict/green computation depends on `removal_present` only when `self_layer` is true.
- The newly added “自层模式” comment currently implies self-layer is identified via `REMOVAL.md` presence (misleading).
- The module docstring still describes the old static-mode contract that missing `REMOVAL.md` makes the run red globally, which no longer matches the updated logic.
## Fix Focus Areas
- pipeline/drill/cnb-drill.py[1-20]
- pipeline/drill/cnb-drill.py[84-90]
- pipeline/drill/cnb-drill.py[114-133]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
三处实跑校准:①cnb-drill:YAML 列表项 EX 节识别/自层模式(桥形判定)/green 终版语义(自层=REMOVAL 在即绿;治理=零越界)——双真仓复验 .github 绿+cnb-bridge 绿、44 自测全绿 ②divergence.py 燃料产物对齐 fanout/consumer 的 append 哈希链契约(B/C 两代理约定不一致的集成缝)③#334 自举试点链实测:三骨架→熵仪器(convergence 20%/零串通/契约 3 路线 3)→哈希链产物→消费者 exit 0。
依据
ADR-0085;IR-0004 rev6 AC-9/13/19。
Cards: Cloudbird-Software/.github#331 Cloudbird-Software/.github#332 Cloudbird-Software/.github#333 Cloudbird-Software/.github#334 Cloudbird-Software/.github#335