合并请求审查
- 作者仓库星标 184,730
- 作者仓库 AutoGPT
- 领域
- 安全
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @Significant-Gravitas · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# PR Review
## Find the PR
```bash
gh pr list --head $(git branch --show-current) --repo Significant-Gravitas/AutoGPT
gh pr view {N}
```
## Read the PR description
Before reading code, understand the **why**, **what**, and **how** from the PR description:
```bash
gh pr view {N} --json body --jq '.body'
```
Every PR should have a Why / What / How structure. If any of these are missing, note it as feedback.
## Read the diff
```bash
gh pr diff {N}
```
## Fetch existing review comments
Before posting anything, fetch existing inline comments to avoid duplicates:
```bash
gh api repos/Significant-Gravitas/AutoGPT/pulls/{N}/comments --paginate
gh api repos/Significant-Gravitas/AutoGPT/pulls/{N}/reviews
```
## What to check
**Description quality:** Does the PR description cover Why (motivation/problem), What (summary of changes), and How (approach/implementation details)? If any are missing, request them — you can't judge the approach without understanding the problem and intent.
**Correctness:** logic errors, off-by-one, missing edge cases, race conditions (TOCTOU in file access, credit charging), error handling gaps, async correctness (missing `await`, unclosed resources).
**Security:** input validation at boundaries, no injection (command, XSS, SQL), secrets not logged, file paths sanitized (`os.path.basename()` in error messages).
**Code quality:** apply rules from backend/frontend CLAUDE.md files.
**Architecture:** DRY, single responsibility, modular functions. `Security()` vs `Depends()` for FastAPI auth. `data:` for SSE events, `: comment` for heartbeats. `transaction=True` for Redis pipelines.
**Testing:** edge cases covered, colocated `*_test.py` (backend) / `__tests__/` (frontend), mocks target where symbol is **used** not defined, `AsyncMock` for async.
## Output format
Every comment **must** be prefixed with `🤖` and a criticality badge:
| Tier | Badge | Meaning |
|---|---|---|
| Blocker | `🔴 **Blocker**` | Must fix before merge |
| Should Fix | `🟠 **Should Fix**` | Important improvement |
| Nice to Have | `🟡 **Nice to Have**` | Minor suggestion |
| Nit | `🔵 **Nit**` | Style / wording |
Example: `🤖 🔴 **Blocker**: Missing error handling for X — suggest wrapping in try/except.`
## Post inline comments
For each finding, post an inline comment on the PR (do not just write a local report):
```bash
# Get the latest commit SHA for the PR
COMMIT_SHA=$(gh api repos/Significant-Gravitas/AutoGPT/pulls/{N} --jq '.head.sha')
# Post an inline comment on a specific file/line
gh api repos/Significant-Gravitas/AutoGPT/pulls/{N}/comments \
-f body="🤖 🔴 **Blocker**: <description>" \
-f commit_id="$COMMIT_SHA" \
-f path="<file path>" \
-F line=<line number>
```
章节与文件索引
按说明文件中的顺序排列。
阅读 PR 描述
获取现有评论意见
要检查什么
输出格式
发表内嵌评论
文件/命令 -> await · os.path.basename() · Security() · Depends() · data: · : comment · transaction=True · *_test.py
内容校验值 -> 55cad1260d20
当前原文的自动摘译,尚未人工审校。
阅读 PR 描述
在阅读代码之前,从 PR 描述中了解原因、内容和方式:每个 PR 都应该有一个 Why / What / How 结构。如果缺少其中任何一个,请将其记为反馈。
获取现有评论意见
在发布任何内容之前,请获取现有的内联评论以避免重复:
要检查什么
描述质量:PR 描述是否涵盖原因(动机/问题)、内容(变更摘要)和如何(方法/实施细节)?如果缺少任何内容,请请求他们 - 如果不了解问题和意图,您就无法判断该方法。正确性:逻辑错误、相差一、丢失边缘情况、竞争条件(文件访问中的 TOCTOU、信用计费)、错误处理差距、异步正确性(缺少
await、未关闭的资源)。输出格式
每条评论都必须以
🤖为前缀,并带有关键性徽章: Tier · 徽章 · 含义拦截器 ·🔴 Blocker· 合并前必须修复应该修复 ·🟠 Should Fix· 重要改进值得拥有 ·🟡 Nice to Have· 小建议发表内嵌评论
对于每个发现,在 PR 上发布内联评论(不要只写本地报告):