Skip to content

fix: ensure proper length calculation and fix typos - #16171

Merged
kgryte merged 4 commits into
developfrom
philipp/fix-commit-review-2026-10-15
Oct 15, 2026
Merged

kgryte merged 4 commits into
developfrom
philipp/fix-commit-review-2026-10-15

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-10-14 12:27 UTC (7b218b1) and 2026-10-15 12:01 UTC (90fa4c6).

This pull request:

  • blas/ext/base/dleft-pad-circular, blas/ext/base/sright-pad-circular (68c3a90): fixes Y length validation in src/addon.c to check against N+((k>0)?k:0) in both addon and addon_method. Previously Y was validated against N+k, but the kernel clamps negative k to 0 and writes N elements, so, e.g., N=4, k=-3 accepted a 1-element Y and wrote out of bounds, contradicting the documented N + max(0,k) requirement.
  • blas/ext/base/ndarray/dediff, blas/ext/base/ndarray/sediff (9461887): removes stray "to" from the prepend/append notes in README.md. The notes now read "values to prepend/append after computing differences", consistent with ndarray/gediff and strided dediff.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

blas/ext/base/sleft-pad-circular/src/addon.c predates the review window and has the same N+k validation; left untouched here. Same fix applies if we want it.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation

  • Reviewed 35 first-parent commits (incl. merge 68c3a90) for stdlib style-guide compliance against reference packages (dwxpy, zwxpy, dtril2triu, dcartesian-power, gindex-of-less-than-equal, gleft-pad-circular, etc.) and for bugs in introduced JS/C code, addons, manifests, namespaces, and TypeScript declarations.
  • Each retained finding was re-verified against the source on develop.
  • Deliberately excluded: anything requiring interpretation (e.g., C example variable naming xdata vs dataX in ndarray/cwxsy, extra blank lines in ndarray/zwxsy/ndarray/cwxsy).

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 PR was written primarily by Claude Code as part of an automated daily review of commits merged to develop. Opened as a draft for maintainer audit.


🤖 Generated with Claude Code

https://claude.ai/code/session_014G1zfAZ7jnW24aMJF7wrDi


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G1zfAZ7jnW24aMJF7wrDi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G1zfAZ7jnW24aMJF7wrDi
…dleft-pad-circular`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G1zfAZ7jnW24aMJF7wrDi
…sright-pad-circular`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G1zfAZ7jnW24aMJF7wrDi
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Oct 15, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/dleft-pad-circular $\\color{green}401/401$
$\\color{green}+100.00\\%$
$\\color{green}24/24$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}401/401$
$\\color{green}+100.00\\%$
blas/ext/base/ndarray/dediff $\\color{green}160/160$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}160/160$
$\\color{green}+100.00\\%$
blas/ext/base/ndarray/sediff $\\color{green}160/160$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}160/160$
$\\color{green}+100.00\\%$
blas/ext/base/sright-pad-circular $\\color{green}397/397$
$\\color{green}+100.00\\%$
$\\color{green}22/22$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}397/397$
$\\color{green}+100.00\\%$

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

@kgryte
kgryte marked this pull request as ready for review October 15, 2026 12:57
@kgryte
kgryte requested a review from a team October 15, 2026 12:57
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 15, 2026
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N+k, strideY, argv, 4 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N+((k>0)?k:0), strideY, argv, 4 );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @headlessNode This likely applies to edge padding, as well, and any other strided pad API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@headlessNode If you can fix your other open PRs, that would be great. Cheers!

@kgryte kgryte changed the title fix: address issues in commits merged to develop on 2026-10-14/15 fix: ensure proper length calculation and fix typos Oct 15, 2026
@kgryte
kgryte merged commit 68e9817 into develop Oct 15, 2026
52 checks passed
@kgryte
kgryte deleted the philipp/fix-commit-review-2026-10-15 branch October 15, 2026 13:00
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants