Skip to content

refactor: extract runOnce to scripts/lib/subprocess.ts with cwd support#157

Merged
keinstn merged 1 commit into
developfrom
agent/keinstn__baton-150
Jun 24, 2026
Merged

refactor: extract runOnce to scripts/lib/subprocess.ts with cwd support#157
keinstn merged 1 commit into
developfrom
agent/keinstn__baton-150

Conversation

@keinstn

@keinstn keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Move runOnce from scripts/triage/subprocess.ts to scripts/lib/subprocess.ts so it can be shared between triage and review scripts
  • Change signature from positional timeoutMs to opts?: RunOnceOpts where RunOnceOpts = { timeoutMs?: number; cwd?: string }
  • Add cwd support in spawn() options
  • Remove "triage subprocess" prefix from error messages (now just "subprocess")
  • Update triage callers (claude-eval.ts, copilot-eval.ts) and tests accordingly

Closes #150

Test plan

  • npm run typecheck passes
  • npm run lint passes
  • npm run test passes (all 337 tests, including triage-subprocess and triage-evaluator)

🤖 Generated with Claude Code

Move runOnce from scripts/triage/subprocess.ts to scripts/lib/subprocess.ts
so it can be shared between triage and review scripts. Add a cwd option to
RunOnceOpts and change the signature from positional timeoutMs to an opts
object. Update callers and tests accordingly.

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

keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

[Baton Reviewer] Managed by Baton; do not edit the marker line manually.

PR #157 is ready for human review. No actionable defects found.

@keinstn keinstn self-assigned this Jun 24, 2026
@keinstn
keinstn merged commit aae67d8 into develop Jun 24, 2026
4 checks passed
@keinstn
keinstn deleted the agent/keinstn__baton-150 branch June 24, 2026 13:19
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.

Extract runOnce to scripts/lib/subprocess.ts

1 participant