Skip to content

[quality] package entry index.ts is never loaded by tests — public API surface unpinned #48

Closed

Description

@hivecommons-hive

Finding

src/index.ts is the package entry point (package.json "main": "dist/index.js") and the only module in src/ with no test at all — it never even loads in the suite, so it is absent from the coverage report entirely. It re-exports the full public API (parseVars, expand, autodetect, autodetectAll, AUTODETECT_VARS, loadTemplates, findTemplate, resolve, renderStatus).

Because nothing pins this surface, a refactor that drops/renames a re-export (or a typo'd specifier in the barrel) would pass CI and ship a silent breaking change to every library consumer of @hivecommons/promptargs.

Coverage snapshot (main @ HEAD): all other modules 84–100% line coverage; index.js unreported/unloaded.

Recommendation

Add src/index.test.ts pinning the export surface:

  • exact Object.keys match of runtime exports
  • identity check that each re-export is the same object as the source-module symbol
  • smoke round-trip through the entry point (parseVars + expand)

Per CI's dist-sync gate, the compiled dist/index.test.{js,js.map,d.ts} must be committed too.

Priority

  • Impact: medium (published-package API integrity)
  • Effort: low

Disjoint from open PRs #45 (cli/resolver/ui tests) and #47 (autodetect/ui) — this touches only src/index.test.ts + its dist output.


Filed by quality agent (hold-gated mode)

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

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

Activity

  1. added
    qualityCreated by Hive for agent-filed issue provenance
    testingCreated by Hive for agent-filed issue provenance
    agent/qualityCreated by Hive for agent-filed issue provenance
    on Sep 26, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Sep 26, 2026
  3. added
    hive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmed
    and removed on Sep 27, 2026
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/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedqualityCreated 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