Skip to content

test: fix factorization reads - #16292

Closed
Planeshifter wants to merge 3 commits into
developfrom
claude/elegant-feynman-28pwo4
Closed

Planeshifter wants to merge 3 commits into
developfrom
claude/elegant-feynman-28pwo4

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

Symptom: four assertions fail (e.g., expected 8, actual 1.1210387714598537e-44).

Root cause: rffti1 stores the integer factorization data through a Uint32Array view over the Float32Array workspace. The test read those slots as floats, which yields denormals. The test now reads the section through a Uint32Array view, as the cosqi and rffti tests do.

Validation: the test file passes locally (12024 passing, 0 failing; 4 failing before the change). Three independent reviews approved; the one style note (max-len pragma) is addressed.

Related Issues

Does this pull request have any related issues?

None.

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.

Reviewer notes: the sinqi README, lib/main.js, lib/index.js, docs/types/index.d.ts, docs/repl.txt, and examples/index.js have the same mistake (factors shown as <Float32Array>[ 8, 2, 2, 4 ] / read as floats). cosqi already uses the Uint32Array form. Left out of this PR to keep it to the failing test; follow-up.

Checklist

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 produced by Claude Code running as an automated CI-triage routine: it diagnosed the failing job from the workflow logs, authored the fix, and had it reviewed by separate AI reviewers. No human has reviewed it yet.


@stdlib-js/reviewers


Generated by Claude Code

The scheduled `linux_test` workflow failed on develop with four
assertion failures in the "stride and offset" test of
`fft/base/fftpack/float32/sinqi` (e.g., expected `8`, actual
`1.1210387714598537e-44`).

Root cause: `rffti1` stores the integer factorization data (sequence
length, number of factors, and factors) through a `Uint32Array` view
over the `Float32Array` workspace, so reading those slots as floats
yields denormals. This commit reads the factorization section through
a `Uint32Array` view, consistent with the `cosqi` and `rffti` tests.

Ref: https://github.com/stdlib-js/stdlib/actions/runs/39753951313

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CrVhRwPsPFuqS8JdR5SEeJ
@stdlib-bot

stdlib-bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
fft/base/fftpack/float32/sinqi $\\color{green}222/222$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}1/1$
$\\color{green}+0.00\\%$
$\\color{green}222/222$
$\\color{green}+0.00\\%$

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

@kgryte
kgryte requested a review from gunjjoshi October 29, 2026 11:55
@kgryte
kgryte marked this pull request as ready for review October 29, 2026 11:55
@kgryte
kgryte requested a review from a team October 29, 2026 11:55
@kgryte kgryte changed the title test(@stdlib/fft/base/fftpack/float32/sinqi): fix factorization reads test: fix factorization reads Oct 29, 2026
@kgryte kgryte added the Tests Pull requests specifically adding tests. label Oct 29, 2026
@kgryte

kgryte commented Oct 29, 2026

Copy link
Copy Markdown
Member

@gunjjoshi Would you mind reviewing and also determining if anything else needs updating? I believe making changes to sinqi was on your list of todos.

@gunjjoshi

Copy link
Copy Markdown
Member

Right. I'll open up a PR to update sinqi shortly.

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 29, 2026

Copy link
Copy Markdown
Member Author

The Run affected tests check (https://github.com/stdlib-js/stdlib/actions/runs/40869200739/job/123431603172) failed on 1ece783 (the merge of develop into this branch) because the job hit its 30 minute limit ("The action 'Run JavaScript tests' has timed out after 30 minutes"). No test assertion failed; the last tests run were blas/ext/base/z*, which this PR does not touch. The only change here is to fft/base/fftpack/float32/sinqi/test/test.js, which passed locally (12024 passing). The merge widened the set of "affected" packages, which likely explains the longer run. No fix exists for this timeout; I am re-running the failed job once.


Generated by Claude Code

@gunjjoshi

Copy link
Copy Markdown
Member

@kgryte I have opened #16361 which should fix this. The changes are same as that in #15329.

Copy link
Copy Markdown
Member Author

The Run affected benchmarks check (https://github.com/stdlib-js/stdlib/actions/runs/40869200745/job/123431602824) also failed on 1ece783, again from a job timeout ("The action 'Run affected benchmarks' has timed out after 60 minutes"), not an assertion. It was benchmarking blas/base/cscal when it was cut off, which this PR does not touch. As with the Run affected tests timeout above, the merge of develop appears to have enlarged the affected-package set; this PR only changes fft/base/fftpack/float32/sinqi/test/test.js. No fix exists in this PR's scope. I cannot re-run the job (the integration token gets a 403 on re-run), so a maintainer will need to re-run both timed-out checks.


Generated by Claude Code

@kgryte kgryte added autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. and removed Needs Review A pull request which needs code review. labels Oct 30, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit.

Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.

@stdlib-bot stdlib-bot closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants