Skip to content

feat(multi-review): add regression-test reviewer persona#212

Merged
Svtter merged 1 commit into
mainfrom
feature/multi-review-regression-test
Jun 7, 2026
Merged

feat(multi-review): add regression-test reviewer persona#212
Svtter merged 1 commit into
mainfrom
feature/multi-review-regression-test

Conversation

@Svtter
Copy link
Copy Markdown
Collaborator

@Svtter Svtter commented Jun 7, 2026

Summary

Adds a built-in regression-test reviewer persona to multi-review, so every multi-review run automatically audits PRs for missing regression tests alongside quality, security, performance, and architecture checks.

Changes

multi-review/reviewers/regression-test.yaml — new persona that:

  • Classifies PR type (BUGFIX, BEHAVIOR_CHANGE, NEW_FEATURE, CHORE)
  • Only flags missing tests for BUGFIX and BEHAVIOR_CHANGE PRs
  • Skips NEW_FEATURE and CHORE with "无需回归测试"
  • Uses severity levels: CRITICAL / MEDIUM / LOW
  • Follows the same output format as other reviewers (decision → summary → blocking → suggestions)

multi-review/src/reviewers.ts — 2 changes:

  • Added regression-test.yaml to loadBuiltInReviewers file list
  • Added regression-test:1 to DEFAULT_TEAM (now 5 reviewers by default)

Behavior change

Default team changes from quality:1,security:1,performance:1,architecture:1 (4 reviewers) to quality:1,security:1,performance:1,architecture:1,regression-test:1 (5 reviewers). Users who explicitly set default-team are unaffected.

Adds a built-in regression-test reviewer that audits PRs for missing
regression tests alongside the existing quality, security, performance,
and architecture reviewers.

- multi-review/reviewers/regression-test.yaml: new persona that
  classifies PR type (BUGFIX, BEHAVIOR_CHANGE, NEW_FEATURE, CHORE)
  and flags missing regression tests only for BUGFIX and BEHAVIOR_CHANGE
- multi-review/src/reviewers.ts: add regression-test to built-in
  reviewer list and default team
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

无需回归测试

PR 类型:NEW_FEATURE

该 PR 为 multi-review 系统新增了一个 regression-test 内置评审人格(reviewer persona),主要变更包括:

  • 新增 multi-review/reviewers/regression-test.yaml 配置文件(57 行),定义了回归测试评审的逻辑和输出格式
  • multi-review/src/reviewers.ts 中注册该评审人格并加入默认团队
  • 更新了构建产物 multi-review/dist/index.cjs

这是纯新增功能(添加新的评审维度),虽然默认团队从 4 人变为 5 人(包含了新人格),但这属于新增功能的自然扩展而非对既有逻辑的修改。PR 未修改现有 reviewer 的任何行为逻辑,也未修复任何 bug,因此不需要回归测试。

New%20session%20-%202026-06-07T09%3A52%3A52.809Z
opencode session  |  github run

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

最终决策:可合并 / CAN MERGE

四名评审人一致认为 PR 改动量小、遵循现有模式、无功能性错误。

阻塞项:无

建议项:

  1. 检查仓库中是否存在检测 DEFAULT_TEAM 精确内容或内建评审人列表的测试用例,若有则需同步更新,否则可能造成测试失败(来自 quality 评审人)

📋 各 Reviewer 详细审查结果
quality

可合并 / CAN MERGE

该 PR 新增了一个 regression-test 评审人角色,改动量小且模式高度一致,无功能性错误。

  • DEFAULT_TEAM 字符串末尾追加 regression-test:1,格式与现有条目一致
  • loadBuiltInReviewers 的数组末尾追加 "regression-test.yaml",加载机制与现有评审人相同
  • regression-test.yaml 文件结构参照了现有评审人模板,prompt 指令清晰完整
  • 源码 (src/reviewers.ts) 和构建产物 (dist/index.cjs) 同时修改且一致

阻塞项:无

建议项:

  1. 建议确认仓库中是否存在检查 DEFAULT_TEAM 精确内容或内建评审人列表的测试用例,若有则需同步更新,否则可能造成测试失败
security

安全无虞 / SECURE

本次 PR 仅向 DEFAULT_TEAM 添加 regression-test:1 评审角色、注册新的 regression-test.yaml 评审配置文件。代码量小,功能单一。

阻塞项:无

建议项:无

performance

性能良好 / GOOD

该 PR 仅新增了一个 regression-test 评审角色,改动量极小:

  • DEFAULT_TEAM 字符串增加一项,parseTeam 解析时多处理一个键值对,复杂度不变
  • loadBuiltInReviewers 多加载一个 YAML 文件(57 行),增加一次同步文件读取和 YAML 解析,开销可忽略
  • Map 中多一个条目,内存增量极微

未引入任何算法复杂度变化、内存泄漏、数据库查询、并发问题或资源瓶颈。

阻塞项:无

建议项:无

architecture

架构合理 / SOUND

该 PR 新增一个 regression-test 评审角色,改动量极小且完全遵循现有架构模式。新 reviewer 的 YAML 定义与已有 quality.yamlsecurity.yaml 等保持一致的 name + prompt 结构,src/reviewers.ts 仅在数组和默认团队字符串中各加一项,改动集中于单一模块,无跨模块耦合。

阻塞项:无

建议项:无

@Svtter Svtter merged commit b4b3787 into main Jun 7, 2026
4 of 5 checks passed
@Svitter Svitter added agent OpenCode agent SDK integration feat New feature or enhancement review:p2 Minor review findings triaged Issue has been triaged labels Jun 7, 2026
@Svitter
Copy link
Copy Markdown
Contributor

Svitter commented Jun 7, 2026

Review: PR #212feat(multi-review): add regression-test reviewer persona

Rank: P2 (needs maintainer sign-off)feat, agent

Clean PR. Three files, well-structured prompt, follows existing reviewer conventions. The regression-test persona is a sensible addition to multi-review.

Gate

Expanding DEFAULT_TEAM from 4 to 5 reviewers at multi-review/src/reviewers.ts:10 is a default-behaviour change. Every multi-review run that does not explicitly set default-team now gets an additional AI reviewer call, increasing runtime and API cost. The PR body acknowledges this — just needs the maintainer to confirm it's intentional before merge. This alone caps the PR at P2 per the "no default-behaviour changes without explicit maintainer sign-off" convention.

Findings

  1. multi-review/src/reviewers.ts:25 — missing test coverage. No test verifies that regression-test.yaml successfully loads and produces a valid PersonaYAML with the expected name field. The existing reviewers.test.ts uses MULTI_REVIEW_DEFAULT_TEAM = "quality:1" which loads the new persona into the map but never exercises it as a reviewer. Consider adding a test that loads regression-test:1 and asserts the reviewer name and that the prompt is non-empty.

  2. multi-review/README.md:22 — stale reviewer list. The documented built-in reviewer personas list (quality, security, performance, architecture) is now incomplete. Should include regression-test.

What's good

  • The prompt is well-designed: clear PR-type classification (BUGFIX/BEHAVIOR_CHANGE/NEW_FEATURE/CHORE), correct scoping (flags missing tests only for BUGFIX/BEHAVIOR_CHANGE), and follows the same blocking/suggestions output format as other reviewers.
  • The dist/index.cjs rebuilt output matches the source changes exactly.
  • Decision vocabulary (无需回归测试/回归测试完整/缺少回归测试) is domain-appropriate, consistent with how other reviewers have their own decision sets.

Thanks @Svtter for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent OpenCode agent SDK integration feat New feature or enhancement review:p2 Minor review findings triaged Issue has been triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants