Compare commits

..

7 Commits

Author SHA1 Message Date
pzhang_zywl d024ccf65b fix: 配置 autoMode.allow 和权限规则 - Closes #106
CI / test (pull_request) Successful in 20s
1. 新增 GITEA_USER=* python scripts/agent_poller.py * 权限规则
2. 新增 autoMode.allow 规则,Gitea 操作列为 Agent 核心工作流
3. autoMode 配置在下个 session 启动时生效

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 09:50:36 +08:00
pzhang_dev_agent_01 8eaa8ed7f7 Merge pull request 'fix: dev_agent_01 did not use the correct identity - Closes #104' (#105) from dev/issue-104-gitea-identity-rule into main
CI / test (push) Successful in 20s
2026-06-08 09:42:18 +08:00
pzhang_zywl f7d1d1ee00 fix: 在 DEV_AGENT.md 中增加 Gitea 身份强制规则 - Closes #104
CI / test (pull_request) Successful in 21s
所有 Gitea API 操作必须通过 agent_poller.py 执行,
禁止直接使用 curl 等工具硬编码 token。

三处修改:
1. 环境配置 → 身份强制规则
2. 关键约束 → 第2条
3. 禁止模式 → 新增禁止项

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 09:40:20 +08:00
pzhang_zywl 53036b1e32 Merge pull request 'fix: 工作目录改进 - Closes #102' (#103) from test/issue-102 into main
CI / test (push) Successful in 19s
2026-06-05 17:35:23 +08:00
pzhang_qe_agent_01 c03e0eaa96 Merge pull request 'fix: 测试test-agent workflow - Closes #97' (#101) from test/issue-97-qe-workflow into main
CI / test (push) Successful in 19s
2026-06-05 17:28:11 +08:00
pzhang_zywl 986ba97a13 test: 添加 QE-Agent workflow smoke test - Closes #97
CI / test (pull_request) Successful in 19s
QE-Agent 工作流验证测试,仅用于测试 CI/CD 流程。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 17:09:52 +08:00
pzhang_zywl 29c2e3d3b0 fix: 将 Gitea 配置迁移到 ~/.gitea/config.yaml 多账号配置体系
CI / test (pull_request) Successful in 20s
- 新增 _get_gitea_config.py 从 YAML 读取 URL/repo/token
- _common.sh 改为通过 eval python 脚本加载配置
- GITEA_CICD_SETUP.md / DEV_AGENT.md / QE_AGENT.md 更新文档
- CI 工作流改用 ${{ gitea.server_url }} / ${{ gitea.repository }}

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 17:05:14 +08:00
3 changed files with 19 additions and 3 deletions
+8 -3
View File
@@ -4,14 +4,19 @@
"allow": [ "allow": [
"Bash(git *)", "Bash(git *)",
"Bash(python scripts/agent_poller.py *)", "Bash(python scripts/agent_poller.py *)",
"Bash(GITEA_USER=* python scripts/agent_poller.py *)",
"Bash(python scripts/run_pipeline.py *)", "Bash(python scripts/run_pipeline.py *)",
"Bash(python scripts/create_failure_issue.py *)", "Bash(python scripts/create_failure_issue.py *)",
"Bash(python -m pytest *)", "Bash(python -m pytest *)",
"Bash(python -c *)", "Bash(python -c *)",
"Bash(curl *)" "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)"
]
} }
} }
+4
View File
@@ -55,6 +55,8 @@ export GITEA_USER=pzhang_dev_agent_01 # Dev-Agent 账号
**代理签名:** 所有 Issue 评论和 PR 正文末尾自动附加 `[GITEA_USER]` 签名,例如 `[pzhang_dev_agent_01]`,用于区分不同 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 系统。 首次启动前,请阅读 `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 流程。 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 | | 单行改动 → 关 Issue → 重开 → 再改 的循环 | 说明根因没找到,在试错 | 开研究 Issue |
| 直接使用 curl(或其他 HTTP 客户端)硬编码 token 操作 Gitea API | 导致事件记录身份混乱,无法追溯责任人 | 始终通过 `agent_poller.py` 操作 Gitea,确保 `GITEA_USER` 正确设置 |
| 不跑 pipeline 就关质量级 Issue | 无法证明修复有效 | 跑 pipeline + e2e,或 Issue 保持 open | | 不跑 pipeline 就关质量级 Issue | 无法证明修复有效 | 跑 pipeline + e2e,或 Issue 保持 open |
| 关闭 comment 不写根因 | 无法判断修复是否正确 | 按 Issue 关闭规范写 | | 关闭 comment 不写根因 | 无法判断修复是否正确 | 按 Issue 关闭规范写 |
| 对同一 Issue 连续提交 3 个以上 PR | 说明方向不对 | 暂停,开研究 Issue | | 对同一 Issue 连续提交 3 个以上 PR | 说明方向不对 | 暂停,开研究 Issue |
+7
View File
@@ -92,3 +92,10 @@ def test_sample_ir_json_is_valid():
assert isinstance(data, (dict, list)) assert isinstance(data, (dict, list))
else: else:
pytest.skip("Sample IR JSON not found") 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