Skip to content

docs: add asm type annotation - #13905

Merged
kgryte merged 1 commit into
developfrom
philipp/drift-constants-float32-2026-08-04
Aug 4, 2026
Merged

docs: add asm type annotation#13905
kgryte merged 1 commit into
developfrom
philipp/drift-constants-float32-2026-08-04

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

This pull request adds the // asm type annotation trailing comment to the |0 coercion in constants/float32/num-significand-bits. It was the sole package in the namespace applying the asm.js |0 idiom without the annotation carried by 90% (18/20) of its |0-idiom siblings.

constants/float32/num-significand-bits

The |0 coercion on the exported integer32 constant lacked the // asm type annotation comment used across the namespace's integer constants. This aligns the single outlier with the established convention. The change is comment-only; the exported value (23), the integer32 type, and the tests are unchanged.

Related Issues

No.

Questions

No.

Other

The correction was surfaced by structural and semantic feature extraction across the 68-member constants/float32 namespace, then cross-referenced against the parallel constants/float64 namespace to separate intentional per-constant curation (e.g. @see and keyword differences, which mirror float64) from genuine drift. The missing annotation was the only high-signal, mechanical, non-behavioral correction to survive filtering, and it is not mirrored in float64 (which has no num-significand-bits package).

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 running an automated cross-package drift-detection routine. The routine extracted structural and semantic features across the namespace, computed the majority convention per feature, cross-referenced the constants/float64 sibling namespace to reject intentional deviations, and applied the single surviving one-line comment correction. The change was reviewed against sibling-package conventions before submission.


@stdlib-js/reviewers


Generated by Claude Code

…its`

Adds the `// asm type annotation` trailing comment on the `|0` coercion in
`lib/index.js`, matching the convention used by 90% (18/20) of the `|0`-idiom
packages in `constants/float32`. `num-significand-bits` was the sole package
applying the `|0` asm.js coercion without the annotation comment. The change
is comment-only and does not affect the exported value, observable behavior,
or test expectations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4c2XThBy9A3uLkcBot3yp
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
constants/float32/num-significand-bits $\\color{green}47/47$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}0/0$
$\\color{green}+100.00\\%$
$\\color{green}47/47$
$\\color{green}+100.00\\%$

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

@Planeshifter
Planeshifter marked this pull request as ready for review August 4, 2026 04:58
@Planeshifter
Planeshifter requested review from a team and kgryte August 4, 2026 04:58
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 4, 2026
@kgryte kgryte changed the title docs: add asm type annotation to constants/float32/num-significand-bits docs: add asm type annotation Aug 4, 2026
@kgryte
kgryte merged commit ab689bf into develop Aug 4, 2026
36 checks passed
@kgryte
kgryte deleted the philipp/drift-constants-float32-2026-08-04 branch August 4, 2026 06:03
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants