Skip to content

style: align outliers in stats/base/dists/gamma with namespace conventions#11862

Merged
kgryte merged 2 commits intodevelopfrom
philipp/drift-stats-base-dists-gamma-2026-04-30
May 1, 2026
Merged

style: align outliers in stats/base/dists/gamma with namespace conventions#11862
kgryte merged 2 commits intodevelopfrom
philipp/drift-stats-base-dists-gamma-2026-04-30

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Aligning outliers in stats/base/dists/gamma with namespace majority structural patterns (random namespace pick, seed 20260430).

Namespace summary

  • Member count: 14 (cdf, ctor, entropy, kurtosis, logcdf, logpdf, mean, mgf, mode, pdf, quantile, skewness, stdev, variance)
  • Features analyzed: file tree, package.json shape, manifest.json shape, README section structure (set + sequence), test/benchmark/example file naming, public signature, return kind, validation prologue, error construction, JSDoc shape, @stdlib/* dependencies.
  • Features with clear majority (≥75%): README C APIs heading levels (78.6%), README <section class="c"> wrapper (78.6%), ## Usage/## Examples at level 2 (100%), gypfile/manifest.json/lib/native.js presence among packages with native impl (12/14, 85.7%), all standard top-level package.json keys (100%), JSDoc paramTags and returnsTag presence (100%), hasExample JSDoc (100%), returnKind: value (100%), validationPrologue: [] (NaN-on-invalid pattern, 100%).
  • Features without clear majority (excluded): README section ordering (Examples vs C APIs precedence) — only 10/14 (71.4%) follow the JS-Examples-before-C-APIs ordering; lib/factory.js presence (6/14, 42.9%); test.factory.js presence (6/14, 42.9%). Below the 75% threshold, so excluded.

stats/base/dists/gamma/logcdf

Promotes the C APIs heading from ### to ## and the nested Usage heading from #### to ###, and wraps C APIs content in a dedicated <section class="c"> element closed outside <section class="usage"> — matching the pattern held by 11/14 (78.6%) of packages in the namespace. The prior structure had C APIs content swallowed inside the JS usage section with no own wrapper, diverging from the dominant convention.

Related Issues

None.

Questions

None.

Other

Validation

  • Structural feature extraction: file-tree, package.json/manifest.json keysets, README headings, test/benchmark/example filenames pulled mechanically across all 14 members.
  • Semantic feature extraction via per-package agents: parallel sonnet agents extracted publicSignature, returnKind, validationPrologue, errorConstruction, jsdocShape, and @stdlib/* dependencies from each package's lib/.
  • Three-agent drift validation: an opus semantic-review agent, an opus cross-reference agent, and a sonnet structural-review agent each independently inspected the proposed logcdf correction. All three returned confirmed-drift; cross-reference confirmed no test, example, or external markdown anchor depends on the prior README structure.

Deliberately excluded

  • Native-implementation files (binding.gyp, manifest.json, lib/native.js, src/*, include/*.h, examples/c/*, benchmark/c/*, test.native.js, test/fixtures/julia/*) missing in ctor and quantile — both legitimately lack a native C implementation.
  • README section ordering drift — JS-Examples-before-C-APIs is at 71.4%, below the 75% majority threshold; cdf and logcdf retain their existing Usage→C APIs→Examples ordering.
  • lib/factory.js / test.factory.js asymmetry — present only in packages whose API supports a partial-application factory; not a namespace convention.

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 as part of an automated cross-package drift-detection routine: a randomly selected namespace's packages are compared by structural and semantic features, packages diverging from the namespace majority on features with ≥75% conformance are flagged, and three independent validation agents gate each correction. Only the logcdf README structural realignment survived filtering for this run; all other potential drift was excluded as either intentional (no native impl) or below the majority threshold.


@stdlib-js/reviewers


Generated by Claude Code

Restructured the README to match the structural majority pattern used
across the `stats/base/dists/gamma` namespace:

- Wrapped the C APIs section in `<section class="c">` (78.6% of siblings).
- Promoted `### C APIs` heading to `## C APIs` (78.6% of siblings).
- Promoted `#### Usage` heading under C APIs to `### Usage` (78.6% of siblings).
- Closed `<section class="usage">` for the JS API before the C APIs section
  rather than after it; the C APIs content is now a sibling, not nested
  inside the JS usage wrapper.

No content changes; section layout and heading levels only.
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Apr 30, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Apr 30, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/gamma/logcdf $\color{green}289/289$
$\color{green}+0.00%$
$\color{green}19/19$
$\color{green}+0.00%$
$\color{green}4/4$
$\color{green}+0.00%$
$\color{green}289/289$
$\color{green}+0.00%$

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

@Planeshifter Planeshifter marked this pull request as ready for review May 1, 2026 03:53
@Planeshifter Planeshifter requested review from a team and kgryte May 1, 2026 03:53
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 1, 2026
Comment thread lib/node_modules/@stdlib/stats/base/dists/gamma/logcdf/README.md Outdated
…dists/gamma/logcdf`

Moved the JS `## Examples` section to sit between the JS `## Usage`
section and the `## C APIs` section, matching the namespace majority
ordering (10/14 siblings) and addressing review feedback that JS
examples should be co-located with the documentation for the JS APIs
rather than placed after the C interface documentation.

No content changes; section ordering only.
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels May 1, 2026
@kgryte kgryte merged commit 83838f6 into develop May 1, 2026
30 checks passed
@kgryte kgryte deleted the philipp/drift-stats-base-dists-gamma-2026-04-30 branch May 1, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants