Tests: cover remaining runHarperCommand startup-watchdog branches
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- node.js, typescript
- Domain
- testing
Research direction
Start in test/harperLifecycle.test.ts and inspect the existing fixture-script harness and harperBinPath usage. Add coverage for the four listed runHarperCommand branches, then run the existing test suite; done means chunked readiness, spawn errors with closed logs, CI-dependent defaults, and post-readiness streaming are verified.
Written by the indexing model from the issue text.
Description
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
- Completion marker split across stream chunks — a fixture that emits
successfully startedacross twostdout.writecalls/chunks should still be detected as ready (verifies thestdout.includes(...)accumulation, not just per-chunk matching). - Spawn-error path — when the runtime/binary can't spawn (e.g. a non-existent/non-executable
harperBinPath),runHarperCommandrejects and closes thestdout.log/stderr.logwrite streams (no leaked FDs).'exit'never fires on a failed spawn. - CI-aware absolute cap default —
DEFAULT_STARTUP_MAX_MSresolves to 300s whenprocess.env.CIis set and 120s otherwise (theIS_CIbranch). - Post-readiness log streaming — after the ready marker, continued process output is still written to the
logDirfiles and is not re-accumulated into the returnedstartupOutputsnapshot.
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
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 17d 7h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HarperFast/integration-testing
-
setupHarperWithFixture overwrites ctx.harper, dropping pre-set hostname (breaks multi-node add_node) Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
HarperFast/integration-testing#29 · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in HarperFast/integration-testing
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·