bench: fix assertion#13391
Merged
Merged
Conversation
The job `random_benchmarks` on workflow `random_benchmarks` failed on develop with `not ok 1 should return an array of length 3`. Root cause: `lib/modes.json` lists 4 supported index modes (`throw`, `normalize`, `clamp`, `wrap`), but `benchmark/benchmark.js` still asserted the pre-`wrap` count of 3. This commit updates the hardcoded length check and message to 4, matching the sibling `orders` package's exact-count benchmark convention, so the benchmark reflects the package's actual current mode list. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28985599743
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
reviewed
Jul 9, 2026
kgryte
reviewed
Jul 9, 2026
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
kgryte
approved these changes
Jul 9, 2026
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.
Resolves #{{N/A}}.
Description
This pull request:
lib/node_modules/@stdlib/ndarray/index-modes/benchmark/benchmark.jsto assert the correct current mode count (4), fixing a nightlyrandom_benchmarksCI failure.Related Issues
None.
Questions
No.
Other
Failing run: https://github.com/stdlib-js/stdlib/actions/runs/28985599743
Symptom:
not ok 1 should return an array of length 3in theindex-modesbenchmark.Root cause:
lib/modes.jsonlists 4 supported index modes (throw,normalize,clamp,wrap), but the benchmark still hardcoded the pre-wrapcount of 3.Fix: Update the hardcoded length check and failure message from 3 to 4, matching the sibling
@stdlib/ndarray/orderspackage's exact-count benchmark convention.Checklist
AI Assistance
Yes
No
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 written primarily by Claude Code as part of an automated CI-failure triage and fix routine, based on live GitHub Actions job log analysis. The fix was reviewed by three independent automated review passes (correctness, regression scope, style/conventions) before being proposed here; all three approved with no blocking findings.
@stdlib-js/reviewers
Generated by Claude Code