Skip to content

docs: fix @throws annotation in blas/ext/one-to and blas/ext/zero-to#12266

Merged
kgryte merged 2 commits into
developfrom
philipp/drift-blas-ext-2026-05-24
May 24, 2026
Merged

docs: fix @throws annotation in blas/ext/one-to and blas/ext/zero-to#12266
kgryte merged 2 commits into
developfrom
philipp/drift-blas-ext-2026-05-24

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • normalizes the @throws JSDoc tag for the "must provide valid options" case in two blas/ext/ packages whose lib/main.js and lib/assign.js deviate from the namespace convention (14 of 16 sibling packages document the case as @throws {Error}, and the same packages' own lib/base.js files already use @throws {Error})

Namespace summary

  • Namespace: @stdlib/blas/ext
  • Members analyzed: 16 (excluding base, which is a sub-namespace aggregator)
  • Features with a clear majority (≥75%): package.json shape, manifest.json shape, README section structure, <section> boilerplate, errorConstruction == "format", hasExample, @throws {Error} must provide valid options
  • Features excluded for no clear majority or for semantic differences: publicSignature, validationPrologue, dependencies, keyword sets (each package's math/search semantics differ), lib/assign.js / lib/base.js presence (mutating-vs-non-mutating and factory-vs-manual architectures are intentional)

blas/ext/one-to

Corrects the @throws annotation for the "invalid options" case in lib/main.js and lib/assign.js from {TypeError} to {Error}, aligning with lib/base.js within the same package and with 87.5% of sibling packages in blas/ext/. No runtime behavior changes; existing tests continue to assert on TypeError as thrown.

blas/ext/zero-to

Corrects @throws {TypeError} to @throws {Error} for the "must provide valid options" JSDoc annotation in lib/main.js and lib/assign.js, bringing the package in line with lib/base.js and 14 of 16 sibling packages in blas/ext/ (87.5%). The deviation was a documentation inconsistency only; no runtime behavior changes, and existing tests continue to assert the thrown TypeError as before.

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 feature extraction over all 16 members (file trees, package.json shapes, README sections, test/benchmark/example filenames, manifest.json shapes).
  • Semantic feature extraction via per-package agents (public signatures, validation prologues, error-construction style, JSDoc shapes, dependency sets).
  • Three-agent drift validation (semantic review, test/doc cross-reference, broader-codebase structural review) confirmed confirmed-drift for all four files. No outlier on this feature was marked intentional-deviation or needs-human.

Deliberately excluded

  • Outliers on features without a clear ≥75% majority (e.g. blas keyword at 62.5%).
  • Architectural deviations driven by semantics: in-place mutating functions (circshift, sort, sorthp) correctly lack .assign infrastructure; sum correctly uses a factory that packages both forms; to-sorted / to-sortedhp correctly delegate to their mutating counterparts.
  • "Missing" math-keyword set on find-index, find-last-index, index-of, last-index-of — these are search functions, not math operations.
  • Auto-populated / generator-owned artifacts (docs/repl.txt, docs/types/*.d.ts).

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 PR was authored by Claude Code as part of a cross-package API drift detection routine: structural and semantic features were extracted from every package in @stdlib/blas/ext/, the majority pattern per feature was computed (≥75% threshold), and outliers were validated by three independent review agents before the patches were applied.



Generated by Claude Code

claude added 2 commits May 24, 2026 12:23
Align the `@throws` JSDoc tag for "must provide valid options" with the
namespace convention used by 14 of 16 sibling packages in `blas/ext/`
(87.5% conformance), as well as the same package's own `lib/base.js`,
which already documents the case as `@throws {Error}`. Touches
`lib/main.js` and `lib/assign.js`; no runtime change.
Align the `@throws` JSDoc tag for "must provide valid options" with the
namespace convention used by 14 of 16 sibling packages in `blas/ext/`
(87.5% conformance), as well as the same package's own `lib/base.js`,
which already documents the case as `@throws {Error}`. Touches
`lib/main.js` and `lib/assign.js`; no runtime change.
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label May 24, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/one-to $\color{red}452/454$
$\color{green}+99.56%$
$\color{red}47/48$
$\color{green}+97.92%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{red}452/454$
$\color{green}+99.56%$
blas/ext/zero-to $\color{red}452/454$
$\color{green}+99.56%$
$\color{red}47/48$
$\color{green}+97.92%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{red}452/454$
$\color{green}+99.56%$

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

@kgryte kgryte marked this pull request as ready for review May 24, 2026 19:38
@kgryte kgryte requested a review from a team May 24, 2026 19:38
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 24, 2026
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels May 24, 2026
@kgryte kgryte merged commit 09c01f1 into develop May 24, 2026
70 checks passed
@kgryte kgryte deleted the philipp/drift-blas-ext-2026-05-24 branch May 24, 2026 19:40
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). Documentation Improvements, additions, or changes to documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants