Repository navigation
docs: fix descriptions - #15560
Merged
Merged
docs: fix descriptions#15560
Conversation
…hp` descriptions The JSDoc first-line descriptions in `lib/index.js`, `lib/main.js`, `lib/ndarray.js`, and `lib/accessors.js` described the routine as operating on "two double-precision floating-point strided arrays". `gsort2hp` is a generic routine: it resolves inputs via `arraylike2object` and dispatches to an accessor-array code path, and its own `package.json` description, `README.md`, `docs/repl.txt`, and `docs/types/index.d.ts` all say "two strided arrays". The qualifier was carried over from the double-precision sibling `dsort2hp`. Within-package description terminology is consistent in 415/417 (99.5%) of `blas/ext/base` members; `gsort2ins` is the conforming generic sibling. Comment-only change; no behavior, signature, or test expectations affected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PC6sSdkTMxrMmxPCHP2oZk
…sh` descriptions The JSDoc first-line descriptions in `lib/index.js`, `lib/main.js`, `lib/ndarray.js`, and `lib/accessors.js` described the routine as operating on "two double-precision floating-point strided arrays". `gsort2sh` is a generic routine: it resolves inputs via `arraylike2object` and dispatches to an accessor-array code path, and its own `package.json` description, `README.md`, `docs/repl.txt`, and `docs/types/index.d.ts` all say "two strided arrays". The qualifier was carried over from the double-precision sibling `dsort2sh`. Within-package description terminology is consistent in 415/417 (99.5%) of `blas/ext/base` members; `gsort2ins` is the conforming generic sibling. The `dsort2sh` cross-reference in `README.md` correctly retains the qualifier and is left unchanged. Comment-only change; no behavior, signature, or test expectations affected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PC6sSdkTMxrMmxPCHP2oZk
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
marked this pull request as ready for review
September 26, 2026 09:05
kgryte
approved these changes
Sep 26, 2026
blas/ext/base/gsort2hp and gsort2sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
blas/ext/base/gsort2hpandblas/ext/base/gsort2sh, which describe generic routines. The change is comment-only.The two packages each carried the qualifier in all four of
lib/index.js,lib/main.js,lib/ndarray.js, andlib/accessors.js, while their ownpackage.jsondescription,README.md,docs/repl.txt, anddocs/types/index.d.tsalready read "two strided arrays". The namespace-leveldocs/types/index.d.tsandREADME.mdalso already read "two strided arrays", so this change makes the namespace internally consistent rather than introducing a new wording.Namespace summary
Derived from a structural and semantic scan of the whole namespace:
blas/ext/basedirect children with apackage.json, excluding thendarrayandwasmsub-namespace containers)Features excluded for want of a clear majority: implementation-file test naming (
test/test.<pkg>.js52.5% vstest/test.main.js30.5%),lib/index.jsexport shape (30.5% vs 69.5%), thepackage.json__stdlib__value ({}47.5% vs{"wasm": false}41.0%), and thebrowser/gypfilekeys together with thebinding.gyp/manifest.json/src//lib/native.js/examples/cgroup (65.9–69.3%). The last of these tracks whether a package ships a C addon and is legitimately absent for pure-JS packages.blas/ext/base/gsort2hpIn
blas/ext/base/gsort2hp, the JSDoc first-line description inlib/index.js,lib/main.js,lib/ndarray.js, andlib/accessors.jscalled the routine's inputs "two double-precision floating-point strided arrays"; this is now "two strided arrays".gsort2hpis a generic routine that resolves inputs viaarraylike2objectand dispatches to an accessor-array code path, acceptingNumericArray | Collection<number> | AccessorArrayLike<number>per itsdocs/types/index.d.tsdeclaration, notFloat64Arrayas the removed phrase implied; the qualifier was copied from the double-precision siblingdsort2hpand predates this package's accessor-array refactor.package.json,README.md, anddocs/repl.txtalready read "two strided arrays", matching the terminology used by 415/417 (99.5%) ofblas/ext/basemembers, andgsort2insserved as the conforming generic template for this fix.blas/ext/base/gsort2shRemoved the "double-precision floating-point" qualifier from the JSDoc first-line description in
lib/index.js,lib/main.js,lib/ndarray.js, andlib/accessors.jsforblas/ext/base/gsort2sh, leaving "two strided arrays".gsort2shis a generic Shellsort routine that resolves inputs viaarraylike2objectand dispatches to an accessor-array code path, accepting any array-like per itsNumericArray | Collection<number> | AccessorArrayLike<number>type declaration, notFloat64Array; the qualifier was copied fromdsort2shand predates the accessor-array refactor, and the package'spackage.json,README.md,docs/repl.txt, anddocs/types/index.d.tsalready said "two strided arrays". Thedsort2shcross-reference in this package'sREADME.md"See Also" section correctly retains the qualifier and was left unchanged. Terminology was already consistent in 415/417 (99.5%) ofblas/ext/basemembers, withgsort2insserving as the conforming generic template for this fix.Related Issues
No.
Questions
No.
Other
Validation
Checked:
package.jsonkey set,scripts/stdlib/manifest.jsonkey sets, README##/###heading set and order, andtest/,benchmark/,examples/file naming.require()-derived dependency sets.g*package in the namespace, onlygsort2hpandgsort2shname a precision in theirlib/*.jsJSDoc, so the 8 corrected lines are the full set.node --check, and both routines were exercised on plain JS arrays to confirm the documented generic contract.Deliberately excluded:
benchmark/benchmark.js(present in 94.7% of members) because they benchmark per input distribution instead —ssorthp/benchmark/holds 40 files across 10 distributions. That is broader coverage, not a gap, and themakebenchmark glob already discovers those files.gdiffis the one pure-JS package using the native-addonliblayout (99.2% conform), butgdiff/test/test.gdiff.jsandgdiff/benchmark/benchmark.jsboth require./../lib/gdiff.js, so conforming would force test and benchmark edits.dsort2hpis the only package withsrc/addon.cpprather thansrc/addon.c(99.65% conform), but it is the last hand-rolled C++ N-API addon in the namespace and conforming means porting it onto theSTDLIB_NAPI_ARGV_*macro template, not renaming a file.c_<name>instead ofAPI_SUFFIX(stdlib_strided_<name>)(97.2% conform); renaming them would change the published C API.Noted for maintainers, not addressed here
package.json__stdlib__is absent in 48 members and present in 88.5%, but the value splits 198{}/ 171{"wasm": false}with no majority, and the key is present in only 39.5% of@stdlibpackage.jsonfiles repo-wide. The existing values are also unreliable: of the 10 leaf packages with a sibling underblas/ext/base/wasm/, nine are marked{}andsapxsumkbnis marked{"wasm": false}, sowasm: falsedoes not track whether a WASM build exists. Nothing reads the key for its own presence — every consumer tests a sub-key — so inserting it would be inert. What__stdlib__.wasmis meant to encode is a maintainer decision.## Examplesblocks andexamples/index.jsare byte-identical in 375/417 (89.9%) after normalizing indentation and require paths; the 42 divergences are substantive content differences rather than mechanical ones.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This pull request was authored by Claude Code. It is the output of an automated cross-package consistency audit of the
blas/ext/basenamespace: structural and semantic features were extracted from all 417 members, the majority pattern per feature was computed at a 75% threshold, and deviating packages were flagged. Each candidate correction was then reviewed by three independent agents, and the audit's other candidates were dropped as intentional deviations or as changes that were not mechanical. The surviving change here is comment-only and was verified by hand against the affected packages'package.json,README.md,docs/repl.txt, and TypeScript declarations before committing.🤖 Generated with Claude Code
https://claude.ai/code/session_01PC6sSdkTMxrMmxPCHP2oZk
Generated by Claude Code