Skip to content

docs: add missing README C documentation to stats/base/dists/pareto-type1#11941

Open
Planeshifter wants to merge 1 commit intodevelopfrom
philipp/drift-stats-base-dists-pareto-type1-2026-05-05
Open

docs: add missing README C documentation to stats/base/dists/pareto-type1#11941
Planeshifter wants to merge 1 commit intodevelopfrom
philipp/drift-stats-base-dists-pareto-type1-2026-05-05

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Aligning outliers in stats/base/dists/pareto-type1 with namespace majority patterns (random namespace pick, seed 20260505).

Namespace summary

  • Members analyzed: 14 (cdf, ctor, entropy, kurtosis, logcdf, logpdf, mean, median, mode, pdf, quantile, skewness, stdev, variance); 0 excluded as autogenerated.
  • Features analyzed: file tree, package.json shape, README sections (set + sequence), manifest.json shape, test/ / benchmark/ / examples/ file naming, public signature, return kind, validation prologue, error construction, JSDoc shape, dependency set.
  • Features with a clear majority (≥75% conformance): file tree (78.6%), package.json top-level keys (85.7%), README L2/L3 section set (78.6%), test/ files (85.7%), benchmark/ files (85.7%), examples/ files (85.7%), JSDoc hasExample (100%), returnKind (100% for non-ctor).
  • Features without a clear majority (excluded from drift detection): package.json scripts keys (0 universal), package.json stdlib keys (0 universal), README section sequence (most common at 64.3%), validationPrologue (mixed across sonnet extractions; underlying behavior is uniform NaN-return), errorConstruction (13/14 plain-string reflects "no error built" rather than a target style — nothing to normalize toward format).

Per-outlier corrections

stats/base/dists/pareto-type1/pdf

Adds the missing ## C APIs section to the README for stats/base/dists/pareto-type1/pdf, which ships a full native implementation (binding.gyp, src/main.c, src/addon.c, etc.) but lacked documentation for its C entry point. Within the stats/base/dists/pareto-type1/ namespace, 11 of 14 sibling packages carry this section (79%), and every sibling with native artifacts includes it — pdf was the lone exception. The section is adapted from the cdf template, updated with the correct function name, signature, and a worked example (stdlib_base_dists_pareto_type1_pdf( 4.0, 1.0, 1.0 ) => ~0.063).

Validation

  • Structural feature extraction: file system walk over each member's package directory; majority computed at the 75% threshold (cutoff = 11 of 14).
  • Semantic feature extraction: one Sonnet agent per package read lib/main.js / lib/index.js / lib/factory.js / lib/native.js and returned a fixed-schema JSON bundle; all 14 returned valid JSON on first attempt.
  • Three-agent drift validation: Opus semantic-review (intentional-deviation detection), Opus cross-reference (test/example/cross-package impact), Sonnet structural-review (per-outlier verdict).
  • Deliberately excluded from this PR:
    • ctor outlier flags (no native artifacts, distinct constructor JSDoc shape, format-style errors, optional defaults) — intentional deviation: distribution constructors are pure-JS wrappers across stdlib by design.
    • median outlier flags (no native artifacts) — confirmed structural drift but the corresponding fix is a full native port (C source, manifest, Julia fixtures, test.native.js); not mechanical, out of scope for the routine. Logged for future work.
    • logcdf / logpdf README sequence drift (extra Notes section) — package-specific narrative content, not drift.
    • Semantic features without a clear majority (validation prologue style, error construction style) — flagged variants reflect uniform NaN-return semantics, no target pattern to normalize toward.

Related Issues

No.

Questions

No.

Other

This PR is the output of the cross-package API drift detection routine, run on a uniformly-randomly-sampled eligible namespace (seed 20260505, total_eligible = 121). The full machine-readable report (member list, per-feature majority pattern, conformance percentages, all dropped-correction rationales) is archived alongside the run.

Checklist

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 generated by an automated cross-package drift-detection routine driven by Claude Code. Per-package source extraction was delegated to Sonnet agents, drift validation was performed by three independent Opus/Sonnet agents (semantic-review, cross-reference, structural-review), and the resulting README patch on stats/base/dists/pareto-type1/pdf was authored by Claude. A human will audit and promote this draft before merge.


@stdlib-js/reviewers


Generated by Claude Code

… conventions

Adds the missing `## C APIs` section (present in 79% of siblings,
universal among siblings shipping native code). The package already
ships `binding.gyp`, `lib/native.js`, `src/`, `include/` and
`manifest.json`; this patch only documents the existing C entry point
to bring the README in line with `cdf`, `logcdf`, `logpdf`, `quantile`,
and the moment-function packages.
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label May 5, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/pareto-type1/pdf $\color{red}336/339$
$\color{green}+99.11%$
$\color{green}24/24$
$\color{green}+100.00%$
$\color{red}3/4$
$\color{green}+75.00%$
$\color{red}336/339$
$\color{green}+99.11%$

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

@Planeshifter Planeshifter changed the title docs: align outliers in stats/base/dists/pareto-type1 with namespace conventions docs: add missing C documentation to stats/base/dists/pareto-type1 May 5, 2026
@Planeshifter Planeshifter marked this pull request as ready for review May 5, 2026 14:28
@Planeshifter Planeshifter requested review from a team and kgryte May 5, 2026 14:28
@Planeshifter Planeshifter changed the title docs: add missing C documentation to stats/base/dists/pareto-type1 docs: add missing README C documentation to stats/base/dists/pareto-type1 May 5, 2026
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants