✨ feat(reviewer): gate deep review on repository scope - #33
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62eb99e6e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
07703ac to
cd93274
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd9327499b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
cd93274 to
539557b
Compare
539557b to
df1697e
Compare
df1697e to
ee325de
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee325de18b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| manager = WorktreeManager(config) | ||
| manager.ensure_base_workspace(workspace) | ||
| manager.fetch_revision(workspace) |
There was a problem hiding this comment.
Serialize inventory access to the shared repository
With the default root concurrency greater than one, two reviews for different PRs in the same repository can enter build_inventory concurrently, but each call constructs a separate WorktreeManager, whose workspace locks are instance-local. On a cold repository both calls can therefore attempt to clone into the same local_path, causing one review to fail; subsequent fetches also bypass the shared manager used by AgentService. Reuse a shared manager and hold its workspace lock across inventory preparation instead of hiding shared-repository mutation behind a per-call instance.
AGENTS.md reference: AGENTS.md:L6-L6
Useful? React with 👍 / 👎.
| raise ValueError("review scope requires a repository") | ||
| manager = WorktreeManager(config) | ||
| manager.ensure_base_workspace(workspace) | ||
| manager.fetch_revision(workspace) |
There was a problem hiding this comment.
Fetch the pinned head rather than only the moving PR ref
When a PR is force-pushed after _fetch_pr records head H1 but before inventory preparation, fetch_revision fetches the moving pull/<n>/head ref at H2 and returns without ensuring H1 exists locally. The subsequent rev-parse of H1 then fails the entire review instead of producing the promised pinned inventory; fetch or verify the recorded head SHA explicitly, as the clone path already does for pinned revisions.
AGENTS.md reference: AGENTS.md:L4-L4
Useful? React with 👍 / 👎.
| "clarify": { "type": "integer", "minimum": 0 } | ||
| } | ||
| }, | ||
| "groups": { "type": "array", "items": { "$ref": "#/$defs/scopeGroup" } } |
There was a problem hiding this comment.
Bind approved dashboard scope to the validated report
Fresh evidence after requiring scope for approval is that an approved document can still provide an arbitrary 64-character inventory_id, zero counts, and an empty groups array; this schema accepts it and the template renders a clean approval even when the service-persisted plan contains relocated or clarification paths. The manually copied dashboard value must be checked against the authoritative service report—or generated from it—rather than maintaining an independently editable second scope state.
AGENTS.md reference: AGENTS.md:L8-L8
Useful? React with 👍 / 👎.
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
ee325de to
29be65a
Compare
Motivation
审查把一次性验收材料的“有助于证明功能”误当成“值得长期随仓库维护”,于是继续逐行修补 demos、实验日志和模拟器测试,消耗大量深审资源,却没有提出移出这些材料。
Changes
在现有 review task-control 中增加提交范围决策:程序从固定 Git head/base 生成完整文件清单,Agent 依据需求、调用方和仓库规则给出接收、移出或待确认及替代去向。程序拒绝遗漏、重复和过期清单;所有深审角色及其嵌套子任务只能领取已接收范围。独立设计继续使用同一 merge-base,作者文件分配不进入其设计 prompt。
同一 gh-slate 展示各范围的决策和依据;存在移出或待确认项时拒绝 approved。范围报告按被审 head 存储,模板拒绝旧 head 的报告;恢复子任务前校验固定清单、接收范围和版本。非 UTF-8 路径无损编码后经过 JSON、持久化和派发。常规审查继续异步交付已接收范围。测试审查先确认实际执行了生产代码,区分模拟器自身测试与生产回归证据。有效的无变化 follow-up 保持静默。
此门禁控制子任务派发,不隔离 Agent 的任意文件读取,也不替代 Agent 对维护必要性的语义判断;并非禁止所有 demos。
Validation
4c137803做离线验证:51 个文件统计与 GitHub 一致;人工基于本次调查提交范围判断后,得到接收 20、移出 28、待确认 3。没有把此结果宣称为模型自动判断,也没有发布新 review。Related Issues
由 redai-studio/Relax#370 的验收材料审查问题触发。接在 #31 之后。