feat: owner 控制与可观测性——pause/abort + TUI 视图 + log 分级(ADR-0013 PR-B) - #12
feat: owner 控制与可观测性——pause/abort + TUI 视图 + log 分级(ADR-0013 PR-B)#12randypanding wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
PR Summary by QodoAdd event-sourced owner controls and observability views
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. TUI mechanism lacks trust profile
|
| ask_retrieval: | ||
| carrier: researcher as_tool(单次往返,无卡无队) | ||
| input_schema: registry/schemas/query-in.json | ||
| contract: 回答必须附 trace_id/card_id/事件引用;查不到就说查不到(禁编造—— |
There was a problem hiding this comment.
1. Ask schema rejects requests 🐞 Bug ≡ Correctness
ask_retrieval sends query-in objects to the researcher, but the researcher's strict tool contract accepts question-in, whose required fields and property names differ. Ask requests using the declared schema will therefore fail validation before retrieval and also omit the required trace_id.
Agent Prompt
## Issue description
The observability ask path declares `query-in.json`, while the researcher as-tool contract requires `question-in.json`. Their required fields are incompatible, so requests cannot pass the researcher's strict input validation.
## Issue Context
`query-in` requires `query`; `question-in` requires `question` and `trace_id`. The latter is also necessary for the observability provenance contract.
## Fix Focus Areas
- standards/observability.yaml[51-56]
- registry/agents/researcher-code.yaml[37-41]
- registry/schemas/question-in.json[7-24]
- registry/schemas/query-in.json[7-17]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| tui: # owner 直读视图与控制面板(ADR-0013 PR-B) | ||
| kind: mechanism | ||
| duty: 事件流→视图物化(六视图目录 observability.views)+ 控制动词入站转发 | ||
| (写事件非写状态——read_only 原则) |
There was a problem hiding this comment.
2. Tui mechanism lacks trust profile 🐞 Bug ⛨ Security
The new services.tui is a state-affecting mechanism that forwards owner control events, but no tui mechanism profile defines its implementation, capabilities, or trust boundaries. This defeats the repository's fail-closed mechanism-registration model and leaves the control surface without an enforceable authority declaration.
Agent Prompt
## Issue description
The new TUI service and `mechanism:tui` reference have no matching mechanism profile. Consequently its read access and event-publication authority are not constrained by the standard capability vocabulary.
## Issue Context
Other mechanism services have profiles with implementation, mission, capabilities, and trust declarations. The trust-chain simulator checks only an older hard-coded set of four services, so it misses the new service.
## Fix Focus Areas
- standards/team-collaboration.yaml[120-126]
- standards/observability.yaml[69-73]
- standards/archetype-profiles.yaml[380-432]
- scripts/simulate-wave.py[499-520]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| @@ -0,0 +1,73 @@ | |||
| version: 1 | |||
There was a problem hiding this comment.
3. Observability standard bypasses validation 🐞 Bug ☼ Reliability
standards/observability.yaml is not loaded by scripts/validate.py, so invalid YAML or broken observability declarations can merge while CI remains green. The simulator also never consumes it, despite the PR treating its views and control channel as executable specifications.
Agent Prompt
## Issue description
The newly introduced observability standard is absent from the validator's standard-file parsing list and from relevant semantic checks. CI therefore does not protect this standard from syntax errors or dangling mechanism/schema references.
## Issue Context
A prior accepted review established that new standard YAML files must be loaded by `validate.py` so parse failures cannot escape CI.
## Fix Focus Areas
- standards/observability.yaml[1-73]
- scripts/validate.py[75-85]
- scripts/simulate-wave.py[499-520]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| target_states: 卡生命周期的任何非终态(终态=merged/archived/aborted) | ||
| reason_routing: # reason 决定善后,不是人决定 | ||
| need_gone: 需求消失 → 卡 archived(作废);无善后 | ||
| spec_wrong: 规格错了 → 产 escape 类 finding 退 backlog(卡回炉——接 escape 回路: |
There was a problem hiding this comment.
4. Abort terminal state conflicts 🐞 Bug ≡ Correctness
Abort is declared irreversible with aborted as a terminal lifecycle state, but need_gone and superseded route the same card to the separate terminal state archived. Implementers cannot determine whether card.aborted ends in aborted, transitions again to archived, or never uses the newly added aborted state.
Agent Prompt
## Issue description
The abort contract defines `aborted` as terminal while two reason routes set the original card to `archived`, which is independently terminal. The resulting state transition is ambiguous.
## Issue Context
The lifecycle lists `archived` and `aborted` as distinct states and describes `aborted` as owner termination. Clarify whether all aborts finish in `aborted` with reason-specific side effects, or formally define any subsequent archival transitions and their events.
## Fix Focus Areas
- standards/flows.yaml[99-108]
- standards/team-collaboration.yaml[295-303]
- standards/team-collaboration.yaml[271-273]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
可观测与控制一体两面:同一事件流的读端(TUI/agent 查询)与写端(控制动词), 不新建设施,不出现"看得到控不了、控了看不到"。 - standards/observability.yaml:原则(read_only/attention_first/provenance)+ TUI 六视图(attention 默认页=等决策队列+SLA 倒计时/now/wave/budget/backlog/trace)+ log 三级受众投影(owner/机制/审计——同一事件流三个读端投影,非三套日志)+ ask 检索契约(researcher as_tool,回答必附引用,与 TUI 同源同投影) - flows.yaml#owner_control:pause=停表停预算(wall_clock 不计暂停,usd 已花照记); abort=不可逆+reason 必填,reason_routing 三路善后(need_gone 作废/spec_wrong 退 backlog 接 escape 回路/superseded 关联新卡);不变式:控制动词=事件不是凭据 (TUI 无数据层写凭据);注意力账本零新增(账本管系统等 owner,owner 主动出手不入账) - team-collaboration:卡生命周期 +paused/aborted 状态(owner_control_ref 单一真源 引用);event_producers +card.paused/resumed/aborted(owner 经平台通道); services +tui 机制(视图物化+控制入站——fail-closed 注册);interface_gateway duty 扩展 ask 路由与控制动词入站 验证:validate OK + simulate 12 场景全通 + 语义链核对脚本通过(六视图/三事件有主/ tui 注册/paused+aborted 状态)。基于 PR-A 分支(#11 合并后自然 rebase)。
a09922c to
02e2daf
Compare
1b88752 to
383f1c3
Compare
…12) (#14) * feat: owner 控制与可观测性——pause/abort + TUI 视图 + log 分级(ADR-0013 PR-B) 可观测与控制一体两面:同一事件流的读端(TUI/agent 查询)与写端(控制动词), 不新建设施,不出现"看得到控不了、控了看不到"。 - standards/observability.yaml:原则(read_only/attention_first/provenance)+ TUI 六视图(attention 默认页=等决策队列+SLA 倒计时/now/wave/budget/backlog/trace)+ log 三级受众投影(owner/机制/审计——同一事件流三个读端投影,非三套日志)+ ask 检索契约(researcher as_tool,回答必附引用,与 TUI 同源同投影) - flows.yaml#owner_control:pause=停表停预算(wall_clock 不计暂停,usd 已花照记); abort=不可逆+reason 必填,reason_routing 三路善后(need_gone 作废/spec_wrong 退 backlog 接 escape 回路/superseded 关联新卡);不变式:控制动词=事件不是凭据 (TUI 无数据层写凭据);注意力账本零新增(账本管系统等 owner,owner 主动出手不入账) - team-collaboration:卡生命周期 +paused/aborted 状态(owner_control_ref 单一真源 引用);event_producers +card.paused/resumed/aborted(owner 经平台通道); services +tui 机制(视图物化+控制入站——fail-closed 注册);interface_gateway duty 扩展 ask 路由与控制动词入站 验证:validate OK + simulate 12 场景全通 + 语义链核对脚本通过(六视图/三事件有主/ tui 注册/paused+aborted 状态)。基于 PR-A 分支(#11 合并后自然 rebase)。 * fix: PR-B ADR 引用顺延 0014(随 PR-A 重编号) * chore: retrigger PR sync
解决什么
"可观测性建立起来:有人直接 TUI 查看,有通过询问 agent 查询了解;任务可以暂停、终止;log 需要清晰。"(ADR-0013 系列 PR-B)
核心设计:可观测与控制是一体两面
同一事件流的读端(TUI 视图 / agent 代读)与写端(控制动词),同一入口(TUI/interface-gateway)。不新建设施——分开建设会出现"看得到的状态控不了、控了的动作看不到"。
变更
1. observability.yaml(新建)
2. owner_control(flows.yaml 新节)
3. team-collaboration 对齐
卡生命周期 +paused/aborted 状态(owner_control_ref 单一真源);event_producers +card.paused/resumed/aborted(owner 经平台通道);services +tui 机制注册(fail-closed——机制必须有主);interface_gateway duty 扩展(ask 路由+控制入站)
验证
validate OK + simulate 12 场景全通 + 语义链核对(六视图/三事件有主/tui 注册/状态扩展)。
系列后续:PR-C 场景声明化 + 模拟器引擎化 + CT scenario 链接(测试底层方法统一)。