Skip to content

chore: propagate recent fixes to sibling packages#11696

Merged
kgryte merged 3 commits intodevelopfrom
philipp/fix-propagation-2026-04-21
Apr 22, 2026
Merged

chore: propagate recent fixes to sibling packages#11696
kgryte merged 3 commits intodevelopfrom
philipp/fix-propagation-2026-04-21

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Propagating fixes merged to develop between 2026-04-20T16:07:19-04:00 and 2026-04-21T03:37:01-07:00 (SHA range 7a025ca74..1089250db) to sibling packages sharing the same defect.

fix: — wrong validation package (source b7f85c29d)

Array-dtype assertion @stdlib/array/base/assert/is-complex-floating-point-data-type checks against @stdlib/array/dtypes, but these consumers resolve dt from ndarray dtype strings (either via getDType(x) or opts.dtype), so the guard would misfire on ndarray-only dtypes. Swapped for the @stdlib/ndarray/base/assert/... variant already used by broadcast-scalar and broadcast-scalar-like.

Source: b7f85c29d

Targets:

  • lib/node_modules/@stdlib/ndarray/from-scalar/lib/main.js
  • lib/node_modules/@stdlib/ndarray/from-scalar-like/lib/main.js

chore: — missing stdlib/no-new-array disable directives in *-by tests (source 1089250db)

The stdlib/no-new-array rule is error (see etc/eslint/rules/stdlib.js:4475), so intentional sparse-array construction via new Array( N ) requires an explicit // eslint-disable-next-line stdlib/no-new-array on the preceding line. 40 sibling *-by test files under math/strided/ops/ and math/strided/special/ carried the idiom without the directive; added 92 directives total. For the ops/{add,sub,mul}-by files, consecutive x = and y = sparse-array assignments each received their own preceding directive, since eslint-disable-next-line only silences the single following line.

Source: 1089250db

Targets (40 files):

  • math/strided/ops/add-by/test/{test.main,test.ndarray}.js
  • math/strided/ops/mul-by/test/{test.main,test.ndarray}.js
  • math/strided/ops/sub-by/test/{test.main,test.ndarray}.js
  • math/strided/special/{abs,abs2,acos,acosh,acot,acoth,acoversin,ahaversin,asin,asinh,atan,atanh,avercos,besselj0,besselj1,bessely0,bessely1,binet,cbrt,cos,sin,sqrt}-by/test/test.*.js (the specific test.main.js / test.ndarray.js files still missing the directive; full list in the local report)

Related Issues

No.

Questions

No.

Other

Validation

  • Pattern search scope: ndarray namespace for the validation-package swap; math/strided/{ops,special}/*-by test files for the lint-disable directive.
  • Candidate enumeration: rg / script-driven search, cross-checked by a sonnet Explore agent. Results reconciled against a Python pass that classifies each sparse-array line as needs-fix or already-fixed based on the preceding line.
  • Independent validation: opus agent audited (a) Pattern A target files to confirm dt originates from ndarray dtype context (verified via getDType / opts.dtype / DEFAULT_CMPLX), and (b) a sampled cross-section of Pattern B sites to confirm the idiom is intentional sparse-array construction and the preceding line lacks a disable directive. All sampled sites returned confirmed.
  • Style: patches match source-commit style verbatim — single-line module-path swap for Pattern A, tab-indented // eslint-disable-next-line stdlib/no-new-array preceding each new Array(...) for Pattern B.

Deliberately excluded

  • Sites already fixed by the source commit (math/strided/special/sin-by/test/test.ndarray.js) and sibling *-by files that already had the directive (e.g. acovercos-by, abs-by/test.main.js, atan-by/test.main.js).
  • chore: add missing npm engine constraint to stats/base/dists/*/ctor (187e14109) — touches only package.json, excluded per chore-propagation scope rules.
  • docs: update namespace table of contents (0f62461c9, f38217702) — auto-generated ToC updates with no generalizable signature.
  • chore: clean-up native wrappers (e3862232d): all 7 napi/argv-*/lib/native.js sites matching the pattern are already in the corrected form.
  • chore: clean-up (9cc43caf4) targeting napi/argv-booleanarray: effectively reverted by e60e084fe, so the guarded form is now the canonical shape; no propagation target.
  • docs: propagate recent fixes to sibling packages (59d0640a1): the "does not perform rotation" → "a rotation" typo fix and argv-bool "number → boolean" typo fix have no remaining sites in the ndarray rotation namespace or type-specific argv-* packages.

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 running the fix-propagation routine: it enumerated fix: / chore: / docs: commits merged to develop in the preceding 24 hours, derived pattern signatures, searched for sibling sites via rg, validated each candidate with an opus audit agent, and applied the propagated patches. A human maintainer will audit before promoting out of draft.


@stdlib-js/reviewers

claude added 2 commits April 21, 2026 13:36
…rray/from-scalar-like`

Propagates fix from b7f85c2 ("fix: use correct validation package") to sibling ndarray packages which were importing the array-dtype variant of `is-complex-floating-point-data-type` despite resolving `dt` from ndarray dtype context.
…ath/strided/{ops,special}/*-by` tests

Propagates fix from 1089250 ("chore: fix JavaScript lint errors") to sibling `*-by` test files where the intentional `new Array( N ); // sparse array` idiom was present without the required `// eslint-disable-next-line stdlib/no-new-array` directive. Covers 40 test files across `math/strided/ops/{add,sub,mul}-by` and `math/strided/special/*-by`.
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Apr 21, 2026

Coverage Report

Package Statements Branches Functions Lines
math/strided/ops/add-by $\color{green}206/206$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}206/206$
$\color{green}+0.00%$
math/strided/ops/mul-by $\color{green}206/206$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}206/206$
$\color{green}+0.00%$
math/strided/ops/sub-by $\color{green}206/206$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}206/206$
$\color{green}+0.00%$
math/strided/special/abs-by $\color{green}195/195$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}195/195$
$\color{green}+0.00%$
math/strided/special/abs2-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/acos-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/acosh-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/acot-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/acoth-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/acoversin-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/ahaversin-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/asin-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/asinh-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/atan-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/atanh-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/avercos-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/besselj0-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/besselj1-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/bessely0-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/bessely1-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/binet-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/cbrt-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/cos-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/sin-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
math/strided/special/sqrt-by $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
ndarray/from-scalar-like $\color{green}190/190$
$\color{green}+0.00%$
$\color{green}23/23$
$\color{green}+0.00%$
$\color{green}1/1$
$\color{green}+0.00%$
$\color{green}190/190$
$\color{green}+0.00%$
ndarray/from-scalar $\color{red}230/232$
$\color{green}+0.00%$
$\color{red}30/31$
$\color{green}+0.00%$
$\color{green}1/1$
$\color{green}+0.00%$
$\color{red}230/232$
$\color{green}+0.00%$

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

…n `math/strided/ops/*-by` tests

Satisfies `lines-around-comment` (`beforeLineComment: true`) where the disable directives were inserted between consecutive `new Array(...)` assignments in the previous commit.
@Planeshifter Planeshifter changed the title Propagate recent fixes from develop to sibling packages chore: propagate recent fixes from develop to sibling packages Apr 21, 2026
@Planeshifter Planeshifter changed the title chore: propagate recent fixes from develop to sibling packages chore: propagate recent fixes to sibling packages Apr 22, 2026
@Planeshifter Planeshifter marked this pull request as ready for review April 22, 2026 00:15
@Planeshifter Planeshifter requested review from a team and kgryte April 22, 2026 00:15
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 22, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Apr 22, 2026
@kgryte kgryte merged commit bf821ca into develop Apr 22, 2026
37 checks passed
@kgryte kgryte deleted the philipp/fix-propagation-2026-04-21 branch April 22, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants