governance: 契约兼容性 policy 落盘(contracts.yaml)+ GOVERNANCE CI-5(P2-4,ADR-0038) - #114
Conversation
|
Warning Review limit reached
Next review available in: 19 minutes Limit 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. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. 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落盘契约兼容性策略并登记 CI-5 治理门
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Unwired repository marked enforced
|
| platform: {github: {mechanism: hygiene-job, part_of: CI-1}} | ||
| - id: CI-5 | ||
| intent: "契约兼容性检测门:OpenAPI/JSON Schema breaking 变更须 ADR 引用;DB migration destructive DDL 须 ADR + downgrade 逆操作;policy 声明路径与实际文件对账(失明即红)" | ||
| strength: enforced |
There was a problem hiding this comment.
1. Unwired repository marked enforced 🐞 Bug ≡ Correctness
CI-5 is marked enforced, yet the policy explicitly postpones contract-check wiring for agent-registry, leaving changes under registry/schemas/** able to merge without this compatibility gate. This contradicts the documented meaning of enforced and makes the organization-level control materially incomplete.
Agent Prompt
## Issue description
CI-5 is declared platform-enforced even though the policy explicitly states that `agent-registry` wiring is deferred. Ensure every declared contract surface participates in its repository's required `gate`, or do not advertise the measure as enforced yet.
## Issue Context
`agent-registry` owns the declared `registry/schemas/**` contract surface, so declaration alone does not prevent incompatible changes from merging. The repository uses a single required gate and needs contract checking included in or aggregated into that gate.
## Fix Focus Areas
- governance/GOVERNANCE.yaml[65-69]
- governance/policy/contracts.yaml[49-55]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
摘要(P2-4,.github#89,ADR-0038)
契约兼容性检测门的 policy SoT 落盘
governance/policy/contracts.yaml+ GOVERNANCE.yaml 新增 CI-5 度量。contracts.yaml 内容
breaking_requires_adr: true(breaking 契约变更须 PR 引用真实存在的 ADR);openapi_fail_on: WARN(oasdiff 从严档:删可选响应属性也拦)。specs/contracts/**+ alembicalembic/versionsschema/{contracts,entities,common}/**registry/schemas/**(声明先行、接线延后——validate.yml 单 job 架构需先拆 aggregator,[自动合并 P2-4] 契约兼容性检测门 #89 留言记录)GOVERNANCE.yaml
ci_gate 域新增 CI-5:intent/platform/verify 三段(reusable-workflows contract.yml + policy 文件 + contract-selftest 验证面)。
消费方
CI-Workflows
scripts/contract/contract_check.py(contract-check job):优先读本 policy(gh api 公开仓读);本 policy 合入前引擎回退内置 bootstrap 快照(ADR-0038 决策 6,合入后快照成为死回退待清理)。合并顺序
依赖 CI-Workflows#18(引擎)先行或同批合入——本 policy 合入后即取代 bundled 快照。