Skip to content

chore: clean-up - #15455

Merged
kgryte merged 3 commits into
developfrom
claude/stoic-wozniak-hxk1r4
Sep 25, 2026
Merged

kgryte merged 3 commits into
developfrom
claude/stoic-wozniak-hxk1r4

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request propagates fixes merged to develop between 2026-09-22T19:31Z and 2026-09-23T11:54Z to sibling packages carrying the same defects.

4e396e96 — clean-up

Source: 4e396e96 ("chore: clean-up"). Three defects fixed there recur across siblings and are cleaned up here too:

  • 37 docs/types/test.ts files import their own package via @stdlib/... instead of ./index, inconsistent with the 5797 declaration tests already using the relative form — assert/is-int64, blas/base/ndarray/* (23 pkgs), blas/ext/base/ndarray/{dnansumkbn2,dnansumpw}, blas/ext/base/{ztril,ztriu}, math/iter/sequences/tribonacci, stats/base/ndarray/* (6 pkgs), stats/{mediansorted,nanrange-by}, stats/strided/drangeabs.
  • blas/ext/base/ztril/lib/main.js requires a sibling module missing its .js extension, violating stdlib/require-file-extensions.
  • 31 kernel signature headings in ndarray/base/kernels/generic/{binary-strided1d/unblocked,unary-strided1d/unblocked,unary-strided1d/blocked} READMEs say strideY/strideZ, mismatching the implementations, their JSDoc, and the READMEs' own param bullets, which all use stridesY/stridesZ.

Note that every one of the 37 packages sets "types": "./docs/types" and declares neither exports nor typesVersions, so both specifiers resolve to the same declaration file today. Nothing is currently mistyped; the imports are self-referential.

93afd5e9 — no-new-array

Propagates the lint fix from 93afd5e9 (stats/incr/mvmr) to stats/incr/mvariance, the last remaining sliding-window accumulator under stats/incr/ allocating its circular buffer via new Array( W ). Same two edits: zeros from @stdlib/array/base/zeros added to the require block (after isnan, before format, preserving descending line-length order) and buf = new Array( W ) replaced with buf = zeros( W ).

Output-neutral: every buffer slot is read only after the window has fully filled, so the initial fill value is never observed. Differential testing across 6.48M randomized cases (window sizes 1-6, known/unknown mean, NaN and finite value sequences) found zero output differences before/after.

Related Issues

Does this pull request have any related issues?

No.

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.

Validation

Candidate sites were enumerated by structural search scoped to each pattern's namespace, then correlated per site (for the declaration-test pattern, the import specifier was compared byte-for-byte against the package's own package.json "name"). Each site was then reviewed by two independent validation agents reading every target file in full, an adaptation pass producing the per-site patch, and a style-consistency pass checking the result against docs/style-guides and the merged sibling fixes. All 41 sites were confirmed by both validators with no rejections and none flagged as needing human judgment.

Deliberately excluded

  • C source file naming (d8a11675, src/<pkg>.c → src/main.c): ~130 sites repo-wide. Pure naming convention with no behavioural, performance, or user-visible effect; belongs in a dedicated sweep rather than here.
  • README intro/notes section wrappers (df5f5ec0): 1524 and 771 files respectively. Template conformance, not a defect, and far too broad for this PR.
  • sqrt/square round-trip and multiply-before-divide reordering (fed47c5a): no remaining sites under stats/base/dists/*. The one textual match elsewhere sits inside a Boost-derived special-function kernel where reordering would perturb well-tested numerical output.
  • FFTPACK doc link segment (f0a71106): no remaining sites; siblings are already consistent.
  • id-length suppression comments (ea32e3ad): the rule is configured as warn and 700+ identifiers already exceed the limit without suppressions, so matches are not actionable.
  • Broad new Array(...) replacement (93afd5e9): 63 textual matches outside stats/incr/, most either deliberate or already carrying inline rule suppressions. Only the single stats/incr/ sibling was a direct analog.
  • Example modernization to random/array/bernoulli (08e741bd): the one candidate samples a string array rather than a boolean one, so the source patch is not a direct analog.

No cross-package changes, no API changes, and no new tests beyond what already exists — every patch is self-contained within its target file.

Note on local verification

This repository's development dependencies are not installed in the environment used to prepare this branch, so ESLint and remark could not be run locally. The blas/ext/base/ztril and stats/incr/mvariance changes were smoke-tested directly under Node. CI is expected to provide full lint coverage.

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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This pull request was prepared by Claude Code as part of an automated routine that reviews fixes merged to develop and propagates them to sibling packages with the same defect. Candidate sites were found by structural search, each site was reviewed by independent validation passes before any edit was applied, and the resulting patches were checked against the merged source fixes. It is opened as a draft for maintainer review.


🤖 Generated with Claude Code

https://claude.ai/code/session_01NLYWTPagxP6PCB8rbZC9Q7


Generated by Claude Code

Planeshifter and others added 2 commits September 23, 2026 13:35
Propagates fix from 4e396e9 ("chore: clean-up") to sibling packages
carrying the same three defects.

-   37 TypeScript declaration tests imported their own package by its
    `@stdlib/...` specifier instead of `./index`. Both specifiers
    resolve to the same declaration file today, so nothing is
    mistyped; the imports are self-referential and diverge from the
    5797 declaration tests already using `./index`.

-   `blas/ext/base/ztril` required a sibling module without its file
    extension, violating `stdlib/require-file-extensions`, which the
    project configures as an error.

-   31 kernel signature headings across three
    `ndarray/base/kernels/generic/*-strided1d/*` READMEs documented
    `strideY`/`strideZ` where the implementations, their JSDoc
    annotations, and the READMEs' own parameter lists all use
    `stridesY`/`stridesZ`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NLYWTPagxP6PCB8rbZC9Q7
Propagates fix from 93afd5e ("chore: fix JavaScript lint errors") to
the one sibling accumulator still allocating its sliding-window buffer
with `new Array( W )`, which `stdlib/no-new-array` configures as an
error. As in the source commit, the buffer is now allocated via
`@stdlib/array/base/zeros`, avoiding a holey array.

The change is output-neutral: every read of a buffer slot is gated
behind a full window, so the initial fill value is never observable.
Differentially exercising the accumulator before and after across
6.48M randomized cases (window sizes 1-6, known and unknown means,
sequences drawn from NaN and assorted finite values) produced no
differences.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NLYWTPagxP6PCB8rbZC9Q7
@stdlib-bot

stdlib-bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
assert/is-int64 $\\color{green}96/96$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}96/96$
$\\color{green}+0.00\\%$
blas/base/ndarray/cgemv $\\color{green}169/169$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}169/169$
$\\color{green}+0.00\\%$
blas/base/ndarray/dgemm $\\color{green}197/197$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}197/197$
$\\color{green}+0.00\\%$
blas/base/ndarray/dgemv $\\color{green}167/167$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}167/167$
$\\color{green}+0.00\\%$
blas/base/ndarray/dger $\\color{green}147/147$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}147/147$
$\\color{green}+0.00\\%$
blas/base/ndarray/dspmv $\\color{green}160/160$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}160/160$
$\\color{green}+0.00\\%$
blas/base/ndarray/dspr $\\color{green}146/146$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}146/146$
$\\color{green}+0.00\\%$
blas/base/ndarray/dsyr $\\color{green}151/151$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}151/151$
$\\color{green}+0.00\\%$
blas/base/ndarray/dsyr2 $\\color{green}156/156$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}156/156$
$\\color{green}+0.00\\%$
blas/base/ndarray/dtrmv $\\color{green}164/164$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}164/164$
$\\color{green}+0.00\\%$
blas/base/ndarray/dtrsv $\\color{green}164/164$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}164/164$
$\\color{green}+0.00\\%$
blas/base/ndarray/ggemm $\\color{green}197/197$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}197/197$
$\\color{green}+0.00\\%$
blas/base/ndarray/ggemv $\\color{green}167/167$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}167/167$
$\\color{green}+0.00\\%$
blas/base/ndarray/gger $\\color{green}147/147$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}147/147$
$\\color{green}+0.00\\%$
blas/base/ndarray/gsyr $\\color{green}147/147$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}147/147$
$\\color{green}+0.00\\%$
blas/base/ndarray/sgemm $\\color{green}197/197$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}197/197$
$\\color{green}+0.00\\%$
blas/base/ndarray/sgemv $\\color{green}167/167$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}167/167$
$\\color{green}+0.00\\%$
blas/base/ndarray/sspr $\\color{green}146/146$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}146/146$
$\\color{green}+0.00\\%$
blas/base/ndarray/ssymv $\\color{green}165/165$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}165/165$
$\\color{green}+0.00\\%$
blas/base/ndarray/ssyr $\\color{green}151/151$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}151/151$
$\\color{green}+0.00\\%$
blas/base/ndarray/ssyr2 $\\color{green}156/156$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}156/156$
$\\color{green}+0.00\\%$
blas/base/ndarray/strmv $\\color{green}164/164$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}164/164$
$\\color{green}+0.00\\%$
blas/base/ndarray/strsv $\\color{green}164/164$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}164/164$
$\\color{green}+0.00\\%$
blas/ext/base/ndarray/dnansumkbn2 $\\color{green}103/103$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}103/103$
$\\color{green}+0.00\\%$
blas/ext/base/ndarray/dnansumpw $\\color{green}103/103$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}103/103$
$\\color{green}+0.00\\%$
blas/ext/base/ztril $\\color{green}590/590$
$\\color{green}+0.00\\%$
$\\color{green}43/43$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}590/590$
$\\color{green}+0.00\\%$
blas/ext/base/ztriu $\\color{green}590/590$
$\\color{green}+0.00\\%$
$\\color{green}43/43$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}590/590$
$\\color{green}+0.00\\%$
math/iter/sequences/tribonacci $\\color{green}287/287$
$\\color{green}+0.00\\%$
$\\color{green}31/31$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}287/287$
$\\color{green}+0.00\\%$
ndarray/base/kernels/generic/binary-strided1d/unblocked $\\color{red}2123/3559$
$\\color{green}+0.00\\%$
$\\color{green}13/13$
$\\color{green}+0.00\\%$
$\\color{red}0/12$
$\\color{green}+0.00\\%$
$\\color{red}2123/3559$
$\\color{green}+0.00\\%$
ndarray/base/kernels/generic/unary-strided1d/blocked $\\color{red}1618/3298$
$\\color{green}+0.00\\%$
$\\color{green}11/11$
$\\color{green}+0.00\\%$
$\\color{red}0/10$
$\\color{green}+0.00\\%$
$\\color{red}1618/3298$
$\\color{green}+0.00\\%$
ndarray/base/kernels/generic/unary-strided1d/unblocked $\\color{red}2062/3378$
$\\color{green}+0.00\\%$
$\\color{green}13/13$
$\\color{green}+0.00\\%$
$\\color{red}0/12$
$\\color{green}+0.00\\%$
$\\color{red}2062/3378$
$\\color{green}+0.00\\%$
stats/base/ndarray/dmskrange $\\color{green}109/109$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}109/109$
$\\color{green}+0.00\\%$
stats/base/ndarray/dnanmskrange $\\color{green}109/109$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}109/109$
$\\color{green}+0.00\\%$
stats/base/ndarray/mskmaxabs $\\color{green}107/107$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}107/107$
$\\color{green}+0.00\\%$
stats/base/ndarray/snanmskmax $\\color{green}109/109$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}109/109$
$\\color{green}+0.00\\%$
stats/base/ndarray/snanmskmidrange $\\color{green}109/109$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}109/109$
$\\color{green}+0.00\\%$
stats/base/ndarray/snanmskrange $\\color{green}109/109$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}109/109$
$\\color{green}+0.00\\%$
stats/incr/mvariance $\\color{green}364/364$
$\\color{green}+0.00\\%$
$\\color{green}53/53$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}364/364$
$\\color{green}+0.00\\%$
stats/mediansorted $\\color{green}158/158$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}0/0$
$\\color{green}+0.00\\%$
$\\color{green}158/158$
$\\color{green}+0.00\\%$
stats/nanrange-by $\\color{green}161/161$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}0/0$
$\\color{green}+0.00\\%$
$\\color{green}161/161$
$\\color{green}+0.00\\%$
stats/strided/drangeabs $\\color{red}379/381$
$\\color{green}+0.00\\%$
$\\color{red}27/28$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{red}379/381$
$\\color{green}+0.00\\%$

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

@kgryte
kgryte marked this pull request as ready for review September 25, 2026 04:28
@kgryte
kgryte requested a review from a team September 25, 2026 04:28
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 25, 2026

Planeshifter commented Sep 25, 2026 •

Copy link
Copy Markdown
Member Author

Run affected benchmarks (job) failed on 3fc4fff87. It is not a benchmark failure and it is not this PR's: the job hit the 60-minute timeout-minutes cap while running benchmarks for @stdlib/blas/ext/base/gsorthp-by. Every benchmark that completed reported # ok.

The affected-directory set was computed against a stale ancestor. run_affected_benchmarks.yml derives it from the event payload:

ancestor_commit=$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
files=$(git diff --diff-filter=AM --name-only $ancestor_commit ${{ github.event.pull_request.head.sha }})

The ancestor it resolved sits at or before f158b2ff6 (develop when this PR was opened) rather than 63f3434d3 (develop as of the merge in 3fc4fff87):

ancestor files in set includes gsorthp-by?
f158b2ff6 363 yes
63f3434d3 42 — exactly this PR's diff no

Since the job did benchmark gsorthp-by, it used the 363-file set, which folds in the 321 files develop moved between those two commits. gsorthp-by's benchmarks come from 66f69b6a7 ("bench: fix data generation in blas/ext/base sort benchmarks") and arrived here through the develop merge, not from this branch.

This PR contributes almost nothing to that workload. The script maps files to directories with dirname, and this PR's 42 files resolve to …/docs/types (37 declaration tests), two …/lib directories, and three package roots — none of which contain benchmark/ files. The hour was spent on develop's benchmark changes.

Worth noting run_affected_tests.yml shares the identical merge-base line and passed on the same inflated set in 19 minutes; only the benchmark job is slow enough for the set size to matter.

No fix for this exists to port, and the fix does not belong in this PR — it is a workflow change. Deriving the ancestor from the base ref instead of the payload SHA would yield 42 files here:

git fetch --no-tags --depth=1000 origin "${{ github.event.pull_request.base.ref }}"
ancestor_commit=$(git merge-base FETCH_HEAD ${{ github.event.pull_request.head.sha }})
files=$(git diff --diff-filter=AM --name-only $ancestor_commit ${{ github.event.pull_request.head.sha }})

The job died at 61 minutes against a 60-minute cap, so a re-run is marginal rather than certain to fail again and would be worth one attempt. I tried to re-run it and got 403 Resource not accessible by integration, so I cannot — someone with Actions write access will need to press it, or dispatch run_affected_benchmarks via workflow_dispatch scoped to this PR's directories. Nothing here is fixable from within this branch; every other check on 3fc4fff87 is green.


Generated by Claude Code

@kgryte

kgryte commented Sep 25, 2026

Copy link
Copy Markdown
Member

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

@kgryte kgryte changed the title chore: propagate clean-up fixes across blas, ndarray, and stats chore: clean-up Sep 25, 2026
@kgryte
kgryte merged commit 8da0d15 into develop Sep 25, 2026
30 of 31 checks passed
@kgryte
kgryte deleted the claude/stoic-wozniak-hxk1r4 branch September 25, 2026 06:44
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Sep 25, 2026
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