Skip to content

refactor: use constants/float64/nan and clean-up - #13585

Merged
kgryte merged 4 commits into
developfrom
philipp/fix-propagation-2026-07-20
Jul 20, 2026
Merged

kgryte merged 4 commits into
developfrom
philipp/fix-propagation-2026-07-20

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request propagates fixes merged to develop between 2026-07-19 13:04 (-0700) and 2026-07-20 00:58 (-0700) to sibling packages with the same underlying defects. Three patterns, one commit per source commit:

0.0/0.0 → STDLIB_CONSTANT_FLOAT64_NAN (source: 05aaec1)

Applies the transformation from 05aaec1 ("refactor: use constants/float64/nan in math/base/special/pow") across the remaining namespace: replaces the inline 0.0/0.0 NaN idiom in src/main.c with STDLIB_CONSTANT_FLOAT64_NAN, adding the stdlib/constants/float64/nan.h include and the @stdlib/constants/float64/nan manifest dependency. Covers 99 packages — all remaining math/base/special packages using the inline idiom in executable code, including fast/*. math/base/special/fibonacci is excluded (already covered by open PR #12154), and math/base/special/gamma is excluded due to pre-existing trailing whitespace in its src/main.c which fails editorconfig linting for any PR touching the file. Doc-comment occurrences of 0.0/0.0 are left untouched, as they are not executable code.

Flatten single-entry arrays parameter descriptions (source: 2b91bfe)

Applies the same flattening from gany (2b91bfe) to the remaining arrays parameter descriptions still using the nested single-entry list form. Each target function accepts exactly one input ndarray, so the sub-bullet collapses into the parent line: blas/base/ndarray/dnrm2, blas/base/ndarray/dzasum, blas/base/ndarray/dznrm2, blas/base/ndarray/gnrm2, blas/base/ndarray/scasum, blas/base/ndarray/scnrm2, blas/base/ndarray/snrm2, blas/ext/base/ndarray/dindex-of-falsy, and blas/ext/base/ndarray/gindex-of-falsy. No functional or type changes — README-only.

Remove stale eslint-disable max-len annotations (source: 2780757)

This propagates the pattern established in 2780757 ("style: re-enable lint rule"): a <!-- eslint-disable max-len --> annotation is stale once every raw line in its governed fenced code block is <=80 characters, since max-len's ignore-options only shorten effective length, never lengthen it. Removes the 10 remaining stale annotations across 9 READMEs — strided/base/nullary-addon-dispatch (2), lapack/base/{dgttrf,dlassq,dpttrf,spttrf}, blas/ext/base/{dfirst-index-less-than,dsome,ssome}, ndarray/base/assign-scalar — leaving annotations governing blocks with lines >80 chars untouched.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

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 exact pattern search scoped to each source commit's sibling namespace, then validated per site by two independent reviewing agents (full-file reads confirming the defect is present and the patch is semantics-preserving), an adaptation pass (include placement, per-conf manifest coverage, patch self-containment), and a style-consistency pass (macro usage, manifest entry position/indentation, markdown list and blank-line structure). All 118 validated sites advanced with dual confirmation; two initially flagged patch defects (a mis-indented manifest entry in powm1 caused by a pre-existing stray blank line, and a second stale annotation in nullary-addon-dispatch initially missed) were corrected and re-confirmed by two fresh independent reviewers. gamma was subsequently dropped in CI triage (pre-existing lint failure unrelated to the propagation), leaving 117 sites in the final diff.

Deliberately excluded: math/base/special/fibonacci (open PR #12154), math/base/special/gamma (pre-existing trailing whitespace fails editorconfig lint), math/base/special/{atan2d,fast/max} (only doc-comment occurrences of the idiom), float32 0.0f/0.0f sites (different constant, not a direct analog of the source commit), and annotations governing code blocks with lines exceeding 80 characters.

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 automated fix-propagation routine: source commits from the last 24 hours on develop were analyzed for generalizable fix patterns, candidate sibling sites were enumerated by exact pattern search, and every applied patch was confirmed by two independent validation agents plus adaptation and style-consistency passes before commit.

claude added 3 commits July 20, 2026 13:41
Propagates fix from 05aaec1 ("refactor: use `constants/float64/nan`
in `math/base/special/pow`") to 100 sibling packages generating NaN
via the inline `0.0/0.0` idiom in their C implementations. Doc
example occurrences are intentionally left unchanged.

Ref: #11743

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EHa9r1LqZ3Tg3Gft34EGQv
Propagates fix from 2b91bfe ("chore: clean-up") to sibling packages
whose README documents a single input ndarray using the nested list
form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EHa9r1LqZ3Tg3Gft34EGQv
Propagates fix from 2780757 ("style: re-enable lint rule") to READMEs
whose governed code blocks no longer exceed the 80-character line
limit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EHa9r1LqZ3Tg3Gft34EGQv
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Jul 20, 2026
Reverts the `constants/float64/nan` changes for
`math/base/special/gamma`: its `src/main.c` carries pre-existing
trailing whitespace (lines 211 and 227) which fails editorconfig
linting for any PR touching the file. Dropped per the
pre-existing-lint rule rather than folding unrelated whitespace
fixes into the propagation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EHa9r1LqZ3Tg3Gft34EGQv

Copy link
Copy Markdown
Member Author

CI status for this draft:

  • All correctness and lint checks are green on 0932739: Lint Changed Files, Run changed examples, licenses, copyright years, PR title, and contributing-guidelines acceptance. The initial lint failure was pre-existing trailing whitespace in math/base/special/gamma/src/main.c (lines 211, 227); that package was dropped from the propagation (0932739) rather than folding an unrelated whitespace fix into this PR.
  • Run affected tests and Calculate test coverage for PR packages fail with The action 'Run JavaScript tests' has timed out after 30 minutes — on both the previous and current head. No failing assertions in any of the four logs: the affected-tests job was killed while still compiling native add-ons (before running a single test), and the coverage job was killed mid-iteration with every executed suite passing (last completed: 10006/10006). With 99 native packages in the diff, the per-action 30-minute budget cannot compile and test the full set.

Resolving the two timeouts requires a call outside this PR's scope: raise the workflow action timeout, split the sweep into batches, or accept partial CI for a diff of this shape. Happy to split into per-batch PRs if preferred.


Generated by Claude Code

@kgryte
kgryte marked this pull request as ready for review July 20, 2026 20:44
@kgryte
kgryte requested a review from a team July 20, 2026 20:44
@kgryte

kgryte commented Jul 20, 2026

Copy link
Copy Markdown
Member

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

@kgryte kgryte changed the title refactor: use constants/float64/nan across math/base/special refactor: use constants/float64/nan and clean-up Jul 20, 2026
@kgryte
kgryte merged commit b953edd into develop Jul 20, 2026
17 of 19 checks passed
@kgryte
kgryte deleted the philipp/fix-propagation-2026-07-20 branch July 20, 2026 20:45
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Jul 20, 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