fix: AR-6 handoff 销毁前置措辞对齐单一真源(红队 #18,ADR-0016) - #48
Conversation
…016) team.schema 与 GOVERNANCE 声称"handoff 全部完成才允许销毁",但单一真源 team-collaboration.yaml 规定销毁前置=after-handoff(team_side);adr-write/ memory-distill 等由 curator 异步消费归档资产执行、不阻塞销毁。措辞错位 制造"owner 依赖项卡死归档"的假想死锁(红队 #18 内核)。
|
Warning Review limit reached
Next review available in: 28 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 QodoAlign AR-6 destruction gates with team-side handoff semantics
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
与 PR #48 的 GOVERNANCE flows.step4 对齐:handoff_done 只表达 team 侧 完成(销毁前置);stewardship 侧异步完成态由 handoff_step(side= stewardship_side) 事件逐项审计——单一布尔不承载双侧完成态。
qodo 意见:step 4 仍审计 handoff_done,但该布尔表达"全部 handoff 完成", 无法在 stewardship 侧异步工作未完时证明 team 侧前置已满足。 修复:run_finished.handoff_done 仅表达 team 侧销毁前置完成; stewardship 侧完成态由 handoff_step(side=stewardship_side) 事件逐项 留痕(event.schema v1.1,PR #47)——append-only 事件流可分别回放 双侧完成态,消除单一布尔的语义过载。
* feat: event.schema v1.1——补 6 类治理审计事件(handoff/approval/credential/budget/team/judge,红队 #20,ADR-0016) AR-7 事件流是 AR-6/AR-8/AR-9 的审计支柱,但 v1 仅 5 类基础事件: handoff 交接、审批流、凭据使用、预算消耗、团队生命周期、仲裁全部不可追溯。 枚举只增不改,v1 消费方向后兼容。 * fix: event.schema 载荷绑定落地——$defs 接入根校验路径(review 修复) 回应 qodo 三条意见: 1. payload 定义从未参与校验:根 schema 原为泛化 payload:object,六类治理 事件可带任意载荷或缺省通过。现以 allOf/if/then 按 event 常量绑定 $defs: 六类 v1.1 新事件 payload 必填;五类基础事件 payload 可缺省(v1 存量记录 后兼容),出现即须匹配对应 $def。 2. 载荷接受空对象:六个新 $def 补 required 数组,并加条件必填—— status=failed→reason、ok=false→reason、pool=per_card→card、 transition=destroyed→handoff_ref。 3. handoff_step.item 收敛为 team.schema lifecycle.handoff 同枚举(10 值, 注释声明两处同步维护),未知交接项不再能计为已完成。 验证:Draft202012Validator 17 项正反用例全过(缺 payload/空 payload/ 未知 item/条件缺字段均拒绝;v1 基础事件缺省 payload 兼容通过)。 * fix: run_finished.handoff_done 语义收敛为 team 侧销毁前置(review 跟进) 与 PR #48 的 GOVERNANCE flows.step4 对齐:handoff_done 只表达 team 侧 完成(销毁前置);stewardship 侧异步完成态由 handoff_step(side= stewardship_side) 事件逐项审计——单一布尔不承载双侧完成态。 --------- Co-authored-by: randypanding <randypanding@users.noreply.github.com> Co-authored-by: randypanding <66171646@users.noreply.github.com>
ADR-0016(决策 5,解决 agent-registry #18 内核)
问题(内核属实):本仓 team.schema.yaml handoff 描述与 GOVERNANCE.yaml AR-6 intent 均声明 "handoff 全部完成才允许销毁"。但语义单一真源 agent-registry standards/team-collaboration.yaml PART 2 规定:
adr-write 是 stewardship 侧项(curator 执行、可能涉 owner)——按本仓措辞它会阻塞销毁,制造红队 #18 描述的"owner 不可用→团队永不归档"死锁。正确语义:只有 team 侧项是销毁前置。
修复:
红队建议驳回:
handoff_timeout/force_destroy降级路径与有意设计冲突——incident_cell "TTL 到期绝不 auto-destroy、冻结现场持续升级"是安全优先设计决策(team-collaboration lifecycle 显式声明);死锁根源是措辞错位而非缺降级机制。issue 内附证据。本地验证:两 YAML 解析通过。