Skip to content

chore: clean-up - #13754

Merged
kgryte merged 6 commits into
developfrom
philipp/fix-propagation-2026-07-29
Jul 30, 2026
Merged

chore: clean-up#13754
kgryte merged 6 commits into
developfrom
philipp/fix-propagation-2026-07-29

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Jul 29, 2026

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

Propagating fixes merged to develop between 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 identity packages: 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, and complex/float64/base/identity.

chore: clean-up (c5d65b1, #13725)

Commit c5d65b1 added isnan( t ) || to the closure guard in stats/base/dists/laplace/mgf/lib/factory.js, bringing it into line with the equivalent check already present in lib/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, and stats/base/dists/negative-binomial/mgf; isnan is already imported in each, and main.js already checks for it. stats/base/dists/poisson/mgf is 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 in array/complex128 and array/complex64 lib/main.js, propagated from b9ea7bd where the same bug was fixed in array/uint64: the loop iterated i < len (= tmp.length / 2) rather than i < 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]> ) produced 1+2i, 3+0i, 0+0i instead of 1+2i, 3+4i, 5+6i. Existing tests for the iterable path asserted only instanceof and length, 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 to array/uint32/README.md and blas/ext/base/wasm/dapx/README.md.

docs: extract options variable (7c34546)

Source commit 7c34546 extracted a repeated inline { 'dtype': 'float64' } options literal in blas/ext/base/dwxmy's README and examples/index.js into a single shared opts variable passed to each discreteUniform call. This propagates the identical extraction to the 13 d* siblings under blas/ext/base exhibiting the same pattern — two or more discreteUniform calls 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. dwhere is excluded — its example mixes uint8 and float64 options, so no single shared variable applies. Scope is bounded to blas/ext/base/d*; the ~126 remaining repo-wide matches are left for follow-up passes.

Related Issues

Does this pull request have any related issues?

No related issues in this repository. The options-variable extraction follows stdlib-js/metr-issue-tracker#880.

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.

CI follow-ups. The blas/ext/base/wasm/dapx README 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 to n/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 with class="notes" and closed with a usage comment (the README now has a single usage section followed by notes, matching sibling wasm packages such as blas/base/wasm/dasum).

Validation. Each candidate site passed: a pattern-specification pass over the source commits; a scoped rg site 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 against docs/style-guides. The complex128/complex64 loop-bound bug was independently reproduced at runtime by both validation agents and re-verified after the fix; the full test/test.from.js suites 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-n and string/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 @example tag, "an typed" typo, corrupted JSDoc marker, JSDoc leading-space indentation, mismatched benchmark require, typeof ordering in duck-type guards) whose repo-wide searches returned zero remaining sites.

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

This PR was authored by Claude Code via the daily fix-propagation routine: commits merged to develop in 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

claude added 4 commits July 29, 2026 13:32
Propagates fix from d5a7bdb and 3311629 ("docs: remove hyphen") to
the remaining sibling identity packages whose README intro uses a
hyphenated "identity-function" as link display text.
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
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Jul 29, 2026
claude added 2 commits July 29, 2026 13:39
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.
@stdlib-bot

stdlib-bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
array/complex128 $\\color{red}2964/2974$
$\\color{green}+99.66\\%$
$\\color{red}528/536$
$\\color{green}+98.51\\%$
$\\color{green}54/54$
$\\color{green}+100.00\\%$
$\\color{red}2964/2974$
$\\color{green}+99.66\\%$
array/complex64 $\\color{red}2964/2974$
$\\color{green}+99.66\\%$
$\\color{red}526/534$
$\\color{green}+98.50\\%$
$\\color{green}54/54$
$\\color{green}+100.00\\%$
$\\color{red}2964/2974$
$\\color{green}+99.66\\%$
array/uint32 $\\color{green}117/117$
$\\color{green}+100.00\\%$
$\\color{red}6/7$
$\\color{green}+85.71\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}117/117$
$\\color{green}+100.00\\%$
blas/ext/base/daxpby $\\color{green}427/427$
$\\color{green}+100.00\\%$
$\\color{green}30/30$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}427/427$
$\\color{green}+100.00\\%$
blas/ext/base/dcartesian-product $\\color{green}492/492$
$\\color{green}+100.00\\%$
$\\color{green}38/38$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}492/492$
$\\color{green}+100.00\\%$
blas/ext/base/ddiff $\\color{red}627/629$
$\\color{green}+99.68\\%$
$\\color{red}44/45$
$\\color{green}+97.78\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{red}627/629$
$\\color{green}+99.68\\%$
blas/ext/base/dediff $\\color{green}446/446$
$\\color{green}+100.00\\%$
$\\color{green}17/17$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}446/446$
$\\color{green}+100.00\\%$
blas/ext/base/dfirst-index-equal $\\color{green}372/372$
$\\color{green}+100.00\\%$
$\\color{green}19/19$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}372/372$
$\\color{green}+100.00\\%$
blas/ext/base/dfirst-index-less-than $\\color{green}372/372$
$\\color{green}+100.00\\%$
$\\color{green}19/19$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}372/372$
$\\color{green}+100.00\\%$
blas/ext/base/dwapx $\\color{green}418/418$
$\\color{green}+100.00\\%$
$\\color{green}28/28$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}418/418$
$\\color{green}+100.00\\%$
blas/ext/base/dwax $\\color{green}418/418$
$\\color{green}+100.00\\%$
$\\color{green}28/28$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}418/418$
$\\color{green}+100.00\\%$
blas/ext/base/dwxsa $\\color{green}418/418$
$\\color{green}+100.00\\%$
$\\color{green}28/28$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}418/418$
$\\color{green}+100.00\\%$
blas/ext/base/dxdy $\\color{green}405/405$
$\\color{green}+100.00\\%$
$\\color{green}26/26$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}405/405$
$\\color{green}+100.00\\%$
blas/ext/base/dxmy $\\color{green}405/405$
$\\color{green}+100.00\\%$
$\\color{green}26/26$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}405/405$
$\\color{green}+100.00\\%$
blas/ext/base/dxpy $\\color{green}405/405$
$\\color{green}+100.00\\%$
$\\color{green}26/26$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}405/405$
$\\color{green}+100.00\\%$
blas/ext/base/dxsy $\\color{green}405/405$
$\\color{green}+100.00\\%$
$\\color{green}26/26$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}405/405$
$\\color{green}+100.00\\%$
blas/ext/base/wasm/dapx $\\color{green}582/582$
$\\color{green}+100.00\\%$
$\\color{green}17/17$
$\\color{green}+100.00\\%$
$\\color{green}6/6$
$\\color{green}+100.00\\%$
$\\color{green}582/582$
$\\color{green}+100.00\\%$
complex/float32/base/identity $\\color{green}133/133$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}133/133$
$\\color{green}+100.00\\%$
complex/float64/base/identity $\\color{green}133/133$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}133/133$
$\\color{green}+100.00\\%$
number/float32/base/identity $\\color{green}170/170$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}170/170$
$\\color{green}+100.00\\%$
number/int16/base/identity $\\color{green}159/159$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}159/159$
$\\color{green}+100.00\\%$
number/int32/base/identity $\\color{green}159/159$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}159/159$
$\\color{green}+100.00\\%$
number/int8/base/identity $\\color{green}159/159$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}159/159$
$\\color{green}+100.00\\%$
number/uint16/base/identity $\\color{green}159/159$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}159/159$
$\\color{green}+100.00\\%$
number/uint8/base/identity $\\color{green}159/159$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}159/159$
$\\color{green}+0.00\\%$
stats/base/dists/gamma/mgf $\\color{green}322/322$
$\\color{green}+0.00\\%$
$\\color{green}23/23$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}322/322$
$\\color{green}+0.00\\%$
stats/base/dists/gumbel/mgf $\\color{green}296/296$
$\\color{green}+0.00\\%$
$\\color{green}21/21$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}296/296$
$\\color{green}+0.00\\%$
stats/base/dists/negative-binomial/mgf $\\color{green}299/299$
$\\color{green}+0.00\\%$
$\\color{green}25/25$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}299/299$
$\\color{green}+0.00\\%$

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

Copy link
Copy Markdown
Member Author

The Run affected tests failure on this PR is a CI tooling limitation, not a test failure. All three runs die the same way before the first batch of tests executes:

make: bash: Argument list too long
make: *** [tools/make/lib/test/javascript.mk:318: test-javascript-files-min] Error 127

Because this PR touches array/uint32, array/complex128, and array/complex64, the dependent-package closure computed by .github/workflows/scripts/run_affected_tests/run is very large, and the first xargs sh -c 'make test-javascript-files-min FILES="$*"' batch exceeds the argument-size limit when make spawns its recipe shell. The remaining batches run and pass (~600 suites in the log, zero failing assertions, including all changed packages: the mgf factories, identity packages, blas/ext/base/d*, and wasm/dapx); xargs then propagates exit code 123. The push-event run of the same workflow on this branch succeeded, as did the coverage job, which executes the changed packages' suites (including the 35-file array/complex128/complex64 suites) with all-green deltas.

Independently verified locally against the PR head with the repo-pinned tape fork and proxyquire: every test file in array/complex128, array/complex64, and array/uint32 passes, as do the suites of all direct dependents of the changed packages.

Bounding the batch size in the runner script (e.g. xargs -n 100 sh -c ...) would fix this for any wide-closure PR; left out of this PR to keep the propagation scope clean. The check will stay red for this PR until the script is patched or the run is skipped.


Generated by Claude Code

@kgryte
kgryte marked this pull request as ready for review July 30, 2026 02:18
@kgryte
kgryte requested a review from a team July 30, 2026 02:18
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 30, 2026
@kgryte

kgryte commented Jul 30, 2026

Copy link
Copy Markdown
Member

As the CI failure is expected, I'll go ahead and merge.

@kgryte kgryte changed the title docs: propagate fixes across array, stats, and blas/ext/base chore: clean-up Jul 30, 2026
@kgryte
kgryte merged commit 10ee0a5 into develop Jul 30, 2026
35 of 36 checks passed
@kgryte
kgryte deleted the philipp/fix-propagation-2026-07-29 branch July 30, 2026 02:20
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jul 30, 2026
@Planeshifter Planeshifter mentioned this pull request Jul 30, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants