Files
document_analyzer/scripts/start_qe_agent.sh
T
pzhang_zywl ae0ff5d4de
CI / test (pull_request) Successful in 8s
test: 统一 Agent Issue 轮询 label 体系与创建规则 - Closes #40
- test-dev → test-code:QE-Agent 一致化 label
- Dev-Agent 新增 product-code label + [product] 前缀规则
- agent_poller.py 新增 create-issue action
- QE/Dev Agent 轮询改为多轮递进:label → title 前缀 → 无标识分析

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 14:16:51 +08:00

27 lines
1.3 KiB
Bash

#!/usr/bin/env bash
# QE-Agent 启动脚本 — 单次任务 + 互动轮询 两种模式
# 用法: bash scripts/start_qe_agent.sh
# 前置: 在 scripts/.env 中设置 GITEA_API_TOKEN
set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/_common.sh"
# Agent 标识: qa-MMDD-HHmm,可通过环境变量覆盖
export QE_AGENT_ID="${QE_AGENT_ID:-qa-$(date +%m%d-%H%M)}"
banner "QE"
require_token
launch_agent \
"agents/QE_AGENT.md" \
"QE-Agent" \
"执行一次 Issue 巡检(单次任务,不要用 /loop):
1. python scripts/agent_poller.py --action list --labels test-code 检查 test-code Issue
2. python scripts/agent_poller.py --action list --labels acceptance-failure 检查 acceptance-failure Issue
3. test-code Issue:分析 → 开发验收测试到 tests/acceptance/ → pytest 本地验证 → commit('test:' 前缀, Closes #N) → push → create-pr → 等 CI → merge-pr
4. acceptance-failure Issue:分析失败原因 → 测试问题则修复测试 → 管道问题则开 test-code issue 跟踪
5. 所有 Issue 处理完毕后报告汇总并退出。" \
"现在开始工作。使用 /loop 10m 开启轮询:每 10 分钟检查 test-code 和 acceptance-failure 标签 Issue,有则走完整闭环(分析→开发测试→pytest→push→PR→CI→merge),无则报告 main healthy。保持对话开放。"