Skip to content

chore: follow-up fixes#11721

Merged
kgryte merged 4 commits intodevelopfrom
philipp/fix-commit-review-2026-04-22
Apr 23, 2026
Merged

chore: follow-up fixes#11721
kgryte merged 4 commits intodevelopfrom
philipp/fix-commit-review-2026-04-22

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Follow-up fixes for commits merged to develop between 2026-04-21 12:06:09 -0700 (6f2e5f611) and 2026-04-22 04:44:47 -0700 (78898df73).

Findings were gathered by running four independent reviewers (two style-guide, two bug-hunting) across the union diff of the window; only issues reproducible from the diff alone and supported by a concrete fix are included. Each bullet cites the originating commit:

blas/ext/base/scusumkbn2

  • Memory leak in c5b700a07: lib/node_modules/@stdlib/blas/ext/base/scusumkbn2/benchmark/c/benchmark.length.c refactored benchmark1 to heap-allocate x and y but forgot to free them; add matching free calls before return elapsed; to match benchmark2.

blas/ext/base/sdiff

  • Fix missing verb in sdiff README (7c287ff7a, lib/node_modules/@stdlib/blas/ext/base/sdiff/README.md): insert "compute" in sentence that reads "to differences of every other element" to match ddiff peer implementation.

docs/migration-guides/numpy

  • Fix typos in numpy migration guide: correct np.count_nonzeros to np.count_nonzero (1be7bcc81, docs/migration-guides/numpy/README.md) and remove duplicated article in "Prepend a a specified number of singleton dimensions".

ndarray/base/reinterpret-boolean

  • Remove stray eslint directive from lib/node_modules/@stdlib/ndarray/base/reinterpret-boolean/docs/types/test.ts (be023a59). The /* eslint-disable space-in-parens */ comment serves no purpose — the file has no violations and sibling modules don't carry it.

Related Issues

None.

Questions

No.

Other

Validation

Checked:

  • Style-guide compliance for all new blas/ext/base, ndarray/base, napi, number/{u,}int32/base/muldw, blas/base/cgemv, and the NumPy migration guide additions against docs/style-guides and sibling reference packages.
  • Bug scan across the full union diff focused on new code paths (unitspace reductions, sdiff forward-difference recursion, reinterpret casts, rot180 indexing, N-API strided boolean matrix parsing) plus the mechanical VLA→heap C benchmark refactor (malloc/free balance, no double-free).

Deliberately excluded (did not meet the high-signal bar):

  • Breaking NaN-guard removals in number/{u,}int32/base/muldw and the redundant-isnan drop in stats/base/dists/hypergeometric/mean — intentional per the refactor! / refactor: commit messages.
  • Namespace-ordering concerns around reinterpretComplex64/reinterpretComplex128 and rot180/rot90 — stdlib uses natural numeric ordering for dtype suffixes (see @stdlib/array where Complex64Array precedes Complex128Array), so the existing ordering is consistent.
  • Early-return guard if ( total <= 1 || k >= total ) in blas/ext/base/sdiff/lib/ndarray.js and src/main.c — the peer package blas/ext/base/ddiff carries the identical guard, so revisiting it would require a scope expansion beyond this window.

Checklist

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 prepared by Claude Code: an automated 24-hour review pass spawned four independent reviewer agents (two style, two bug) against the union diff of commits merged to develop, findings were cross-verified by re-reading the diff, and the surviving issues were fixed mechanically. All fixes are local, reversible, and reference-verified against sibling packages.


@stdlib-js/reviewers

claude added 4 commits April 22, 2026 12:34
When the benchmark was converted from VLAs to heap allocation, the
matching `free( x )` / `free( y )` calls were only added to
`benchmark2`; `benchmark1` was left leaking both buffers on every
invocation. Add the missing frees so both benchmarks release their
allocations before returning.

Ref: c5b700a
The strided example introduction dropped the verb "compute",
producing "to differences of every other element". Match the peer
`ddiff` README wording so the sentence is grammatical.

Ref: 7c287ff
- Corrects `np.count_nonzeros` to `np.count_nonzero` (the actual
  NumPy API name; already spelled correctly elsewhere in the same
  table).
- Removes a duplicated article in "Prepend a a specified number of
  singleton dimensions".

Ref: 1be7bcc
…n` test

The TypeScript declaration test carried a stray
`/* eslint-disable space-in-parens */` directive absent from the
sibling `reinterpret-complex64` and `reinterpret-complex128` tests;
the file has no `space-in-parens` violations, so the directive is
noise.

Ref: be023a5
@Planeshifter Planeshifter changed the title Follow-up fixes for commits merged to develop on 2026-04-21/22 chore: follow-up fixes from 2026-04-22 commit review Apr 22, 2026
@Planeshifter Planeshifter changed the title chore: follow-up fixes from 2026-04-22 commit review chore: follow-up fixes Apr 22, 2026
@Planeshifter Planeshifter marked this pull request as ready for review April 22, 2026 21:36
@Planeshifter Planeshifter requested a review from a team April 22, 2026 21:36
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 22, 2026
@Planeshifter Planeshifter requested a review from kgryte April 22, 2026 21:36
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Apr 23, 2026
@kgryte kgryte merged commit 40db61d into develop Apr 23, 2026
48 of 49 checks passed
@kgryte kgryte deleted the philipp/fix-commit-review-2026-04-22 branch April 23, 2026 08:19
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