Summary
Follow-up from #8 / #9. The lifecycle race fixes added the repo's first tests (test/), covering the port helpers, the startup watchdog's main paths, and killHarper's signal logic. A few runHarperCommand branches remain uncovered and are cheap to test — the fixture-script harness in test/harperLifecycle.test.ts (spawning short .cjs scripts via harperBinPath) already supports them, so no real Harper is needed.
Branches to cover
Notes
These are functional tests that spawn node child processes — same style as the existing test/ suite. Low effort; good first issue.
🤖 Generated with Claude Code
Summary
Follow-up from #8 / #9. The lifecycle race fixes added the repo's first tests (
test/), covering the port helpers, the startup watchdog's main paths, andkillHarper's signal logic. A fewrunHarperCommandbranches remain uncovered and are cheap to test — the fixture-script harness intest/harperLifecycle.test.ts(spawning short.cjsscripts viaharperBinPath) already supports them, so no real Harper is needed.Branches to cover
successfully startedacross twostdout.writecalls/chunks should still be detected as ready (verifies thestdout.includes(...)accumulation, not just per-chunk matching).harperBinPath),runHarperCommandrejects and closes thestdout.log/stderr.logwrite streams (no leaked FDs).'exit'never fires on a failed spawn.DEFAULT_STARTUP_MAX_MSresolves to 300s whenprocess.env.CIis set and 120s otherwise (theIS_CIbranch).logDirfiles and is not re-accumulated into the returnedstartupOutputsnapshot.Notes
These are functional tests that spawn
nodechild processes — same style as the existingtest/suite. Low effort; good first issue.🤖 Generated with Claude Code