style: align outliers in number/float32/base with namespace majority patterns#11816
Draft
Planeshifter wants to merge 4 commits intodevelopfrom
Draft
style: align outliers in number/float32/base with namespace majority patterns#11816Planeshifter wants to merge 4 commits intodevelopfrom
number/float32/base with namespace majority patterns#11816Planeshifter wants to merge 4 commits intodevelopfrom
Conversation
Renamed local require alias in `lib/index.js` to `main` to match the
`var main = require('./main.js')` convention shared by 14/17 sibling
packages (82.4%). The export is unchanged.
Renamed local require alias in `lib/index.js` to `main` to match the
`var main = require('./main.js')` convention shared by 14/17 sibling
packages (82.4%). The export is unchanged.
Populated the empty `<section class="related">` with a link to the parallel double-precision sibling `@stdlib/number/float64/base/to-float16` to match the convention shared by 14/18 namespace packages (77.8%). Added the corresponding `<related-links>` reference block.
Populated the empty `<section class="related">` with a link to the parallel double-precision sibling `@stdlib/number/float64/base/ulp-difference` to match the convention shared by 14/18 namespace packages (77.8%). Filled in the existing `<related-links>` reference block.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
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.
Description
Aligning outliers in
number/float32/basewith namespace majority patterns (random namespace pick, seed20260427).This PR was produced by an automated cross-package drift-detection routine. For each feature shared across the namespace's 18 sibling packages, the routine computed the majority pattern at a 75% conformance threshold, validated each outlier through three independent review agents, and grouped the surviving mechanical fixes into one commit per outlier package.
Namespace summary
number/float32/base20260427package.jsonkeys,package.jsondirectorieskeys, README H2 sections (Usage,Examples,See Also),lib/index.jsrequire-alias variable name,validationPrologue(empty across all members),errorConstruction(none across all members exceptfrom-binary-stringwhich already usesformat).binding.gyp,manifest.json,include/,src/,gypfile,benchmark.native.js,test.native.js) — all sit at 12/18 = 66.7% because the namespace cleanly splits into NAPI vs. non-NAPI subgroups;## C APIsand## NotesREADME sections similarly track the NAPI split rather than a namespace-wide convention.Per-outlier corrections
number/float32/base/to-int32Renamed the local
lib/index.jsrequire alias fromfloat32ToInt32tomain. Thevar main = require('./main.js')form is shared by 14 of 17 non-assertsiblings (82.4%). The exported value is unchanged; nothing else in the package references the inner alias.number/float32/base/to-uint32Same drift as
to-int32: renamedfloat32ToUint32tomaininlib/index.js. Brings the file into line with the 82.4% majority. No behavior change.number/float32/base/to-float16Populated the empty
<section class="related">block inREADME.mdwith a See Also link to the parallel@stdlib/number/float64/base/to-float16and added the matching<related-links>reference. The## See Alsosection is present in 14 of 18 namespace packages (77.8%); the convention is a link to the float64 counterpart, which exists for this package.number/float32/base/ulp-differenceSame drift as
to-float16: populated the empty<section class="related">with a See Also link to@stdlib/number/float64/base/ulp-differenceand filled the existing<related-links>placeholder. Brings the README in line with the 77.8% namespace majority.Validation
Each candidate cleared three independent reviews:
to-float16/lib/index.js(thevar builtinalias is required by the polyfill dispatch) andsignificandSee Also (no parallelfloat64/base/significandexists, so the conventional sibling link is unavailable)..d.tsfile, or sibling package documentation depends on the deviating behavior. Theindex.jsaliases are local to the file body; the README additions are documentation-only.signbit,identity,from-word,to-word).Deliberately excluded:
to-float16/lib/index.js—var builtin = require('./main.js')is intentional; main.js exports eitherMath.f16roundornullandindex.jsdispatches to a polyfill.significand/README.mdSee Also — no parallelfloat64/base/significandpackage exists; choosing alternative links is editorial, not mechanical.assert/outliers —number/float32/base/assertis a sub-namespace package and intentionally lacksbenchmark/,lib/main.js,docs/repl.txt, etc.Related Issues
No.
Questions
No.
Other
The full drift report (per-feature majority patterns, conformance percentages, per-package outlier list, dropped corrections with reasons, and the random selection criteria) is preserved alongside this PR for audit. The routine deliberately leaves this PR in draft state — a maintainer should audit before promoting to ready.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was produced by an automated cross-package drift-detection routine driven by Claude Code (Opus 4.7). The routine extracted structural features programmatically, derived majority patterns at a 75% conformance threshold, and validated each outlier through three independent LLM review agents (one Sonnet, two Opus) before applying any change. All file edits were applied mechanically from the validated drift findings; no behavioral logic was generated. A human maintainer is expected to audit before promoting this PR out of draft.
Generated by Claude Code