Skip to content

fix: pass const qualified views - #14052

Merged
kgryte merged 4 commits into
developfrom
philipp/fix-commit-review-2026-08-08
Aug 8, 2026
Merged

fix: pass const qualified views#14052
kgryte merged 4 commits into
developfrom
philipp/fix-commit-review-2026-08-08

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

Follow-up fixes for commits merged to develop between 2026-08-07 15:36 PT (ccacbf9) and 2026-08-08 03:51 PT (b56e927).

This pull request:

  • stats/base/ndarray/smean: src/addon.c in smean passed non-const arrays straight to stdlib_stats_smean(), which takes const struct ndarray *arrays[]; struct ndarray ** doesn't implicitly convert to const struct ndarray **, so it broke under -Wincompatible-pointer-types (error by default on GCC>=14/Clang>=16). Introduced in 5ca7350; fixed by adding the const-qualified view arr, matching smeankbn2/smeanli/dmediansorted from the same window.
  • blas/ext/base/ndarray/snansumkbn: Fix -Wincompatible-pointer-types in ndarray/snansumkbn/src/addon.c (introduced in 5b355d1): build a const struct ndarray *arr[ 1 ] = { arrays[ 0 ] }; view before calling stdlib_blas_ext_snansumkbn(), matching the pattern used by sibling addons.
  • blas/ext/base: Fix blas/ext/base TS declarations: 268ae62 added dtril2triu to the namespace lib/index.js, but 31eafd1's declaration update missed it — docs/types/index.d.ts lacked both the import dtril2triu = require(...) line and the dtril2triu: typeof dtril2triu; interface member, so ns.dtril2triu failed TS2339 despite existing at runtime. Added both, alphabetically ordered, JSDoc ported from the package's own docs/types/index.d.ts with examples rewritten to ns. form.

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. The 35 commits merged to develop in the window were reviewed by four independent review passes: two auditing stdlib style-guide compliance (docs/style-guides) against established reference packages, and two scanning for bugs/security/logic errors in the introduced code. Findings were merged, de-duplicated, and each surviving issue was re-verified directly against the working tree (header prototypes checked for const qualification; namespace lib/index.js cross-checked against docs/types/index.d.ts). Deliberately excluded: subjective suggestions, style preferences not mandated by the style guides, and anything requiring interpretation or changes outside the window's diff. No other issues survived filtering.

This PR is a draft for maintainer audit; each fix is a separate commit grouped by package.

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 end-to-end by Claude Code as part of an automated 24-hour commit-review routine: AI agents reviewed the window's diffs, validated findings against the working tree, and applied the fixes. A human maintainer will audit before promoting from draft.


Generated by Claude Code

@stdlib-bot

stdlib-bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/ndarray/snansumkbn $\\color{green}176/176$
$\\color{green}+0.00\\%$
$\\color{green}7/7$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}176/176$
$\\color{green}+0.00\\%$
stats/base/ndarray/smean $\\color{green}176/176$
$\\color{green}+0.00\\%$
$\\color{green}7/7$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}176/176$
$\\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 August 8, 2026 12:55
@kgryte
kgryte requested a review from a team August 8, 2026 12:55
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 8, 2026
@kgryte kgryte changed the title fix: follow-up fixes for commits merged to develop over the last 24 hours fix: pass const qualified views Aug 8, 2026
@kgryte
kgryte merged commit ebbf2de into develop Aug 8, 2026
30 checks passed
@kgryte
kgryte deleted the philipp/fix-commit-review-2026-08-08 branch August 8, 2026 13:00
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 8, 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.

4 participants