Skip to content

chore: propagate recent fixes to sibling packages#11723

Open
Planeshifter wants to merge 2 commits intodevelopfrom
philipp/fix-propagation-2026-04-22
Open

chore: propagate recent fixes to sibling packages#11723
Planeshifter wants to merge 2 commits intodevelopfrom
philipp/fix-propagation-2026-04-22

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Propagating fixes merged to develop between 2026-04-21T04:45Z and 2026-04-22T13:30Z to sibling packages with the same underlying defect.

Source: 11fe9784 — docs typo

Propagates the typo fix from 11fe9784, which corrected a missing verb in the example intro sentence of ddiff's README ("to differences" → "to compute differences"). Applied the identical correction to blas/ext/base/sdiff, the float32 sibling. No logic changes.

  • lib/node_modules/@stdlib/blas/ext/base/sdiff/README.md

Source: 80a434fd — redundant isnan guards

Propagates 80a434fd, which removed redundant isnan pre-checks that are already subsumed by !isInteger() — since isInteger(NaN) returns false, the explicit NaN guards are dead code. Applies the same removal (two guard clauses plus the is-nan require) across the seven stats/base/dists/discrete-uniform/ distribution properties: mean, variance, entropy, kurtosis, skewness, stdev, and median. Sibling files covering cdf, logcdf, logpmf, pmf, quantile, and mgf are excluded because they additionally guard continuous inputs (e.g., isnan(x), isnan(p), isnan(t)) that have no equivalent named validator, so partial removal there requires adaptation beyond the scope of the source commit.

  • lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/mean/lib/main.js
  • lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/variance/lib/main.js
  • lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/entropy/lib/main.js
  • lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/kurtosis/lib/main.js
  • lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/skewness/lib/main.js
  • lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/stdev/lib/main.js
  • lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/median/lib/main.js

Related Issues

None.

Questions

No.

Other

Validation

  • Pattern search scope:
    • 80a434fd — all lib/node_modules/@stdlib/stats/base/dists/**/lib/main.js requiring @stdlib/math/base/assert/is-nan (406 files narrowed to 39 with a named validator + isnan guard, then read in full).
    • 11fe9784 — full repo rg for "to differences of every other element".
  • Two independent Opus validation agents read each of the seven discrete-uniform targets in full and separately returned confirmed for all seven. A Sonnet style-consistency pass re-verified that each post-removal imports block remains correctly ordered and that untouched sibling files (e.g. discrete-uniform/cdf) legitimately retain their isnan(x) guards.
  • Deliberately excluded (flagged needs-human or out of scope):
    • negative-binomial/mean — exact two-block shape match, but the next block has no named validator (only r <= 0.0, p < 0.0, p > 1.0). Behavior is preserved only via arithmetic NaN propagation, a weaker guarantee than the source commit's intent.
    • hypergeometric/{cdf,logpmf,pmf,quantile}isnan(N/K/n) are redundant but isnan(x) / isnan(p) gate continuous inputs; partial removal is adaptive, not mechanical.
    • binomial/* (13 files), erlang/* (8 files), discrete-uniform/{cdf,logcdf,logpmf,pmf,quantile,mgf} — same reason: remaining isnan(x) / isnan(p) / isnan(t) clauses are not covered by any named validator.
    • 1089250d (missing eslint-disable stdlib/no-new-array in sin-by/test/test.ndarray.js) — search confirmed every other math/strided/{special,ops}/*-by/test/test.*.js already carries the comment from bf821ca6. No remaining sites.
    • Source commits outside this pattern set (refactor!: NaN-check removals in number/{int32,uint32}/base/muldw, README indentation normalization in stats/base/ndarray/dmaxsorted, rot90 description rewrite, migration-guide phrasing tweaks) — each is either a breaking API change or specific to a single file with no sibling that matches the exact pattern.

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 produced by Claude Code running the fix-propagation routine: it enumerated fixes merged to develop in the last 24 hours, extracted pattern signatures, searched for sibling sites, and filtered candidates through independent validation agents. Each landed change was reviewed against the original commit's intent before inclusion.


claude added 2 commits April 22, 2026 14:01
Propagates fix from 11fe978 ("chore: minor clean-up") to the sdiff
sibling: corrects "to differences of every other element" →
"to compute differences of every other element" to match the ddiff
phrasing.
…crete-uniform/*`

Propagates fix from 80a434f ("refactor: remove unneeded `isnan`
checks") to the discrete-uniform sibling distribution: removes the
redundant `isnan( a )` / `isnan( b )` clauses (and their `is-nan`
require) from mean, variance, entropy, kurtosis, skewness, stdev, and
median. `!isInteger( a )` / `!isInteger( b )` already short-circuit to
`return NaN` for NaN inputs, so the `isnan` calls are dead code.
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/sdiff $\color{red}642/644$
$\color{green}+99.69%$
$\color{red}44/45$
$\color{green}+97.78%$
$\color{green}5/5$
$\color{green}+100.00%$
$\color{red}642/644$
$\color{green}+99.69%$
stats/base/dists/discrete-uniform/entropy $\color{green}179/179$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}179/179$
$\color{green}+100.00%$
stats/base/dists/discrete-uniform/kurtosis $\color{green}181/181$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}181/181$
$\color{green}+100.00%$
stats/base/dists/discrete-uniform/mean $\color{green}178/178$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}178/178$
$\color{green}+100.00%$
stats/base/dists/discrete-uniform/median $\color{green}178/178$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}178/178$
$\color{green}+100.00%$
stats/base/dists/discrete-uniform/skewness $\color{green}178/178$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}178/178$
$\color{green}+100.00%$
stats/base/dists/discrete-uniform/stdev $\color{green}185/185$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}185/185$
$\color{green}+100.00%$
stats/base/dists/discrete-uniform/variance $\color{green}179/179$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}179/179$
$\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 April 22, 2026 21:19
@Planeshifter Planeshifter requested review from a team and kgryte April 22, 2026 21:19
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. labels Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants