Skip to content

chore: add keywords - #14379

Merged
kgryte merged 4 commits into
developfrom
philipp/drift-blas-ext-2026-08-18
Aug 19, 2026
Merged

chore: add keywords#14379
kgryte merged 4 commits into
developfrom
philipp/drift-blas-ext-2026-08-18

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request adds the namespace-standard stdmath, mathematics, and math keywords to the four blas/ext search packages that omit them, bringing their package.json keyword sets in line with their siblings and their generic base analogs.

Namespace summary

  • Namespace: @stdlib/blas/ext
  • Members analyzed: 19 (18 function packages plus the base namespace aggregator).
  • Structural features extracted: file tree, package.json shape (scripts/stdlib/manifest key sets), README section order, test/benchmark/example file naming, and keyword sets.
  • Semantic features extracted (per package): public signature, return kind, validation prologue, error construction, JSDoc shape, and dependencies.
  • Feature with a clear majority and a correctable outlier set: package.json keywords — the set {stdmath, mathematics, math} is carried by 15/19 members (79%), including every non-search operation (join, circshift, copy-within, one-to, zero-to, unitspace, ...) and the base aggregator.
  • Features excluded for lacking a clear majority: the assign API variant (13/18 function packages, 72%), stats keywords (8/18), and the per-function signature/validation shapes (the operations are semantically heterogeneous). Error construction is already uniformly format across the namespace, so there is no drift to normalize.

Per outlier package

blas/ext/find-index

Carried the typed-kernel keyword template (stdlib, blas, find, ...) rather than the template of its true structural analog, the generic blas/ext/base/gfind-index. Added stdmath, mathematics, and math immediately after stdlib, matching the ordering used by every sibling that carries them. Conformance: 15/19 (79%).

blas/ext/find-last-index

Same typed-template copy-drift; the generic analog blas/ext/base/gfind-last-index carries the three keywords, as do all non-search siblings. Added the keywords in sibling-consistent order. Conformance: 15/19 (79%).

blas/ext/index-of

Keyword set mirrored the typed dindex-of/sindex-of kernels, which drop the broad math-category tags in favor of dtype tags; the generic analog blas/ext/base/gindex-of retains them. Added stdmath, mathematics, and math. Conformance: 15/19 (79%).

blas/ext/last-index-of

Longest deviating keyword array in the group, but math tags were absent for the same reason; blas/ext/base/glast-index-of carries them. Added the keywords after stdlib. Conformance: 15/19 (79%).

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation

Structural features were extracted from the filesystem and from package.json/README strings; semantic features (public signature, return kind, validation prologue, error construction, JSDoc shape, dependencies) were extracted per package. The single surviving drift finding — the missing math keywords on the four generic search packages — was confirmed by a three-agent validation panel (semantic review, cross-reference against tests/examples/docs, and structural review); all three returned confirmed-drift for all four packages. Cross-referencing found no test, example, REPL doc, TypeScript test, or documented API contract that relies on the current keyword sets, and the change is metadata-only: no observable behavior, signature, or test expectation changes.

Deliberately excluded from this PR:

  • The base namespace aggregator — a different kind of package that legitimately omits the Notes README section and the __stdlib__ marker.
  • The assign-variant files — present in only 13/18 function packages, reflecting an intentional API distinction (not every operation exposes an in-place output variant) rather than drift.
  • The absence of lib/base.js in sum, to-sorted, and to-sortedhp — correcting it is a refactor that would cascade into logic and tests, which is out of scope for a drift correction.
  • All per-function signature and validation-prologue differences — the operations are heterogeneous (search vs. reduction vs. sequence construction), so no namespace-wide majority exists.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of 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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution.

This PR was authored end-to-end by Claude Code as part of a scheduled cross-package API drift-detection routine over @stdlib/blas/ext. Structural and semantic features were extracted from all 19 namespace members, a majority vote (≥75%) surfaced the missing math keywords on the four generic search packages, and a three-agent validation panel confirmed the drift before the metadata-only fix was applied. Pending human audit (draft).


@stdlib-js/reviewers


Generated by Claude Code

claude added 4 commits August 18, 2026 12:21
Add the `stdmath`, `mathematics`, and `math` keywords, carried by 15
of 19 `blas/ext` members (79%) and by the generic base analog
`blas/ext/base/gfind-index`. The package previously mirrored the
typed-kernel keyword template (`dindex-of`/`sindex-of`), which drops
the namespace-level math category tags that generic packages carry.
Add the `stdmath`, `mathematics`, and `math` keywords, carried by 15
of 19 `blas/ext` members (79%) and by the generic base analog
`blas/ext/base/gfind-last-index`. The package previously mirrored the
typed-kernel keyword template (`dindex-of`/`sindex-of`), which drops
the namespace-level math category tags that generic packages carry.
Add the `stdmath`, `mathematics`, and `math` keywords, carried by 15
of 19 `blas/ext` members (79%) and by the generic base analog
`blas/ext/base/gindex-of`. The package previously mirrored the
typed-kernel keyword template (`dindex-of`/`sindex-of`), which drops
the namespace-level math category tags that generic packages carry.
Add the `stdmath`, `mathematics`, and `math` keywords, carried by 15
of 19 `blas/ext` members (79%) and by the generic base analog
`blas/ext/base/glast-index-of`. The package previously mirrored the
typed-kernel keyword template (`dindex-of`/`sindex-of`), which drops
the namespace-level math category tags that generic packages carry.
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Aug 18, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/find-index $\\color{green}485/485$
$\\color{green}+100.00\\%$
$\\color{green}54/54$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}485/485$
$\\color{green}+100.00\\%$
blas/ext/find-last-index $\\color{green}500/500$
$\\color{green}+100.00\\%$
$\\color{green}54/54$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}500/500$
$\\color{green}+100.00\\%$
blas/ext/index-of $\\color{green}614/614$
$\\color{green}+100.00\\%$
$\\color{green}76/76$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}614/614$
$\\color{green}+100.00\\%$
blas/ext/last-index-of $\\color{green}610/610$
$\\color{green}+100.00\\%$
$\\color{green}76/76$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}610/610$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@Planeshifter
Planeshifter marked this pull request as ready for review August 18, 2026 16:24
@Planeshifter
Planeshifter requested review from a team and kgryte August 18, 2026 16:24
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 18, 2026
@kgryte kgryte changed the title chore: add missing math keywords to blas/ext search packages chore: add keywords Aug 19, 2026
@kgryte
kgryte merged commit 1eb5c15 into develop Aug 19, 2026
51 checks passed
@kgryte
kgryte deleted the philipp/drift-blas-ext-2026-08-18 branch August 19, 2026 07:17
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants