Skip to content

feat(review): add runner.ts, claude-run.ts, copilot-run.ts#162

Merged
keinstn merged 2 commits into
developfrom
agent/keinstn__baton-153
Jun 24, 2026
Merged

feat(review): add runner.ts, claude-run.ts, copilot-run.ts#162
keinstn merged 2 commits into
developfrom
agent/keinstn__baton-153

Conversation

@keinstn

@keinstn keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds scripts/review/runner.ts with ReviewRunner interface and createRunner(config) factory
  • Adds scripts/review/claude-run.ts — Claude Code runner that passes prompt via stdin, uses stream-json output, and throws on is_error: true
  • Adds scripts/review/copilot-run.ts — Copilot runner that passes prompt as CLI arg with a 128 KB guard, runs in the workspace directory

Closes #153

Test plan

  • npm run typecheck passes
  • npm run lint passes

🤖 Generated with Claude Code

Implement the ReviewRunner interface and per-agent runner implementations
for the review script. Claude runner parses stream-json to detect errors;
Copilot runner passes prompt as CLI arg with a 128 KB guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@keinstn

keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

[Baton Reviewer] pass — no actionable issues found; this PR is ready for human review.
Managed by Baton; do not edit the marker line manually.

@keinstn keinstn left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 findings across the two new runner files. The --allow-tool=* flag name is the most urgent — it diverges from the production adapter and will silently misconfigure the agent.

Comment thread scripts/review/copilot-run.ts Outdated
Comment thread scripts/review/copilot-run.ts Outdated
Comment thread scripts/review/copilot-run.ts
Comment thread scripts/review/claude-run.ts Outdated

@keinstn keinstn left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tests for the new runner files. scripts/triage/ has 5 test files covering analogous logic — scripts/review/ should follow the same pattern.

Comment thread scripts/review/claude-run.ts
Comment thread scripts/review/copilot-run.ts
- use --verbose in claude review runner

- use --allow-all-tools, apply --deny-tool, and validate copilot result exitCode

- add runner tests for command construction and result parsing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@keinstn keinstn self-assigned this Jun 24, 2026
@keinstn
keinstn merged commit c830ee8 into develop Jun 24, 2026
4 checks passed
@keinstn
keinstn deleted the agent/keinstn__baton-153 branch June 24, 2026 20:06
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.

Add scripts/review/runner.ts, claude-run.ts, copilot-run.ts — per-issue agent runners

1 participant