diff --git a/.github/workflows/codex-review-on-assign.yml b/.github/workflows/codex-review-on-assign.yml index 840817b44..01b1fe43b 100644 --- a/.github/workflows/codex-review-on-assign.yml +++ b/.github/workflows/codex-review-on-assign.yml @@ -199,14 +199,28 @@ jobs: 'you. Do not run, build, or install anything from the PR; only read', 'the diff.', '', - 'Flag every bug, risk, and rule violation that is present in the', - 'current diff. Keep each finding short and specific, but never cap', - 'how many findings you report or leave a finding for a later pass.', - 'The severity label ranks findings; the list does not need to.', - 'Also judge whether the PR description contains sufficient testing /', - 'end-to-end test notes; if it lacks a test plan or an e2e record,', - 'flag it as a blocking issue. Reply in the same language the PR', - 'author used in the PR description.', + 'Report only findings you are confident are real in the current', + 'diff, and keep each one short and specific. Do not cap how many', + 'you report: surface every real bug in one pass. Gate severity by', + 'evidence instead — every [P1 blocking] must cite either a', + 'concrete failure scenario (the input or state that triggers it', + 'and the resulting misbehavior) or the exact Code Review Rules', + 'item it breaks. A finding that can cite neither is at most', + '[P2 non-blocking]; a speculative or theoretical risk that needs', + 'an unlikely precondition to trigger is at most [P3 nit]. Use', + 'three severities, spelled out inline in the author\'s language:', + '[P1 blocking] (must fix before merge), [P2 non-blocking]', + '(suggestion), [P3 nit] (minor/optional polish, theoretical edge', + 'case, or coverage deferred to CI).', + 'Also judge whether the PR description documents sufficient', + 'testing. A PR that changes runtime behavior (beyond a docs-only', + 'or tests-only diff) needs an end-to-end / real-CLI record; flag', + 'its absence as [P1 blocking]. A docs-only or tests-only PR needs', + 'no e2e record — do not flag it for that. Do NOT require a full', + 'provider x agent matrix: one representative real-CLI run suffices,', + 'and missing extra-provider/agent coverage the author flagged as', + 'untestable here or deferred to CI is at most [P3 nit]. Reply in', + 'the same language the PR author used in the PR description.', '', 'Earlier passes of this review raised the findings below. A finding', 'already fixed in the current diff is resolved: say so, but do not', diff --git a/AGENTS.md b/AGENTS.md index d159c3713..08e569325 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,9 @@ TypeScript, Node 20+, tsup (ESM), Vitest. Commands: `npm run build`, `npx tsc -- ## PR 前测试 -`npm run build` 后用真实 CLI 对本次改动做完整端到端验证(不能只跑 type check / unit test)。Test Plan 每一项必须实际通过,测试报告贴进 PR。 +改动运行时行为的 PR(docs-only / tests-only 之外),`npm run build` 后必须用真实 CLI 对本次改动做端到端验证,不能只跑 type check / unit test;**一次代表性的 real-CLI 运行即可**,把实际通过的验证记录贴进 PR。docs-only / tests-only 的改动无需 e2e 记录。 + +不要求覆盖下面的完整 provider × agent 矩阵——额外 provider / agent 的覆盖交给 CI,或在本地环境不具备时说明即可: - Agent:Claude、Codex、CodeBuddy、OpenCode - Provider:`git`、`gitlab`、`github` @@ -34,11 +36,27 @@ shared state, list every reader and every writer. ## Code Review Rules -- The PR description must document sufficient testing, including an - end-to-end / real-CLI verification record — not only unit tests or type - checks. Flag a PR whose description lacks a test plan or an e2e record. - A test record naming an older commit than the head is a note, not a blocking - finding; the body may have been edited after the review pass started. +- The PR description must document sufficient testing. For a PR that changes + runtime behavior (anything beyond a docs-only or tests-only diff), that + includes an end-to-end / real-CLI verification record, not only unit tests + or type checks — flag such a PR that lacks one as `[P1 blocking]`. A + docs-only or tests-only PR needs no e2e record; do not flag it for that. + Do NOT require a full provider × agent matrix — one representative real-CLI + run is enough. Missing coverage of extra providers (`gitlab`/`github`) or + agents (`Codex`/`CodeBuddy`/`OpenCode`) is at most `[P3 nit]` when the author + has flagged it as untestable in this environment or deferred to CI, never + `[P1 blocking]`. A test record naming an older commit than the head is a + note, not a blocking finding; the body may have been edited after the review + pass started. +- Do not over-review. Report only findings you are confident are real in the + current diff. Do not cap how many findings you report: every real bug should + surface in one pass, not be deferred to a later one. Instead, gate severity + by evidence — every `[P1 blocking]` must cite either a concrete failure + scenario (the input or state that triggers it and the resulting misbehavior) + or the exact `## Code Review Rules` item it breaks. A finding that can cite + neither is at most `[P2 non-blocking]`; a speculative or theoretical risk + that needs an unlikely precondition to trigger is at most `[P3 nit]`. Never + restate a finding already resolved in the current diff. - Reject over-engineering. Favor the smallest code that solves the problem; flag speculative abstractions, unused flexibility or config, error handling for cases that cannot occur, and new CLI commands added where an existing @@ -46,8 +64,9 @@ shared state, list every reader and every writer. - Changes must be surgical. Every changed line should trace directly to the PR's stated goal; flag unrelated drive-by edits. - Label every finding with an explicit severity a first-time reader can - understand — never a bare `P1`/`P2` code. Keep the `P` marker but spell out - what it means inline on each finding, using the PR author's language: - `[P1 blocking]` for issues that must be fixed before merge, and - `[P2 non-blocking]` for suggestions that do not block merge. (In Chinese, - `[P1 阻断]` / `[P2 非阻断]`.) + understand — never a bare `P1`/`P2`/`P3` code. Keep the `P` marker but spell + out what it means inline on each finding, using the PR author's language: + `[P1 blocking]` for issues that must be fixed before merge, + `[P2 non-blocking]` for suggestions that do not block merge, and `[P3 nit]` + for minor or optional polish, theoretical edge cases, and coverage deferred + to CI. (In Chinese, `[P1 阻断]` / `[P2 非阻断]` / `[P3 可选]`.) diff --git a/CLAUDE.md b/CLAUDE.md index e93ec1fd0..8ad520d3d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,7 +22,9 @@ TypeScript, Node 20+, tsup (ESM), Vitest. Commands: `npm run build`, `npx tsc -- ## PR 前测试 -`npm run build` 后用真实 CLI 对本次改动做完整端到端验证(不能只跑 type check / unit test)。Test Plan 每一项必须实际通过,测试报告贴进 PR。 +改动运行时行为的 PR(docs-only / tests-only 之外),`npm run build` 后必须用真实 CLI 对本次改动做端到端验证,不能只跑 type check / unit test;**一次代表性的 real-CLI 运行即可**,把实际通过的验证记录贴进 PR。docs-only / tests-only 的改动无需 e2e 记录。 + +不要求覆盖下面的完整 provider × agent 矩阵——额外 provider / agent 的覆盖交给 CI,或在本地环境不具备时说明即可: - Agent:Claude、Codex、CodeBuddy、OpenCode - Provider:`git`、`gitlab`、`github`