Summary
Follow-up from #8 / #9. The new test/ suite covers runHarperCommand, killHarper, and the port helpers in isolation, but the lifecycle orchestration (startHarper / teardownHarper) is not exercised end-to-end because that needs a real Harper instance (the package's harper peer dependency) and loopback-pool setup. Worth adding as a separate integration-test layer.
Coverage to add
Notes
Needs a real Harper available (peer dependency) and the loopback pool configured (harper-integration-test-setup-loopback), so this likely lives in a separate harness from the fixture-based unit tests in test/. May be best run only where a Harper build is present (and skipped otherwise).
🤖 Generated with Claude Code
Summary
Follow-up from #8 / #9. The new
test/suite coversrunHarperCommand,killHarper, and the port helpers in isolation, but the lifecycle orchestration (startHarper/teardownHarper) is not exercised end-to-end because that needs a real Harper instance (the package'sharperpeer dependency) and loopback-pool setup. Worth adding as a separate integration-test layer.Coverage to add
startHarper(ctx)→ make a request againstctx.harper.httpURL/operationsAPIURL→teardownHarper(ctx); assert the instance came up and was cleaned up.teardownHarperkills the process, waits for the fixed ports to free, releases the loopback address back to the pool, and removes the data root dir.killHarper(ctx)followed bystartHarper(ctx)reusing the samehostnamesucceeds withoutEADDRINUSE(verifies the port-wait-before-spawn added in fix: idle-based startup readiness and port-safe teardown recycle #9).setupHarperWithFixture— a pre-installed component is available on first boot.Notes
Needs a real Harper available (peer dependency) and the loopback pool configured (
harper-integration-test-setup-loopback), so this likely lives in a separate harness from the fixture-based unit tests intest/. May be best run only where a Harper build is present (and skipped otherwise).🤖 Generated with Claude Code