Skip to content

Introduce ScriptRunner seam into executor #362

Description

@kindermax

Parent

#355

What to build

Define a ScriptRunner abstraction (function type or single-method interface) that sits between executor orchestration and OS process spawning. Create a ShellRunner concrete adapter that wraps the current shell-exec logic. Update NewExecutor to accept a ScriptRunner parameter. Update the single production caller to pass ShellRunner.

This is purely a plumbing change — no observable behaviour changes, no new tests required. All existing unit tests and Bats integration tests must still pass. The seam this creates is what unblocks the Execute() test suite.

Acceptance criteria

  • A ScriptRunner type is defined (function type or interface with a single method)
  • A ShellRunner concrete adapter wraps the current newOsCommand + Run() logic
  • NewExecutor accepts a ScriptRunner parameter
  • The production caller passes a ShellRunner instance
  • runCmd delegates to the injected runner instead of calling os/exec directly
  • All existing go test ./... tests pass
  • All existing Bats integration tests pass

Blocked by

None — can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions