Repository navigation
feat(governance): bug form+transitions bug 流状态(W3-C1 .github#218,ADR-0064) #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Bug 上报(reproduce 流水线) | ||
| description: 提交一个 bug——打 bug 标签即进 reproduce 阶段(免签):env-gate + 哨兵自证 + 三值判定(W3-C1 .github#218,ADR-0064) | ||
| labels: [bug] | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: | | ||
| Bug 流铁律:**复现前置,签署点后移**(宪法 §3)——区别于 Feature 流的签署前置, | ||
| 本表单提交即触发机器复现,无签署门。判定协议 = SWT-bench F→P 扩展,三值: | ||
| `reproduced`(base 上稳定 fail,若有 fix 候选则其上 pass)→ 产 failing repro test 待 owner 签; | ||
| `cannot-reproduce`(base 上 pass)→ **不关单**,保留人裁; | ||
| `inconclusive`(环境错/超时 30min/翻转)→ 换新环境重试一次,仍不可判定转人裁。 | ||
|
Comment on lines
+8
to
+12
|
||
| 同指纹(仓+症状签名+关键栈 sha256)二次上报自动绕过重复 reproduce。 | ||
| 注意:**字段标题是机器解析契约**——与 CI-Workflows 仓 `pipeline/bugflow/bugflow.py` | ||
| 的字段常量逐字对齐,改任一侧须两仓同步并引用 ADR-0064。 | ||
| - type: input | ||
| id: repo | ||
| attributes: | ||
| label: 受影响的仓(owner/name) | ||
| description: 如 Cloudbird-Software/CI-Workflows | ||
| validations: | ||
| required: true | ||
| - type: input | ||
| id: version | ||
| attributes: | ||
| label: 版本 / commit | ||
| description: 出问题时所在版本号或 commit SHA | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: symptom | ||
| attributes: | ||
| label: 症状签名(一句话 + 关键报错) | ||
| description: 一句话症状 + 最关键的报错文本——与仓、关键栈一起参与同指纹去重(sha256) | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: stack | ||
| attributes: | ||
| label: 关键栈(可选) | ||
| description: 栈顶关键帧(去路径/随机量后的稳定部分)——提高指纹区分度 | ||
| - type: textarea | ||
| id: steps | ||
| attributes: | ||
| label: 复现步骤 | ||
| description: 逐步操作;能写成命令/测试的尽量写进"机器复现用例" | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: expected | ||
| attributes: | ||
| label: 期望结果 | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: actual | ||
| attributes: | ||
| label: 实际结果 | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: env | ||
| attributes: | ||
| label: 环境指纹(可选) | ||
| description: 已知则填——与复现环境对账,不匹配判"不可判定"而非"证伪"(ADR-0064 决策 2) | ||
| placeholder: | | ||
| image: sha256:…(基础镜像 digest) | ||
| lockfile:requirements.txt: sha256:…(依赖 lockfile hash) | ||
| - type: input | ||
| id: repro_cmd | ||
| attributes: | ||
| label: 机器复现用例(可选) | ||
| description: "单行命令或测试引用(如 pytest tests/test_x.py::test_y);多步用例先落脚本文件后在此引用。用例需输出 REPRO_OUTCOME: pass|fail 标记断言语义" | ||
|
Comment on lines
+70
to
+73
Comment on lines
+72
to
+73
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,22 @@ version: 1 | |
| # schema: | ||
| # from_state = 转移前状态(当前 issue 无 state:* 标签时视为 ir-draft) | ||
| # event = label:state:<name> | comment:/start | comment:/claim | comment:/retry | ||
| # | label:<非state判定标签>(W3-C1 Bug 流扩展:label:bug/label:reproduced | ||
| # ——判定标签驱动的转移,见 B1/B2 注) | ||
| # to_state = 转移后状态(conductor 以 App 身份换标签:移除 from、置上 to) | ||
| # action = invoke:spec-author | claim | noop(W0 全集) | ||
| # guard = 布尔表达式;变量白名单:sender_role(owner|agent|none)、 | ||
| # author_association(OWNER|MEMBER|COLLABORATOR|CONTRIBUTOR|NONE)、 | ||
| # label_set(当前标签名集合) | ||
| # 未列出的 (from_state, event) 组合 = 禁止转移(conductor no-op;重复投递/ | ||
| # 跳态/反向天然被 from_state 匹配拒绝——幂等键 {issue, from, to} 的落盘形态)。 | ||
| states: [ir-draft, ir-signed, spec, redteam, wave-planned, ready, in-progress, quarantine, needs-human, done] | ||
| # W3-C1(ADR-0064):append bug 流状态 bug/reproduced/fixed 与转移 B1-B5。 | ||
| # Bug 流与 Feature 流的差异:入口免签(bug 标签即 reproduce 阶段)、 | ||
| # 判定标签(reproduced/cannot-reproduce/inconclusive)是事实标签而非状态—— | ||
| # cannot-reproduce 不产生状态转移(保留人裁,ADR-0064 决策 4); | ||
| # bugflow 的状态写序=先移旧态再置新态(防双 state 并存窗口触发 | ||
| # conductor 多状态 abort)。 | ||
| states: [ir-draft, ir-signed, spec, redteam, wave-planned, ready, in-progress, quarantine, needs-human, done, bug, reproduced, fixed] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Unprovisioned new state labels The PR introduces new states (bug/reproduced/fixed) that imply new labels (state:bug, state:reproduced, state:fixed), but these labels are not in governance/expected-state.json, so governance/apply.sh won’t create them across repos. Any automation that tries to add these labels via the GitHub API will fail when the label doesn’t exist, blocking bug-flow state transitions. Agent Prompt
|
||
|
|
||
| transitions: | ||
| - id: T1 # 主通路:owner/agent 打签署标签 → 进 spec 阶段(BEH-01)。 | ||
|
|
@@ -42,3 +50,43 @@ transitions: | |
| to_state: ready | ||
| action: noop | ||
| guard: "sender_role in ['owner', 'agent']" | ||
| # ---------- Bug 流(W3-C1 .github#218 / ADR-0064,宪法 §3)---------- | ||
| # 执行者:CI-Workflows pipeline/bugflow(bug-reproduce.yml 以 App 身份写标签)。 | ||
| # conductor 对 label:bug/label:reproduced 等非 state 标签事件静默 no-op—— | ||
| # B1/B2 是状态机声明(唯一转移定义源原则:bug 流的合法转移也必须落表), | ||
| # 由 bugflow 执行转移本体;B5 的人工/流水线双路径均满足 from_state 幂等。 | ||
| - id: B1 # Bug 流入口(免签——区别于 Feature 流签署前置):bug form 落 bug | ||
| # 标签 → 进 reproduce 阶段(state:bug)。无 state 标签按约定视为 ir-draft。 | ||
| from_state: ir-draft | ||
| event: label:bug | ||
| to_state: bug | ||
| action: noop | ||
| guard: "'bug' in label_set" | ||
| - id: B2 # 三值判定之【复现】:base 稳定 fail(+fix 候选 pass)→ reproduced | ||
| # 标签 + state:reproduced;reproduced 后产 failing repro test 待 owner 签 | ||
| # (锁定 ADR-0061 → 修复 → 关卡 → 合并)。证伪(label:cannot-reproduce) | ||
| # 不在此列:不转移状态、不关单——保留人裁。 | ||
| from_state: bug | ||
| event: label:reproduced | ||
| to_state: reproduced | ||
| action: noop | ||
| guard: "sender_role in ['owner', 'agent']" | ||
| - id: B3 # 修复合入:owner/agent 置 state:fixed(fix PR 的合并事实回写 bug 单) | ||
| from_state: reproduced | ||
| event: label:state:fixed | ||
|
Comment on lines
+74
to
+76
|
||
| to_state: fixed | ||
| action: noop | ||
| guard: "sender_role in ['owner', 'agent']" | ||
| - id: B4 # 终态关单:fixed → done(owner/agent 置 state:done 后关单) | ||
| from_state: fixed | ||
| event: label:state:done | ||
| to_state: done | ||
| action: noop | ||
| guard: "sender_role in ['owner', 'agent']" | ||
| - id: B5 # 三值判定之【不可判定】兜底:环境错/超时/翻转,换新环境重试一次仍 | ||
| # 不可判定 → label:inconclusive + state:needs-human(转人裁) | ||
| from_state: bug | ||
| event: label:state:needs-human | ||
| to_state: needs-human | ||
| action: noop | ||
| guard: "sender_role in ['owner', 'agent']" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Issue form not ci-validated
🐞 Bug⚙ MaintainabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools