Skip to content

scriptrun: generic script-runner utility for script-driven recipes #1243

Description

@ed-irl-codebot

Problem

Several planned features need to run user-configured shell scripts and
capture their output — AI message generation, integration conflict
resolution, and restack conflict resolution all want the same
"run a recipe, read what it produced" primitive. Without a shared
utility each would reimplement script execution, output capture, and
exit-code handling slightly differently.

Proposal

Add a small, single-responsibility scriptrun package for executing
user-configured scripts and capturing their output.

  • Scripts may be plain shell snippets (run via sh -c) or
    self-contained executables starting with a shebang (written to a temp
    file and executed directly).
  • stdout and stderr are captured independently and returned with the
    exit code.
  • The package does not interpret output — that is the caller's job —
    keeping it reusable across different output protocols (commit
    messages, conflict resolutions, etc.).
  • A non-zero exit is reported in the result rather than as an error, so
    callers can distinguish "script ran and disagreed" from "script could
    not be run at all."

This is foundational infrastructure for the AI message generation and
integration/restack resolver features.

Tracked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions