chore: clean-up - #13754
Conversation
Propagates fix from c5d65b1 ("chore: clean-up") to sibling mgf packages (gamma, gumbel, negative-binomial) whose factory closure guard omits the `isnan( t )` check present in the corresponding `main.js`.
Propagates fixes from b9ea7bd ("chore: clean-up") to sibling packages with the same defects: corrects the `from()` interleaved-copy loop bound (`len` -> `tmp.length`) in `array/complex128` and `array/complex64`, which silently zeroed all but the first element when converting a non-collection iterable, and removes double-period typos in `array/uint32` and `blas/ext/base/wasm/dapx` READMEs.
Propagates fix from 7c34546 ("docs: extract options variable in `dwxmy` examples") to sibling `blas/ext/base/d*` packages whose README and example files pass the same inline options object to multiple random array generator calls. Ref: stdlib-js/metr-issue-tracker#880
Renames `node/no-sync` disable directives to `n/no-sync`, matching every other wasm README. The stale rule name fails the changed-files example lint on this PR, as the rule definition no longer exists.
Removes a stray usage-section close/reopen which split the module wrapper documentation into a second section erroneously opened with `class="notes"` and closed with a `usage` comment, failing the changed-files Markdown lint. The README now has a single usage section followed by notes, matching sibling wasm packages.
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
The Because this PR touches Independently verified locally against the PR head with the repo-pinned Bounding the batch size in the runner script (e.g. Generated by Claude Code |
|
As the CI failure is expected, I'll go ahead and merge. |
array, stats, and blas/ext/base
Description
Propagating fixes merged to
developbetween 2026-07-28T13:09Z and 2026-07-29T13:09Z to sibling packages with the same underlying defects. Four source patterns, one commit per source fix:docs: remove hyphen(d5a7bdb, 3311629)Propagates commits d5a7bdb and 3311629 ("docs: remove hyphen"), which drop the hyphen from "identity-function" in the README intro sentence's link display text (the link label itself retains the hyphen). Applies the identical one-line edit to the remaining sibling
identitypackages:number/float32/base/identity,number/uint8/base/identity,number/uint16/base/identity,number/int8/base/identity,number/int16/base/identity,number/int32/base/identity,complex/float32/base/identity, andcomplex/float64/base/identity.chore: clean-up(c5d65b1, #13725)Commit c5d65b1 added
isnan( t ) ||to the closure guard instats/base/dists/laplace/mgf/lib/factory.js, bringing it into line with the equivalent check already present inlib/main.js. This propagates that same one-line guard addition to the three sibling factories exhibiting the identical omission:stats/base/dists/gamma/mgf,stats/base/dists/gumbel/mgf, andstats/base/dists/negative-binomial/mgf;isnanis already imported in each, andmain.jsalready checks for it.stats/base/dists/poisson/mgfis excluded — its inner function has no guard to extend, so the edit does not apply. No behavioral change: NaN already propagates to NaN through the underlying math in all four cases.chore: clean-up(b9ea7bd, #13723)Fixes the
from()iterable loop bound inarray/complex128andarray/complex64lib/main.js, propagated from b9ea7bd where the same bug was fixed inarray/uint64: the loop iteratedi < len(= tmp.length / 2) rather thani < tmp.length, so only the first half of the interleaved real/imaginary word buffer was copied. Converting a non-collection iterable of[re, im]pairs zeroed every element after the first —Complex128Array.from( <iterable of [1,2],[3,4],[5,6]> )produced1+2i, 3+0i, 0+0iinstead of1+2i, 3+4i, 5+6i. Existing tests for the iterable path asserted onlyinstanceofandlength, so the bug shipped without a failing test. Also propagates the double-period typo fixes (source index..,...better than the other..) from the same commit toarray/uint32/README.mdandblas/ext/base/wasm/dapx/README.md.docs: extract options variable(7c34546)Source commit 7c34546 extracted a repeated inline
{ 'dtype': 'float64' }options literal inblas/ext/base/dwxmy's README andexamples/index.jsinto a single sharedoptsvariable passed to eachdiscreteUniformcall. This propagates the identical extraction to the 13d*siblings underblas/ext/baseexhibiting the same pattern — two or morediscreteUniformcalls sharing an inline options literal — across 26 files:daxpby,dcartesian-product,ddiff,dediff,dfirst-index-equal,dfirst-index-less-than,dwapx,dwax,dwxsa,dxdy,dxmy,dxpy,dxsy.dwhereis excluded — its example mixesuint8andfloat64options, so no single shared variable applies. Scope is bounded toblas/ext/base/d*; the ~126 remaining repo-wide matches are left for follow-up passes.Related Issues
No related issues in this repository. The options-variable extraction follows stdlib-js/metr-issue-tracker#880.
Questions
No.
Other
CI follow-ups. The
blas/ext/base/wasm/dapxREADME carried two pre-existing lint defects surfaced once the typo fix pulled the file into the changed-files scope: 41c242f renames three stale<!-- eslint-disable node/no-sync -->directives ton/no-sync(the current rule name, used by every other wasm README), and 4eef492 removes a stray usage-section close/reopen which split the module-wrapper docs into a second section erroneously opened withclass="notes"and closed with ausagecomment (the README now has a single usage section followed by notes, matching sibling wasm packages such asblas/base/wasm/dasum).Validation. Each candidate site passed: a pattern-specification pass over the source commits; a scoped
rgsite search excluding the already-fixed source packages; open-PR and recently-merged-PR collision checks; a generator-owned-file check (all target lines sit outside auto-populated README sections); two independent validation agents reading each target file in full (both required to confirm); an adaptation pass producing exact per-site patches; and a style-consistency pass againstdocs/style-guides. Thecomplex128/complex64loop-bound bug was independently reproduced at runtime by both validation agents and re-verified after the fix; the fulltest/test.from.jssuites pass unchanged before and after (no test encodes the buggy element values).Deliberately excluded.
stats/base/dists/poisson/mgf(no existing guard to extend);blas/ext/base/dwhere(heterogeneous dtype literals — flagged needs-human);string/right-trim-nandstring/left-trim-n// Case:comments ending in..(corpus analysis shows the repo convention is a three-dot ellipsis, so the defect there is a missing dot, not an extra one); seven further sub-patterns of the source commits (trailing blank line, missing@exampletag, "an typed" typo, corrupted JSDoc marker, JSDoc leading-space indentation, mismatched benchmarkrequire,typeofordering in duck-type guards) whose repo-wide searches returned zero remaining sites.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code via the daily fix-propagation routine: commits merged to
developin the last 24 hours were mined for generalizable fix patterns, sibling sites were enumerated by scoped search, and every site was gated through two independent validation agents, an adaptation pass, and a style-consistency pass before any file was edited. Sites failing any gate were dropped and logged. A maintainer should audit and promote out of draft.@stdlib-js/reviewers