Skip to content

Add configurable reviewers list to review-implementation step#79

Merged
vm-mishchenko merged 1 commit into
mainfrom
260514-spec-configurable-reviewers
May 14, 2026
Merged

Add configurable reviewers list to review-implementation step#79
vm-mishchenko merged 1 commit into
mainfrom
260514-spec-configurable-reviewers

Conversation

@vm-mishchenko
Copy link
Copy Markdown
Owner

Summary

  • Replaces the single cmd/timeout/max_retries step-level keys with a reviewers: list; each reviewer runs Phase A (invoke) + Phase B (address loop) independently and produces its own commit on reject
  • Config validation rejects the removed top-level keys with a migration message pointing users to reviewers[].{key}; validate_reviewer_argv0s replaces validate_review_cmd_argv0 and has_any_reviewer replaces has_review_cmd in command_create.py
  • Per-reviewer state lives under step_data["review-implementation"]["reviewers"][<name>]; log files use review-implementation.<name>.<suffix>.log naming; Phase-A infra failures now raise StepError rather than silently skipping

Test plan

  • New tests/draft/test_review_implementation.py covers: empty reviewers early-return, single approve, single reject+address, three reviewers (all approve, mixed), Phase-A infra failure, Phase-B max-retries exhaustion, no-changes-on-attempt-1, DRAFT_REVIEWER_NAME env, per-reviewer log paths, {{REVIEWER_NAME}} substitution, resume skipping completed reviewers, resume restarting in-progress reviewers, legacy-state guard, and README content assertion
  • tests/draft/test_config.py extended with validation tests for all new schema branches (removed keys, reviewers shape, name regex, duplicate names, cmd/timeout/max_retries ranges, unknown keys) and validate_reviewer_argv0s tests
  • tests/draft/test_commands.py updated to use has_any_reviewer keyword in _compose_active_steps tests

Replace the single `cmd`/`timeout`/`max_retries` step-level keys with a
`reviewers` list, where each entry carries its own `name`, `cmd`,
`timeout`, and `max_retries`. Reviewers run sequentially; an empty stdout
from a reviewer means approved (no commit), non-empty stdout triggers the
address loop which produces one commit per reviewer on success.

State tracking moves from flat step-level keys to a per-reviewer map under
`reviewers.<name>.*`, with a legacy-state guard that aborts cleanly if an
old `state.json` shape is detected. Log files are now named
`review-implementation.<name>.<suffix>.log`. Config validation rejects the
removed top-level keys with an actionable migration message.
@vm-mishchenko vm-mishchenko marked this pull request as ready for review May 14, 2026 22:58
@vm-mishchenko vm-mishchenko merged commit 4d2ee6f into main May 14, 2026
1 check passed
@vm-mishchenko vm-mishchenko deleted the 260514-spec-configurable-reviewers branch May 14, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant