refactor: change ordering of checks to reflect parameter order#11884
Merged
refactor: change ordering of checks to reflect parameter order#11884
Conversation
…h namespace convention Reorder NaN checks in the validation prologue so the first declared parameter (`p`) is checked first, matching the convention used by 13/14 (93%) sibling packages in `stats/base/dists/gumbel/`. Behavior is unchanged: every branch still returns NaN.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
stats/base/dists/gumbel with namespace majority patterns
kgryte
approved these changes
May 3, 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.
Description
Aligning outliers in
stats/base/dists/gumbelwith namespace majority patterns (random namespace pick, seed20260502).Namespace summary
stats/base/dists/gumbel/)package.jsonshape,manifest.jsonpresence, README sections (set + order), test/benchmark/examples filenames, public signature, validation prologue, return kind, error construction, JSDoc shape, dependenciesctor,mgf,skewness— all dropped (see Validation)quantile
Reorders the validation prologue so
pis checked beforemuandbeta, matching the parameter-declaration order and the convention followed by 13 of 14 sibling packages in thestats/base/dists/gumbel/namespace. No behavioral change — all validation branches returnNaN.Validation
What was checked:
package.json/manifest.jsonkeys, README headings, test/benchmark/examples file naming).quantilevalidation prologue →confirmed-drift(no domain reason for the reorder; identical behavior; signature, JSDoc, and README all describepfirst).quantile's tests, examples, factory, and namespace re-exports →safe-to-apply(no test or external reference depends on the textual order of the||predicates; the factory's hot loop already validates onlyp).ctor,mgf, andskewnessoutliers → all rejected as inapplicable or cascading.What was deliberately excluded:
ctor's missing native bindings,gypfile,manifest.json, and## C APIssections — inapplicable to a JavaScript constructor with property accessors.mgf's missingtest/fixtures/julia/directory — would require cascadingtest.jsrewrites to consume the fixtures; out of scope for a mechanical drift fix.skewness's missingtest/fixtures/julia/directory — Gumbel skewness is a parameter-independent constant; Julia ground-truth fixtures are mathematically meaningless here.Other
This PR is the output of a per-namespace cross-package drift-detection routine. Random target namespace picked uniformly from eligible namespaces (≥8 non-autogenerated members) using seed
20260502. The full per-feature majority/conformance/outlier breakdown and the per-agent verdicts are recorded in the local report at~/drift-reports/drift-stats-base-dists-gumbel-2026-05-02.md.Checklist
AI Assistance
How AI assistance was used:
Disclosure
This PR was authored by Claude Code running an automated cross-package drift-detection routine. The routine extracted structural and semantic features from every member of
stats/base/dists/gumbel/, computed per-feature majority patterns at a 75% threshold, and dispatched three independent agents (two Opus, one Sonnet) to validate the surviving findings. Only one finding survived all three checks; the corresponding patch is the single-line reorder applied here.Generated by Claude Code