Skip to content

test: add baseline test for _tools/licenses/infer#12323

Draft
Planeshifter wants to merge 1 commit into
developfrom
claude/inspiring-curie-OliTx
Draft

test: add baseline test for _tools/licenses/infer#12323
Planeshifter wants to merge 1 commit into
developfrom
claude/inspiring-curie-OliTx

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

This pull request adds a baseline smoke test to @stdlib/_tools/licenses/infer, the sole package in the @stdlib/_tools/licenses/* namespace that previously lacked a test/ directory.

The fix was produced by a cross-package drift audit over the 11 non-autogenerated members of the namespace. Two drift items were applied to infer:

  • A test/test.js exercising typeof infer === 'function', mirroring the boilerplate used by 10 of 11 (91%) siblings.
  • A "test": "./test" entry under directories in package.json, mirroring 10 of 11 (91%) siblings.

No other corrections survived filtering: the remaining semantic features either had no clear majority across the namespace or were satisfied by every package.

Namespace summary

  • Members analyzed: 11 (all non-autogenerated).
  • Features with clear majority (≥75%): test/test.js presence, directories.test presence, lib/index.js presence, lib/main.js presence, examples/index.js presence, errorConstruction = format (9/11; outliers header-regexp and infer do not construct errors at all, so this was treated as a false positive and dropped).
  • Features without clear majority (excluded from drift analysis): returnKind (6 value / 5 void), os in package.json (6/11), __stdlib__ in package.json (6/11), directories.doc (8/11), README Notes section (8/11), README CLI section (7/11), per-package signatures and validation prologues (each shape unique to the package).

Per outlier package

_tools/licenses/infer

Added test/test.js with a baseline smoke test verifying the main export is a function (91% of @stdlib/_tools/licenses/* siblings carry this test). Added "test": "./test" to directories in package.json for the same reason — 91% conformance across siblings.

Related Issues

This pull request has no related issues.

Questions

No.

Other

Validation

Three-agent validation was run over the candidate corrections:

  • Semantic review: confirmed-drift — the @private JSDoc tag on infer's main function is a documentation tic shared across siblings (licenses, insert-header-file-list, etc.) and does not indicate the package is untestable; the module is exported and documented in README.md as a usage-facing API.
  • Cross-reference review: confirmed-drift — no test-runner config, ignore pattern, or external reference depends on the file's absence; infer/package.json shows several signs of being incomplete relative to siblings (missing directories.test), consistent with unintentional drift.
  • Structural review: confirmed-drift — infer is structurally identical to its tested siblings (lib/index.js re-exporting lib/main.js, a README.md documenting the API, a bin/cli), and the boilerplate smoke test is universally applicable since module.exports is a function.

Deliberately excluded from this PR:

  • The errorConstruction "drift" in header-regexp and infer — both packages either delegate validation to a callee or are internal helpers with no thrown errors. There are no error messages to normalize.
  • Features without a clear ≥75% majority (returnKind, os, __stdlib__, directories.doc, README Notes/CLI).
  • Per-package signature and validation-prologue differences, which reflect genuine semantic differences in what each package does.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code as part of an automated cross-package drift detection routine over @stdlib/_tools/licenses/*. The audit identified structural drift via majority vote across 11 sibling packages; the proposed correction was validated by three independent reviewer agents (semantic, cross-reference, structural) before being applied. A human maintainer should promote out of draft after review.


@stdlib-js/reviewers


Generated by Claude Code

Adds a `test/test.js` smoke test verifying that the package's main
export is a function, and registers the corresponding `test`
directory under `directories` in `package.json`. The 10 sibling
packages in `@stdlib/_tools/licenses/*` already ship the same
baseline pattern (91% conformance); `infer` was the sole outlier.
@stdlib-bot stdlib-bot added the Tools Issue or pull request related to project tooling. label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants