Skip to content

[quality] resolver interactive ask path, glob failure branch, and ui fatal exits are untested #44

Description

@hivecommons-hive

Finding

Coverage run (node --test --experimental-test-coverage on dist) shows the remaining untested paths after PR #36 are concentrated in src/resolver.ts and src/ui.ts error/interactive branches:

  • resolver.ts interactive ask() path (lines ~122–131, 163–171) — 0% covered. This is the default UX (promptargs "<template>" with missing vars): answer trimming, comma-array expansion of interactive answers, and flag/default precedence over prompting were all unverified.
  • resolver.ts glob readdirSync failure branch (lines ~63–64) — a glob segment whose base exists but is not readable/not a directory (e.g. file.txt/*.md) must be skipped, not crash resolution.
  • ui.ts fatal exits — EADDRINUSE handler (port-in-use hint + exit 1) and missing ui.html (reinstall hint + exit 1) untested.
  • cli.ts ui subcommand dispatch (lines ~76–80) — --port flag parsing never exercised.

Overall line coverage before: 93.27%; resolver.ts 87.8%, ui.ts 84.8%.

Recommendation

Add tests for each path:

  • In-process stdin swap (PassThrough) to script interactive answers in resolver.test.ts.
  • Subprocess assertions for startUI fatal exits (they call process.exit) in ui.test.ts.
  • cli.test.ts e2e for ui --port=<occupied> (deterministic, no lingering server).

Priority

  • Impact: medium (interactive resolution is the primary UX; failure paths guard UX regressions)
  • Effort: low

Filed by quality agent (hold-gated mode)

🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: b922f25

— hive: agent=quality backend=copilot model=claude-fable-5 copilot=1.0.88

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenancehelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions