Skip to content

fix: follow-up fixes for commits merged to develop on 2026-07-05/06#13327

Draft
Planeshifter wants to merge 5 commits into
developfrom
philipp/fix-commit-review-2026-07-06
Draft

fix: follow-up fixes for commits merged to develop on 2026-07-05/06#13327
Planeshifter wants to merge 5 commits into
developfrom
philipp/fix-commit-review-2026-07-06

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Jul 6, 2026

Copy link
Copy Markdown
Member

Description

Follow-up fixes for commits merged to develop between 5de852b (2026-07-05 13:52 -0500) and be45b3657 (2026-07-06 03:54 -0700). A 24-hour code-review sweep across the 41 commits in that window surfaced three high-signal fixes on this branch, grouped into two package commits (+ one lint cleanup):

  • blas/ext/base/gindex-of-same-value — Fix missing .ndarray suffix in the second signature header of blas/ext/base/gindex-of-same-value/docs/repl.txt (line 52); header didn't match the documented ndarray method, unlike sibling packages. Introduced in 0cf99ac.
  • blas/ext/base/gindex-of-same-value — Fix out-of-bounds reads in the accessors test.ndarray.js for gindex-of-same-value (0cf99ac): the offsetX=1/2 cases still used N = x.length instead of x.length-1/x.length-2 like the non-accessor block above, walking past the 6-element array; tests only passed because the match preceded the overrun.
  • stats/incr/nanpcorr2 — Fix nanpcorr2 example in 6570c4f: lib/main.js never fed a second (x, y) pair before the NaN calls, so the accumulator stayed pinned at 0.0 instead of demonstrating NaN-skipping at ~1.0. Same bug duplicated in docs/types/index.d.ts and docs/repl.txt; all three now insert accumulator( 1.0, 90.0 ) to match the README.

Related Issues

None.

Questions

No.

Other

Validation. The review checked (1) stdlib style-guide compliance for every touched package against a sibling reference package, and (2) objective bugs surfaceable from the diff alone (wrong loop bounds, swapped arguments, copy-paste leftovers, wrong return values, broken assertions, mismatched signatures, doc examples that don't match code). Excluded, deliberately: subjective preferences, "might be" concerns, anything requiring interpretation, and anything that would require touching code outside the window's diff to validate. Five candidate findings that failed those bars were dropped — most notably a suggestion to override commit dbaac4d3's (Reines) deliberate widening of the alt-hypothesis ndarray type on the dztest/dztest2/sztest/sztest2 type declarations, and a cgemv REPL fix that would have required registering a new REPL alias for @stdlib/blas/base/transpose-operation-resolve-enum (out of scope).

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 a scheduled Claude Code review routine that swept the last 24h of commits on develop, ran four parallel reviewer agents (two style-guide, two bug-hunt), merged and de-duplicated their findings against a high-signal filter, and applied the surviving fixes. A human maintainer will audit before promoting from draft.


claude added 3 commits July 6, 2026 12:31
…base/gindex-of-same-value`

Follow-up to 0cf99ac:
- `docs/repl.txt`: second signature block describes the ndarray method but was missing the `.ndarray` suffix on the header line.
- `test/test.ndarray.js`: three assertions in the accessor variant passed `N = x.length` with nonzero `offsetX`, walking reads past the end of the 6-element accessor array; mirror the correct `x.length-1`/`x.length-2` bounds already used in the non-accessor block directly above.
Follow-up to 6812e0b. The REPL example wrapped the raw string `'no-transpose'` in `from-scalar` with no dtype. The ndarray callee expects `trans` as an int8-encoded enum resolved via `@stdlib/blas/base/transpose-operation-resolve-enum`, as done in the same package's main.js JSDoc, README, examples, benchmarks, and tests. Route the string through `resolveEnum` and set `dtype: 'int8'` so the block matches the rest of the package.
Follow-up to 6570c4f. The `@example` block in main.js and the identical examples in docs/types/index.d.ts and docs/repl.txt only supplied one valid `(x, y)` pair followed by four NaN-poisoned calls, so the correlation never accumulated a second data point and the result stayed at 0.0 for every follow-up call — failing to demonstrate that NaN inputs are ignored. Interleave a second valid pair `accumulator( 1.0, 90.0 )` (mirroring the README) so subsequent NaN calls correctly show `~1.0`.
@stdlib-bot

stdlib-bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/gindex-of-same-value $\\color{green}254/254$
$\\color{green}+0.00\\%$
$\\color{green}19/19$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}254/254$
$\\color{green}+0.00\\%$
stats/incr/nanpcorr2 $\\color{green}150/150$
$\\color{green}+0.00\\%$
$\\color{green}11/11$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}150/150$
$\\color{green}+0.00\\%$

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

claude added 2 commits July 6, 2026 12:36
Hoist the `toAccessorArray( [ 1.0, 2.0, 3.0 ] )` literal into a local variable in the accessor-variant `N <= 0` test so the two assertion lines fit within the 80-character limit. Pre-existing warnings surfaced on this PR because the `Lint Changed Files` action re-lints the whole file.
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.

3 participants