Skip to content

test: fix precision qualifier in test descriptions#13172

Merged
kgryte merged 2 commits into
developfrom
philipp/drift-constants-float32-2026-06-27
Jun 27, 2026
Merged

test: fix precision qualifier in test descriptions#13172
kgryte merged 2 commits into
developfrom
philipp/drift-constants-float32-2026-06-27

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

Cross-package drift analysis of @stdlib/constants/float32 identified two test files whose second tape description says double-precision floating-point number instead of single-precision. Each is a one-word swap; the underlying assertions already verify the correct float32 value.

@stdlib/constants/float32/phi

test/test.js line 37 described the export as a double-precision floating-point number, while the assertion compares FLOAT32_PHI against float64ToFloat32( 1.618033988749895 ) — a single-precision value. Wording carried over from the float64 sibling test. 30 of 34 float32 packages that use the qualifier in their second tape description say single-precision (88% conformance); the only double-precision instances in the namespace were phi and pi-squared.

@stdlib/constants/float32/pi-squared

test/test.js line 40 described the export as a double-precision floating-point number, while the assertion compares FLOAT32_PI_SQUARED against the literal 9.869604110717773 — the float32 rounding of π² (the float64 sibling carries 9.869604401089358). Same shape as phi; same 88% conformance fix.

Related Issues

None.

Questions

No.

Other

Cross-run dedup

Checklist

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 on behalf of @Planeshifter as an automated cross-package API-drift detection run against the @stdlib/constants/float32 namespace. Drift was identified by extracting structural and semantic features from every package, computing a per-feature majority pattern (≥75% threshold), and filtering candidate corrections through a three-agent validation pass (one opus semantic-review, one opus cross-reference, one sonnet structural-review). A human will audit and promote the PR out of draft.


@stdlib-js/reviewers


Generated by Claude Code

claude added 2 commits June 27, 2026 20:11
Changes the `tape` description from "double-precision" to "single-precision"
to match the float32 namespace (88% conformance across siblings using the
qualifier). The assertion already verifies the float32-coerced value via
`float64ToFloat32`; only the test description carried over from the float64
sibling.
Changes the `tape` description from "double-precision" to "single-precision"
to match the float32 namespace (88% conformance across siblings using the
qualifier). The assertion already verifies the float32-rounded literal
`9.869604110717773`; only the test description carried over from the float64
sibling.
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
constants/float32/phi $\\color{green}53/53$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}0/0$
$\\color{green}+100.00\\%$
$\\color{green}53/53$
$\\color{green}+100.00\\%$
constants/float32/pi-squared $\\color{green}52/52$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}0/0$
$\\color{green}+100.00\\%$
$\\color{green}52/52$
$\\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 June 27, 2026 20:38
@kgryte kgryte requested a review from a team June 27, 2026 20:38
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jun 27, 2026
@kgryte kgryte added Tests Pull requests specifically adding tests. and removed Needs Review A pull request which needs code review. labels Jun 27, 2026
@kgryte kgryte changed the title test: fix precision qualifier in constants/float32/phi and pi-squared test: fix precision qualifier in test descriptions Jun 27, 2026
@kgryte kgryte merged commit e478830 into develop Jun 27, 2026
53 checks passed
@kgryte kgryte deleted the philipp/drift-constants-float32-2026-06-27 branch June 27, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants