验证修复

GhassenAZZOUZ2026-10-25查看 756复制 1212

WAY 9——通过运行回归测试来验证 bug 已修复。当用户说“verify it”、“verify fix”、“is #142 fixed”、“check the fix”并附带一个或多个 bug 引用(#142、SHOP-142),或说“verify all”以验证所有存在回归测试的未关闭 bug 时使用。

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md2211 chars
---
name: verify-fix
description: 'WAY 9 — verify that a bug is fixed by running its regression test. Use when the user says "verify it", "verify fix", "is #142 fixed", "check the fix" with one or more bug refs (#142, SHOP-142), or "verify all" for every open bug that has a regression test.'
---

# WAY 9 — Verify Fix

Closes the loop WAY 3 opens: `quick-bug` writes
`test-cases/regression/bug-<ref>/Test#01.*`, and this WAY runs it once a fix is
deployed.

Run CLAUDE.md **Step 0** first. The fix has to be deployed on the target
environment, so confirm which one it is.

## Step 1: Gather inputs
- One or more bug refs, or `verify all`: every **open** issue labeled `bug` (`issue.list`) that has a `qa-artifacts/test-cases/regression/bug-<ref>/` folder
- Optional `--close`: close verified bugs without asking each time

## Phase 1: Locate tests
For each ref: `issue.get` (state, labels, title) and look for `qa-artifacts/test-cases/regression/bug-<ref>/`.
- No regression test → offer to write one now (run `test-writer` from the issue's Steps to Reproduce, as `quick-bug` does), or skip it
- The project is `api` if the feature is tagged `@api`, otherwise `e2e`

## Phase 2: Run
Run `test-execution-agent` once per project, passing every regression folder as a scope filter (`test-cases/regression/bug-142/ test-cases/regression/bug-157/`).

## Phase 3: Update each bug (per the `tracker` skill)

| Result | Action |
|---|---|
| `pass` | Comment: `✅ Verified fixed on <env> — regression Test#01 passed in run <RUN_ID>`. Add the `verified` label (remove `fix-failed`). Close the issue if `--close` was given or the user confirms |
| `fail` (assertion) | Comment with the failing step, expected vs actual, and the uploaded screenshot. Add `fix-failed`. **Reopen** the issue if it was closed |
| `fail` (`failure_kind: locator`) | Run `test-healer` first. The UI may have changed with the fix. Re-run after a heal. Report "not healable" as fix-failed |
| `blocked` | No tracker change. Report the reason (environment down, baseline created) |

## Phase 4: Summary
Print a table: ref · title · result · action taken. Save it to `./qa-artifacts/sessions/verify-<YYYY-MM-DD-HH-MM>.md` with the watermark footer.
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧