Skip to content

chore: align outliers in _tools/lint with namespace majority patterns#11835

Merged
kgryte merged 6 commits intodevelopfrom
philipp/drift-_tools-lint-2026-04-29
Apr 29, 2026
Merged

chore: align outliers in _tools/lint with namespace majority patterns#11835
kgryte merged 6 commits intodevelopfrom
philipp/drift-_tools-lint-2026-04-29

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

@Planeshifter Planeshifter commented Apr 29, 2026

Description

Aligning outliers in _tools/lint with namespace majority patterns (random namespace pick, seed 20260429).

Namespace summary

  • Members analyzed: 9 (filenames, header-filenames, license-header, license-header-file-list, license-header-glob, namespace-aliases, pkg-json, pkg-json-names, repl-txt)
  • Autogenerated members excluded: 0
  • Features analyzed: file tree, package.json shape, README sections (set + ordered), test/benchmark/example file naming, public signature, validation prologue, error construction, JSDoc shape, @stdlib/* dependencies, return kind
  • Features with a clear majority (≥75%): file tree (universal core), README L2 section set + order, public signature (options, clbk), validation prologue clbk: isFunction, error construction format, JSDoc hasExample true, return kind void, dependency core (@stdlib/string/format, @stdlib/assert/is-string, @stdlib/assert/is-function, @stdlib/assert/is-plain-object, @stdlib/utils/define-nonenumerable-read-only-property, @stdlib/process/cwd, @stdlib/assert/has-own-property)
  • Features without a clear majority: package.json scripts/stdlib keys (universally empty in this _tools/* namespace — no signal), benchmark file conventions (no benchmark/ directories present)

pkg-json-names

Fixes _tools/lint/pkg-json-names/lib/async.js line 47, where the @param type for clbk was {Function} rather than {Callback}. The {Callback} JSDoc type is the established convention in 7 of 9 (78%) _tools/lint/* siblings.

namespace-aliases

Adds test/test.js to _tools/lint/namespace-aliases, bringing it in line with the 89% majority pattern across the _tools/lint namespace (8 of 9 siblings). The smoke test asserts the main export is a function exposing a .sync method, matching the boilerplate established in _tools/lint/filenames and _tools/lint/pkg-json.

Validation

Checked:

  • Structural feature extraction across all 9 members (file tree, package.json keys/scripts/stdlib, README L2/L3 sections, manifest shape, test/benchmark/example file naming).
  • Semantic feature extraction via per-package agents reading lib/main.js / lib/index.js / lib/validate.js (signature, return kind, validation prologue, error construction, JSDoc shape, dependencies).
  • Three-agent drift validation: opus semantic-review (intentional vs unintentional deviation), opus cross-reference (test/example reliance + sibling documentation), sonnet structural-review (majority applicability).

Deliberately excluded:

  • license-header deviating on returnKind/publicSignature — intentional (sync string-blob primitive).
  • license-header-file-list deviating on publicSignature — intentional (positional file list is the API contract).
  • license-header-glob and namespace-aliases missing test/fixtures/stdin_error.js.txt — neither CLI consumes stdin.
  • license-header missing lib/sync.js/lib/validate.js/test counterparts — async/sync split inapplicable to a synchronous primitive.
  • license-header-file-list missing lib/validate.js — validation is inlined in main.js by design.
  • pkg-json and repl-txt empty <section class="notes"> — placeholders need package-specific content authoring (no mechanical fix).
  • namespace-aliases missing test/test.sync.js — a meaningful test would require fixtures the package lacks.
  • namespace-aliases missing @stdlib/process/cwd dependency — package resolves a stdlib root via internal lib/root.js, intentional.

The full audit (per-feature majorities, conformance percentages, every outlier and the reason it was kept or dropped) is preserved in a local drift report alongside the seed (20260429) for reproducibility.

Related Issues

None.

Questions

None.

Other

This PR is intentionally narrow — only two drift corrections survived three-agent validation in this namespace, and they sit on disjoint outlier packages.

Checklist

AI Assistance

  • Yes

  • No

  • 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 (Anthropic) running an automated cross-package API drift detection routine: a structural + semantic feature pass over the namespace, majority-vote analysis at a 75% threshold, three-agent validation of every candidate, and mechanical alignment for the outliers that survived.


@stdlib-js/reviewers


Generated by Claude Code

…ions

Normalize `clbk` JSDoc type from `{Function}` to `{Callback}` in
`lib/async.js` to match the convention used by 7/8 (87.5%) sibling
packages in `_tools/lint`. The package's own `lib/lint.js` already
uses `{Callback}`, so this also fixes an internal inconsistency.

https://claude.ai/code/session_01UD2CQnJzjycfDbQ5DF4R96
@stdlib-bot stdlib-bot added the Tools Issue or pull request related to project tooling. label Apr 29, 2026
@Planeshifter Planeshifter changed the title docs: align outliers in _tools/lint with namespace JSDoc conventions docs: use callback type Apr 29, 2026
@Planeshifter Planeshifter marked this pull request as ready for review April 29, 2026 04:51
@Planeshifter Planeshifter requested review from a team and kgryte April 29, 2026 04:51
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 29, 2026
kgryte and others added 3 commits April 29, 2026 16:22
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
Added the missing `test/test.js` smoke test (present in 89% of siblings
in `_tools/lint/*`), verifying the main export is a function and exposes
a `.sync` method.

https://claude.ai/code/session_01AUoXAip8PZ8HxKqdgZi98C
@Planeshifter Planeshifter changed the title docs: use callback type Aligning outliers in _tools/lint with namespace majority patterns Apr 29, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

…ace-aliases/test/test.js`

The `Lint Copyright Years` workflow checks newly-added files for the
current year in the copyright notice. Bumping from 2018 (which appears
to have been carried over from the boilerplate) to 2026.

https://claude.ai/code/session_01UD2CQnJzjycfDbQ5DF4R96
@kgryte kgryte changed the title Aligning outliers in _tools/lint with namespace majority patterns chore: align outliers in _tools/lint with namespace majority patterns Apr 29, 2026
@kgryte
Copy link
Copy Markdown
Member

kgryte commented Apr 29, 2026

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Apr 29, 2026
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Apr 29, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Apr 29, 2026
@kgryte kgryte merged commit a2c531c into develop Apr 29, 2026
11 checks passed
@kgryte kgryte deleted the philipp/drift-_tools-lint-2026-04-29 branch April 29, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants