Stream beets imports over HTTP.

refactor(server): define runner interface at consumer boundary and encapsulate mock runner #7

Closed sullen.net
targeting main from glerp.sullen.net/goosefoot:hygiene/runner-consumer-interface
Closed opened by and assigned to sullen.net
targeting main from glerp.sullen.net/goosefoot:hygiene/runner-consumer-interface

Summary #

  • Consumer-Defined Runner Interface: Move the Runner interface from internal/beets (the provider package) to internal/server (its sole consumer), decoupling server.go and server_test.go from importing internal/beets.
  • Encapsulate Server Test Doubles: Unexport MockRunner into internal/server (mockRunner in server_test.go) instead of exporting it from internal/testutil, keeping internal/testutil focused on shared HTTP response writer helpers (NonFlusherWriter).
  • Beets Runner Binary Normalization & Cancellation Test: Trim whitespace on binPath in beets.NewCLIBeetsRunner before defaulting to "beet", and use exec sleep 5 in TestRunStream_contextCancellation_terminatesProcess so SIGKILL terminates the sleeping process directly rather than leaving an orphaned child holding the stdout pipe open for 5 seconds.
Commits 0