Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .claude/skills/review-single-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ After reading the full skill and all files under `book/guideline/`, create a rev

When requirements overlap, apply the stricter rule. If skipping a requirement is necessary because it is inapplicable or impossible, record the concrete reason and evidence in the review body or user summary.

## Offline Benchmark Mode

Use this mode only when the skill is invoked with the exact `offline-benchmark` argument and the
repository contains `.agent-review-context/reviewer.md`. The context file is the authoritative
environment and output contract for this mode. If either condition is absent, follow the normal
online workflow in the rest of this skill.

In offline benchmark mode, treat the committed change from `bench-base` to `HEAD` as the one change
under review. Read the complete skill, `AGENTS.md`, every file under `book/guideline/`, the offline
contract, and the supplied output schema before judging the change. Apply the review-focus,
test-quality, blocking-finding, hardware/ABI, security/soundness, maintainability, and documentation
requirements from this skill to the local diff and relevant in-repository context.

The benchmark repository intentionally has no live PR identity. Mark PR metadata and intake, review
threads, remote CI, related-open-PR searches, worktree creation, merge-conflict repair, network
semantic-source research, command execution for validation, GitHub review submission, reviewer
assignment, and remote cleanup as not applicable. Do not infer a PR number, inspect paths outside
the repository, access the network or GitHub, modify files, create commits or branches, or run
builds and tests. Use only read-only repository inspection and the Git history/diff commands allowed
by the harness.

Return only the JSON object required by `.agent-review-context/review.schema.json`. Report findings
introduced by `bench-base..HEAD`, anchor each finding to a changed line on the `HEAD` side, and use
an empty `findings` array when no actionable issue exists. Do not submit or draft GitHub-facing
review text in this mode.

## Goal

Perform a focused review of exactly one PR, using an isolated worktree and local validation before submitting a GitHub review. The review must also decide whether the PR duplicates existing base-branch functionality or overlaps with other open PRs. After the review decision is submitted, assign suitable human reviewers from `.github/MAINTAINERS.md` when the PR still needs domain follow-up. The normal outcome is either `APPROVE` when no blocking issue remains, or `REQUEST_CHANGES` with Chinese inline comments when the PR has correctness, standards, duplication, test, or CI coverage problems.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
id = "1495-axtask-deferred-wake-local-reschedule"
pr = 1495
title = "修复 axtask:延迟跨核唤醒,避免在远端 on_cpu 上自旋"
remote = "https://github.com/rcore-os/tgoskits.git"
base = "baf4aa42e883b78156011636d189f348409ff4c1"
head = "c74237d2c10754b1341e03f495caafd261cf8b7e"
source = "https://github.com/rcore-os/tgoskits/pull/1495#discussion_r3518853256"
fixed_by = "bf3b71dd4622be7436431ed6138fade0b06955fa"

[[expected]]
id = "axtask-owner-drain-needs-local-reschedule"
path = "os/arceos/modules/axtask/src/run_queue.rs"
line = 1125
severity = "major"
description = "owner CPU 清空 deferred wake 时总是调用 kick_remote_cpu(target)。select_wake_run_queue 可能再次选择同一个 owner CPU 作为 target,而这种 self-kick 不会产生作用。因此,可运行任务会丢失原始远端唤醒者提供的 reschedule 通知,并可能在 owner 进入 idle 后一直留在队列中,直到后续 tick 才得到调度。"
match_if = "评审必须指出:deferred-wake drain 在 target 为当前或 owner CPU 时会丢失必要的调度通知,因为 kick_remote_cpu 对 self-target 无效;并要求显式触发本地 reschedule,或用等价机制保留 handoff 状态。"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
id = "1505-ipv6-pktinfo-family-validation"
pr = 1505
title = "修复 Starry:支持只读 mmap 的 fdatasync 和 IP_PKTINFO/IPV6 pktinfo 套接字选项"
remote = "https://github.com/rcore-os/tgoskits.git"
base = "882e07fd2d1581a8a9882d397946db25a974bd15"
head = "dfde82ef6b58b6944613d1421bec297327e5f7da"
source = "https://github.com/rcore-os/tgoskits/pull/1505#discussion_r3526033263"
fixed_by = "0ec97c6b71dd63783db596f599b97b4142f31851"

[[expected]]
id = "ipv6-pktinfo-bypasses-socket-family-check"
path = "os/StarryOS/kernel/src/syscall/net/opt.rs"
line = 521
severity = "major"
description = "新的 IPV6_RECVPKTINFO/IPV6_PKTINFO 快速路径在调用 ensure_ipv6_socket 前直接返回成功。因此,AF_INET 套接字可以成功使用 IPPROTO_IPV6 选项;这与 Linux 以及现有 IPv6 选项路径不一致,后者会对地址族不匹配返回 ENOPROTOOPT。getsockopt 路径存在同样问题。"
match_if = "评审必须指出:新接受的 IPv6 pktinfo 选项在 set 和/或 get 路径中绕过 IPv6 套接字地址族校验,导致 AF_INET 套接字被错误接受;并要求在成功返回前调用 ensure_ipv6_socket 或执行等价校验。"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
id = "1583-rtl8125-regression-covers-constants-only"
pr = 1583
title = "修复 realtek-rtl8125:通告千兆自协商能力"
remote = "https://github.com/rcore-os/tgoskits.git"
base = "ba27d7b061b47d22b16a53c847b1a4abc2bece71"
head = "214ccd50c9df852efaa74822341294defa92e001"
source = "https://github.com/rcore-os/tgoskits/pull/1583#discussion_r3567595139"
fixed_by = "7b37887e616abdb4b6e98c1e07f533607f51e2b7"

[[expected]]
id = "rtl8125-regression-does-not-exercise-phy-sequence"
path = "drivers/net/realtek-rtl8125/src/hw.rs"
line = 550
severity = "major"
description = "该回归测试只检查新常量之间的关系,从未调用 hw_phy_config,也未观察 PHY 读写。因此,即使删除生产代码中的 MII_CTRL1000 和 MII_BMCR 配置,测试仍会通过,原来的自协商缺陷也会复现。"
match_if = "评审必须指出:新增测试只验证常量,而没有覆盖生产 PHY 配置行为,所以移除新增的页选择、通告和重启序列后测试仍不会失败;并要求通过记录型或 mock PHY 边界,或等价方式建立确定性的生产路径回归测试。"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
id = "1611-axvisor-qemu-timeout-watchdog"
pr = 1611
title = "QEMU:移除 SVM 和 VMX 冒烟测试的显式超时"
remote = "https://github.com/rcore-os/tgoskits.git"
base = "dbbe0e06576fd1446c014d4edea3aa480505b5e9"
head = "6a4a23fe147e02d46c66df1d2fca8269098c2fba"
source = "https://github.com/rcore-os/tgoskits/pull/1611#discussion_r3583879562"
fixed_by = "a1a6ed0ce4ac56e006280cca268973578bd7a89d"

[[expected]]
id = "axvisor-nested-qemu-watchdog-disabled"
path = "test-suit/axvisor/normal/qemu/smoke/qemu-x86_64-svm.toml"
line = 25
severity = "major"
description = "SVM 与 VMX 嵌套虚拟化冒烟配置删掉了仅有的有限 timeout。解析后 QemuConfig.timeout 变为 None,测试运行器因而不再安装 watchdog;一旦 QEMU 启动、guest shell 或结束条件卡住,任务会无限等待。慢速 runner 已可通过提高基线值或 timeout scale 放宽,不应通过删除超时规避失败。"
match_if = "评审必须指出:SVM 和 VMX 配置删除 timeout 会使 watchdog 失效,并导致 QEMU 或 guest shell 卡住时无限等待;同时要求为两者恢复有限超时,允许调整基线值或使用 timeout scale。只泛泛建议增加超时或只讨论测试速度不算命中。"
11 changes: 11 additions & 0 deletions scripts/agent-review-bench/reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Offline Review Contract

This file marks the repository as the isolated `review-single-pr offline-benchmark` environment.

- The review target is the committed change between `bench-base` and `HEAD` in this repository.
- There is no live PR identity or external context. Network access, GitHub operations, paths outside
this repository, writes, builds, and tests are unavailable.
- The current `review-single-pr` skill, `AGENTS.md`, `book/guideline/`, and
`.agent-review-context/review.schema.json` are committed on both sides of the synthetic change and
therefore are review instructions rather than part of the target diff.
- The final response must be only the JSON object required by the supplied output schema.
26 changes: 26 additions & 0 deletions scripts/agent-review-bench/schemas/grade.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": ["matches"],
"properties": {
"matches": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["expected_id", "finding_index", "reason"],
"properties": {
"expected_id": { "type": "string" },
"finding_index": {
"anyOf": [
{ "type": "integer", "minimum": 0 },
{ "type": "null" }
]
},
"reason": { "type": "string" }
}
}
}
}
}
27 changes: 27 additions & 0 deletions scripts/agent-review-bench/schemas/review.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": ["summary", "findings"],
"properties": {
"summary": { "type": "string" },
"findings": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["title", "body", "path", "line", "severity"],
"properties": {
"title": { "type": "string" },
"body": { "type": "string" },
"path": { "type": "string" },
"line": { "type": "integer", "minimum": 1 },
"severity": {
"type": "string",
"enum": ["critical", "major", "minor", "nit"]
}
}
}
}
}
}
Loading