Skip to content

chore: clean-up - #13780

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

chore: clean-up#13780
kgryte merged 7 commits into
developfrom
philipp/fix-propagation-2026-07-30

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

Propagating fixes merged to develop between 2026-07-29T19:12Z and 2026-07-30T07:21Z to sibling packages with the same underlying defects. Four source patterns, one commit per pattern:

Integer loop variables in C ndarray kernels (c90a54a)

c90a54a retyped the loop count M and counter i in the clogspace C ndarray kernel from float to CBLAS_INT, pushing the float conversion to explicit (float) casts at the point of use. blas/ext/base/zlogspace carries the identical double M; double i; pattern in its kernel and is the only remaining match repo-wide; retyped to CBLAS_INT with (double) casts at use sites.

NaN guard in MGF factory closures (c5d65b1, 10ee0a5)

c5d65b1, folded into 10ee0a5, prepended isnan( t ) || to the domain guard in the laplace, gamma, gumbel, and negative-binomial MGF factory closures. stats/base/dists/logistic/mgf lib/factory.js is the sole remaining factory with a guard to extend; isnan is already required and lib/main.js already performs the check, so this is behavior-neutral. poisson stays excluded per PR #13754 — its factory has no comparable guard.

Stale node/no-sync eslint-disable directives (10ee0a5)

10ee0a5 renamed stale node/no-sync eslint-disable directives to n/no-sync in the blas/ext/base/wasm/dapx README. Propagated to the complete remaining set: fs/append-file README (2 directives), utils/library-manifest bin/cli, and _tools/utils/jsdelivr-url bin/cli. The lint config runs eslint-plugin-n (n/no-sync = warn), so the legacy node/ prefix suppresses nothing.

Shared opts variable in blas/ext/base examples (7c34546, 10ee0a5)

7c34546 and the d* tranche in 10ee0a5 extracted the repeated, byte-identical inline { 'dtype': ... } literal passed to discreteUniform into a single shared opts variable in each package's README and examples/index.js. Propagated to the 18 remaining single-precision siblings under blas/ext/base: saxpby, scusum, scusumkbn, scusumkbn2, scusumors, scusumpw, sdiff, sediff, sfirst-index-equal, sfirst-index-less-than, ssort2ins, swapx, swax, swxsa, sxdy, sxmy, sxpy, sxsy (36 files). PR #13754 explicitly left these 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.

Validation. Each candidate site passed: pattern specification against the source commits; scoped rg site enumeration excluding already-fixed packages; open-PR and 14-day merged-PR collision checks; a generator-owned-file check (all target lines sit outside auto-populated sections); two independent validation agents reading each target file in full (both required to confirm — 23/23 confirmed); an adaptation pass producing exact per-site patches (all verified with git apply --check and post-apply README/examples mirror equality); and a style-consistency pass against merged precedent (tab vs 4-space indentation per file type, single-line guard convention, CBLAS_INT declaration grouping per dlogspace/slogspace). The modified logistic/mgf factory was smoke-tested (mgf(0.5) matches the documented value; mgf(NaN) returns NaN), and modified examples execute unchanged.

Deliberately excluded. stats/base/dists/poisson/mgf (documented exclusion in #13754 — no guard to extend); the number/float64/base/assert/is-almost-same-valueassert/is-almost-same-value require-path swap from c90a54a (~50 remaining files; the old path is not deprecated — the top-level package wraps it — and a mass rename would collide with the active ULP-testing migration, which touches the same test files); ULP test migrations themselves (refactor campaign under #11352, not defect fixes); opts-extraction matches outside blas/ext/base (left for follow-up tranches, mirroring #13754's scoping); five further sub-patterns of the source commits whose repo-wide searches returned zero remaining sites (Complex64/128Array from() loop bound, double-period typos, [identity-function] link text, misplaced usage-section close, wasm README structure).

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


Generated by Claude Code

claude added 4 commits July 30, 2026 13:24
Propagates fix from c90a54a ("chore: clean-up"), which retyped the
loop count and loop counter in the `clogspace` C ndarray kernel from
floating-point to `CBLAS_INT`, to the sibling `zlogspace` kernel
exhibiting the identical pattern.
Propagates fix from c5d65b1 and 10ee0a5 ("chore: clean-up"), which
prepended an `isnan( t )` check to the domain guard in the `laplace`,
`gamma`, `gumbel`, and `negative-binomial` MGF factory closures, to the
`logistic` factory exhibiting the same omission. `isnan` is already
required in the file, and `lib/main.js` already performs the equivalent
check. No behavioral change: NaN already propagates to NaN through the
underlying math.
Propagates fix from 10ee0a5 ("chore: clean-up"), which renamed stale
`node/no-sync` eslint-disable directives to `n/no-sync` in the
`blas/ext/base/wasm/dapx` README, to the remaining occurrences in
`fs/append-file`, `utils/library-manifest`, and
`_tools/utils/jsdelivr-url`. The repository lint configuration uses
eslint-plugin-n, so the legacy `node/` prefix matches no configured
rule and fails to suppress `n/no-sync` warnings.
Propagates fix from 7c34546 ("docs: extract options variable in
`dwxmy` examples") and its follow-up tranche in 10ee0a5 ("chore:
clean-up"), which extracted repeated inline `dtype` options literals
into a shared `opts` variable across the `blas/ext/base/d*` packages,
to the remaining single-precision siblings: `saxpby`, `scusum`,
`scusumkbn`, `scusumkbn2`, `scusumors`, `scusumpw`, `sdiff`, `sediff`,
`sfirst-index-equal`, `sfirst-index-less-than`, `ssort2ins`, `swapx`,
`swax`, `swxsa`, `sxdy`, `sxmy`, `sxpy`, and `sxsy`.
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Jul 30, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Hello! 👋

We've noticed that you've been opening a number of PRs addressing good first issues. Thank you for your interest and enthusiasm!

Now that you've made a few contributions, we suggest no longer working on good first issues. Instead, we encourage you to prioritize cleaning up any PRs which have yet to be merged and then proceed to work on more involved tasks.

Not only does this ensure that other new contributors can work on things and get ramped up on all things stdlib, it also ensures that you can spend your time on more challenging problems. 🚀

For ideas for future PRs, feel free to search the codebase for TODOs and FIXMEs and be sure to check out other open issues on the issue tracker. Cheers!

The `fs/append-file` README deliberately demonstrates using raw
`fs.existsSync` as an anti-pattern. Renaming the stale lint directive
pulled the file into the changed-files lint scope, surfacing a
pre-existing `no-restricted-syntax` error on the example block.
@stdlib-bot

stdlib-bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/saxpby $\\color{green}428/428$
$\\color{green}+0.00\\%$
$\\color{green}30/30$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}428/428$
$\\color{green}+0.00\\%$
blas/ext/base/scusum $\\color{green}366/366$
$\\color{green}+0.00\\%$
$\\color{green}13/13$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}366/366$
$\\color{green}+0.00\\%$
blas/ext/base/scusumkbn $\\color{green}429/429$
$\\color{green}+0.00\\%$
$\\color{green}25/25$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}429/429$
$\\color{green}+0.00\\%$
blas/ext/base/scusumkbn2 $\\color{green}440/440$
$\\color{green}+0.00\\%$
$\\color{green}27/27$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}440/440$
$\\color{green}+0.00\\%$
blas/ext/base/scusumors $\\color{green}383/383$
$\\color{green}+0.00\\%$
$\\color{green}17/17$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}383/383$
$\\color{green}+0.00\\%$
blas/ext/base/scusumpw $\\color{green}415/415$
$\\color{green}+0.00\\%$
$\\color{green}18/18$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}415/415$
$\\color{green}+0.00\\%$
blas/ext/base/sdiff $\\color{red}642/644$
$\\color{green}+0.00\\%$
$\\color{red}44/45$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{red}642/644$
$\\color{green}+0.00\\%$
blas/ext/base/sediff $\\color{green}446/446$
$\\color{green}+0.00\\%$
$\\color{green}17/17$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}446/446$
$\\color{green}+0.00\\%$
blas/ext/base/sfirst-index-equal $\\color{green}372/372$
$\\color{green}+0.00\\%$
$\\color{green}19/19$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}372/372$
$\\color{green}+0.00\\%$
blas/ext/base/sfirst-index-less-than $\\color{green}372/372$
$\\color{green}+0.00\\%$
$\\color{green}19/19$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}372/372$
$\\color{green}+0.00\\%$
blas/ext/base/ssort2ins $\\color{green}521/521$
$\\color{green}+0.00\\%$
$\\color{green}41/41$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}521/521$
$\\color{green}+0.00\\%$
blas/ext/base/swapx $\\color{green}418/418$
$\\color{green}+0.00\\%$
$\\color{green}28/28$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}418/418$
$\\color{green}+0.00\\%$
blas/ext/base/swax $\\color{green}418/418$
$\\color{green}+0.00\\%$
$\\color{green}28/28$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}418/418$
$\\color{green}+0.00\\%$
blas/ext/base/swxsa $\\color{green}418/418$
$\\color{green}+0.00\\%$
$\\color{green}28/28$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}418/418$
$\\color{green}+0.00\\%$
blas/ext/base/sxdy $\\color{green}405/405$
$\\color{green}+0.00\\%$
$\\color{green}26/26$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}405/405$
$\\color{green}+0.00\\%$
blas/ext/base/sxmy $\\color{green}405/405$
$\\color{green}+0.00\\%$
$\\color{green}26/26$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}405/405$
$\\color{green}+0.00\\%$
blas/ext/base/sxpy $\\color{green}405/405$
$\\color{green}+0.00\\%$
$\\color{green}26/26$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}405/405$
$\\color{green}+0.00\\%$
blas/ext/base/sxsy $\\color{green}405/405$
$\\color{green}+0.00\\%$
$\\color{green}26/26$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}405/405$
$\\color{green}+0.00\\%$
blas/ext/base/zlogspace $\\color{green}564/564$
$\\color{green}+0.00\\%$
$\\color{green}24/24$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}564/564$
$\\color{green}+0.00\\%$
fs/append-file $\\color{green}177/177$
$\\color{green}+0.00\\%$
$\\color{green}10/10$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}177/177$
$\\color{green}+0.00\\%$
stats/base/dists/logistic/mgf $\\color{green}306/306$
$\\color{green}+0.00\\%$
$\\color{green}22/22$
$\\color{green}+0.00\\%$
$\\color{green}4/4$
$\\color{green}+0.00\\%$
$\\color{green}306/306$
$\\color{green}+0.00\\%$
utils/library-manifest $\\color{green}502/502$
$\\color{green}+0.00\\%$
$\\color{green}64/64$
$\\color{green}+0.00\\%$
$\\color{green}5/5$
$\\color{green}+0.00\\%$
$\\color{green}502/502$
$\\color{green}+0.00\\%$

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

Comment thread lib/node_modules/@stdlib/blas/ext/base/ssort2ins/examples/index.js
Comment thread lib/node_modules/@stdlib/blas/ext/base/ssort2ins/README.md
Interleaves array declarations with their logging calls in the
`blas/ext/base/ssort2ins` example, per review.
Comment thread lib/node_modules/@stdlib/fs/append-file/README.md
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte
kgryte marked this pull request as ready for review July 30, 2026 22:14
@kgryte
kgryte requested a review from a team July 30, 2026 22:14
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 30, 2026
@kgryte kgryte changed the title chore: propagate clean-up fixes across blas/ext/base and siblings chore: clean-up Jul 30, 2026
@kgryte
kgryte merged commit be0b1f5 into develop Jul 30, 2026
32 checks passed
@kgryte
kgryte deleted the philipp/fix-propagation-2026-07-30 branch July 30, 2026 22:32
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jul 30, 2026
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