Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d024ccf65b | |||
| 8eaa8ed7f7 | |||
| f7d1d1ee00 | |||
| 53036b1e32 | |||
| c03e0eaa96 | |||
| 986ba97a13 | |||
| 29c2e3d3b0 |
@@ -4,14 +4,19 @@
|
||||
"allow": [
|
||||
"Bash(git *)",
|
||||
"Bash(python scripts/agent_poller.py *)",
|
||||
"Bash(GITEA_USER=* python scripts/agent_poller.py *)",
|
||||
"Bash(python scripts/run_pipeline.py *)",
|
||||
"Bash(python scripts/create_failure_issue.py *)",
|
||||
"Bash(python -m pytest *)",
|
||||
"Bash(python -c *)",
|
||||
"Bash(curl *)"
|
||||
]
|
||||
},
|
||||
"autoMode": {
|
||||
"allow": [
|
||||
"$defaults",
|
||||
"Running agent_poller.py with GITEA_USER env var to interact with Gitea (comment, close-issue, create-pr, merge-pr, create-issue, reopen-issue)",
|
||||
"Running Gitea API operations via scripts (agent_poller.py, create_failure_issue.py)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ export GITEA_USER=pzhang_dev_agent_01 # Dev-Agent 账号
|
||||
|
||||
**代理签名:** 所有 Issue 评论和 PR 正文末尾自动附加 `[GITEA_USER]` 签名,例如 `[pzhang_dev_agent_01]`,用于区分不同 Agent 的活动。
|
||||
|
||||
**身份强制规则:** 所有 Gitea API 交互**必须**通过 `agent_poller.py` 执行(它会自动按 `GITEA_USER` 选择对应 token)。禁止直接使用 `curl` 或 `urllib` 等工具硬编码 token,即使是临时调试也禁止。身份错误会导致事件记录与责任人追溯混乱。
|
||||
|
||||
首次启动前,请阅读 `GITEA_CICD_SETUP.md` 了解 CI/CD 系统。
|
||||
|
||||
## 启动行为
|
||||
@@ -272,6 +274,7 @@ QE-Agent 开 Issue (qe-feedback / bug / ci-failure)
|
||||
## 关键约束
|
||||
|
||||
1. **任何对 git 管理内容的修改必须走完整流程**:开 Issue → 改动 → 提交 PR → CI 通过 → merge → close Issue。无论是自主轮询还是与用户互动触发的改动,一律遵守此规则。绝不直接改文件而不走 Issue 流程。
|
||||
2. **所有 Gitea API 操作必须通过 `agent_poller.py`**:禁止直接使用 `curl` 或其他 HTTP 客户端硬编码 token 操作 Gitea API。`agent_poller.py` 会自动从 `~/.gitea/config.yaml` 按 `GITEA_USER` 加载对应 token,确保操作身份正确。
|
||||
|
||||
## 提交规范
|
||||
|
||||
@@ -420,6 +423,7 @@ _measure_coverage 将 0/0 维度 rate 算作 0%,拉低 overall 均值。
|
||||
| 禁止模式 | 为什么禁止 | 正确做法 |
|
||||
|----------|-----------|----------|
|
||||
| 单行改动 → 关 Issue → 重开 → 再改 的循环 | 说明根因没找到,在试错 | 开研究 Issue |
|
||||
| 直接使用 curl(或其他 HTTP 客户端)硬编码 token 操作 Gitea API | 导致事件记录身份混乱,无法追溯责任人 | 始终通过 `agent_poller.py` 操作 Gitea,确保 `GITEA_USER` 正确设置 |
|
||||
| 不跑 pipeline 就关质量级 Issue | 无法证明修复有效 | 跑 pipeline + e2e,或 Issue 保持 open |
|
||||
| 关闭 comment 不写根因 | 无法判断修复是否正确 | 按 Issue 关闭规范写 |
|
||||
| 对同一 Issue 连续提交 3 个以上 PR | 说明方向不对 | 暂停,开研究 Issue |
|
||||
|
||||
@@ -92,3 +92,10 @@ def test_sample_ir_json_is_valid():
|
||||
assert isinstance(data, (dict, list))
|
||||
else:
|
||||
pytest.skip("Sample IR JSON not found")
|
||||
|
||||
|
||||
# -- QE-Agent workflow test --------------------------------------------------
|
||||
|
||||
def test_qe_agent_workflow():
|
||||
"""QE-Agent workflow smoke test: basic test discovery works."""
|
||||
assert True
|
||||
|
||||
Reference in New Issue
Block a user