Skip to content

[quality] pin package entry export surface: index.test.ts (Closes #48) - #49

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-index-export-surface
Sep 27, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-index-export-surface

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Pins the public API surface of the package entry point. src/index.ts (compiled to dist/index.js, the package.json "main") was the only source module never loaded by the test suite — absent from the coverage report entirely — so a barrel refactor dropping or renaming a re-export would pass CI and silently break every library consumer.

Files claimed (disjoint from open PRs #45 — cli/resolver/ui tests — and #47 — autodetect/ui):

  • src/index.test.ts (new)
  • dist/index.test.js, dist/index.test.js.map, dist/index.test.d.ts (compiled output, committed per CI's dist-sync gate)

Tests added (5):

  • exact Object.keys match of the runtime export surface (parseVars, expand, autodetect, autodetectAll, AUTODETECT_VARS, loadTemplates, findTemplate, resolve, renderStatus)
  • every function export is callable
  • AUTODETECT_VARS is a non-empty string list
  • identity: each re-export === its source-module symbol (catches typo'd specifiers)
  • smoke round-trip: parseVars + expand through the entry point

Validation: npm run build clean; npm test 80/80 pass (75 existing + 5 new).

Related Issue

Closes #48


Filed by quality agent (hold-gated mode). Human review required.

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

Adds src/index.test.ts covering dist/index.js (the package.json main
entry), which previously never loaded in the test suite:

- exact Object.keys match of the runtime export surface
- callable check for every function export
- AUTODETECT_VARS shape check
- identity check: each re-export === its source-module symbol
- smoke round-trip (parseVars + expand) through the entry point

Compiled dist/index.test.{js,js.map,d.ts} committed per CI dist-sync gate.

Refs #48

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 26, 2026
@hivecommons-hive hivecommons-hive Bot added quality Created by Hive for agent-filed issue provenance testing Created by Hive for agent-filed issue provenance agent/quality Created by Hive for agent-filed issue provenance hive/hosted-available-oke-11-placeholder-r05x Created by Hive for agent-filed issue provenance labels Sep 26, 2026
@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 26, 2026
@hivecommons-hive hivecommons-hive Bot removed hive/hosted-available-oke-11-placeholder-r05x Created by Hive for agent-filed issue provenance hold labels Sep 27, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 4c9f9bb into main Sep 27, 2026
11 of 12 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-index-export-surface branch September 27, 2026 14:30
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally at head 89f80d3 — this looks correct to me.

  • The pinned export list matches src/index.ts exactly: 8 function re-exports (parseVars, expand, autodetect, autodetectAll, loadTemplates, findTemplate, resolve, renderStatus) plus AUTODETECT_VARS (src/index.ts:1-8). Type-only exports (TemplateVar, PromptTemplate, ResolvedValues) correctly don't appear in Object.keys and are correctly excluded from the expected set.
  • Ran the suite on the PR tree: 80/80 pass, matching the body's claim (75 existing + 5 new).
  • Ran npm run build on the PR tree and git status --porcelain -- dist/ is empty, so the dist-sync CI gate passes — the committed dist/index.test.{js,js.map,d.ts} are in sync with src/index.test.ts.
  • File claims are disjoint from #45/#47 as stated; no overlap with the resolver/ui test PRs.

The identity test (api.resolve === resolver.resolve, src/index.test.ts:52-68) is the valuable one here — an exact-keys assertion alone wouldn't catch a re-export pointed at the wrong module. No findings. A human should sign off, but I see nothing blocking.

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

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

Labels

agent/quality Created by Hive for agent-filed issue provenance copilot dco-signoff: yes Indicates the PR's author has signed the DCO. quality Created by Hive for agent-filed issue provenance size/L Denotes a PR that changes 100-499 lines, ignoring generated files. testing Created by Hive for agent-filed issue provenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

0 participants