Skip to content

style: align outliers in complex/float64/base with namespace majority patterns#11924

Draft
Planeshifter wants to merge 1 commit intodevelopfrom
philipp/drift-complex-float64-base-2026-05-04
Draft

style: align outliers in complex/float64/base with namespace majority patterns#11924
Planeshifter wants to merge 1 commit intodevelopfrom
philipp/drift-complex-float64-base-2026-05-04

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Aligning outliers in @stdlib/complex/float64/base with namespace majority patterns (random namespace pick, seed 20260504).

Namespace summary

  • Members analyzed: 10 (add, add3, assert, div, identity, mul-add, mul, neg, scale, sub); none autogenerated.
  • Features analyzed: file tree, package.json shape (top-level keys, scripts, stdlib, directories, keywords, gypfile), manifest.json presence, README section list/order, test//benchmark//examples/ filenames, public signature, validation prologue, error construction, JSDoc shape, @stdlib/* dependencies.
  • Features with a clear majority (≥75%): file-tree elements (27 paths), all 18 universal package.json keys, gypfile: true (9/10), manifest.json presence (9/10), README ## Usage + ## Examples (10/10), README ## C APIs block (9/10), examples/index.js (10/10), test/test.js (10/10), test/test.native.js (9/10), public-signature shape per arity, errorConstruction = plain-string (10/10), returnKind = value (10/10), hasExample = true (10/10).
  • Features without a clear majority (excluded): ## See Also README section (6/10), ## References (1/10), test.assign.js / test.main.js / test.strided.js and matching benchmarks (6/10 each), __stdlib__ package.json key (1/10 — but its lone occurrence is itself drift, see below).

identity

Audited against the 9 non-assert members of @stdlib/complex/float64/base: identity was the sole outlier. Removes vestigial __stdlib__: {} from package.json (0/9 siblings carry it). Adds benchmark/c/Makefile, benchmark/c/benchmark.c, benchmark/julia/REQUIRE, and benchmark/julia/benchmark.jl to reach 100% conformance with the 8/8 native-binding siblings that have these files. C and Julia templates mirror complex/float64/base/neg (same unary complex shape).

Validation

What was checked:

  • Structural feature extraction across all 10 members (file tree, package.json, manifest.json, README, test/benchmark/example filenames).
  • Semantic feature extraction via per-package agents (public signature, validation prologue, error construction, JSDoc shape, @stdlib/* dependencies) — uniform across all 9 leaf packages; no semantic drift detected.
  • Three-agent drift validation: opus semantic-review (no semantic drift), opus cross-reference (tests/examples/cross-tree references unaffected by all 5 fixes), sonnet structural-review (assert outliers correctly classified intentional; identity outliers all confirmed drift).

What was deliberately excluded:

  • assert's 20 missing native-related files and missing gypfile field — assert is a sub-namespace re-exporter without native bindings, so missing binding.gyp, manifest.json, src/, lib/main.js, lib/native.js, examples/c/, benchmark/c/, benchmark/julia/, test/test.native.js is by design.
  • Signature variance across leaves ((z1,z2) vs (z) vs (alpha,z) vs (alpha,x,y) vs (z1,z2,z3)) — genuine mathematical-shape difference, not drift.
  • Features below the 75% threshold (e.g., ## See Also, test.assign.js/test.strided.js family).
  • Keywords drift on identity (number keyword absent; double/double-precision/dbl/float64 present) — not covered by the validated fix set; left for a future targeted pass.
  • Anything that would change observable behavior, public signatures, or test expectations.

Related Issues

None.

Questions

No.

Other

This PR is the output of an automated cross-package drift sweep using a 75% majority-vote threshold. Per-package commits, conformance percentages, and the full audit trail (including the dropped assert outliers) live in the local drift report; the corrections that survived three-agent validation are the only ones applied here.

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 authored by Claude Code as part of an automated cross-package API drift detection routine using majority-vote analysis. Structural and semantic features were extracted from all 10 members of @stdlib/complex/float64/base, the majority pattern was computed per feature with a 75% conformance threshold, and three independent validation agents (semantic-review, cross-reference, structural-review) confirmed each correction before it was applied. The benchmark file templates were generated by adapting the corresponding files from sibling package complex/float64/base/neg.


@stdlib-js/reviewers


Generated by Claude Code

Apply majority-pattern fixes from a drift sweep of `@stdlib/complex/float64/base`:

- Remove vestigial `__stdlib__: {}` field from `package.json` (absent in 9/9 sibling packages = 100% conformance among non-`assert` siblings).
- Add `benchmark/c/Makefile` (8/8 sibling native packages = 100% conformance).
- Add `benchmark/c/benchmark.c` (8/8 sibling native packages = 100% conformance).
- Add `benchmark/julia/REQUIRE` (8/8 sibling native packages = 100% conformance).
- Add `benchmark/julia/benchmark.jl` (8/8 sibling native packages = 100% conformance).

No public API or test changes; benchmark templates mirror `complex/float64/base/neg`
(unary complex op of the same shape).
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
complex/float64/base/identity $\color{green}133/133$
$\color{green}+100.00%$
$\color{green}5/5$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}133/133$
$\color{green}+100.00%$

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

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.

3 participants