Skip to content

chore: clean-up - #15555

Merged
kgryte merged 3 commits into
developfrom
philipp/drift-tools-makie-plugins-2026-09-26
Sep 26, 2026
Merged

kgryte merged 3 commits into
developfrom
philipp/drift-tools-makie-plugins-2026-09-26

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request corrects three inconsistencies in @stdlib/_tools/makie/plugins which were found by comparing every one of the namespace's 23 plugins against its siblings. No observable behavior changes.

Namespace summary

  • Members analyzed: 23 (every direct child of _tools/makie/plugins containing a package.json). None are autogenerated.
  • Features extracted: 21 — 7 structural (file tree, package.json top-level/scripts/stdlib key sets, README sections, manifest.json shape, test/benchmark/example filenames) and 14 semantic (declared parameter list, JSDoc tag shape, error construction, return kind, helper-function set, source dependencies, description agreement, args construction, and others).
  • Structural drift: none. All 23 members have exactly lib/index.js, lib/main.js, and package.json, and identical package.json key sets.
  • Features at 100% conformance: 18.
  • Features with a clear majority (>= 75%) and at least one outlier: 3.
  • Features excluded for lack of a clear majority: 0. Every feature's modal value cleared 75%, so nothing was dropped for want of a majority.
  • Candidate corrections: 7 considered, 3 applied, 4 deliberately dropped (see Other).

makie-benchmark-lang

The plugin description in lib/main.js read "Plugin to run benchmarks." — byte-identical to makie-benchmark's, and so describing the wrong plugin. lib/index.js and the package description field both already read "...run cross-language benchmarks.", and the benchmark-lang Makefile target is documented as "Runs cross-language benchmarks." This commit makes lib/main.js agree with the other two; 20 of 23 siblings (87%) keep all three in agreement.

makie-repl

The plugin description in lib/main.js read "Plugin for launching a REPL.", against "...to launch a REPL." in both lib/index.js and the package description field. This was also the only description in the namespace opening with "Plugin for" rather than "Plugin to", a form used by 22 of 23 siblings (96%). Both are resolved by adopting the existing lib/index.js wording.

makie-view-cov

The plugin built its make argument list as an array literal holding the target (args = [ 'view-cov' ];) instead of initializing an empty array and pushing the target, the form used by 22 of 23 siblings (96%). Its closest sibling, makie-view-complexity, was converted to that form when stdlib/no-new-array lint errors were fixed; this plugin was missed because an array literal does not trigger that rule. The spawned command is unchanged — intercepting child_process.spawn before and after this change yields an identical invocation, { cmd: 'make', args: [ 'view-cov' ], opts: { cwd: <dir> } }.

Related Issues

Does this pull request have any related issues?

None.

Questions

Any questions for reviewers of this pull request?

Two items were found and deliberately left out of this pull request; both are noted under Other. The copyright-year discrepancy in makie-complexity/lib/index.js is the one worth a maintainer's decision.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation

Each candidate correction was checked for whether it (a) deviates from a pattern holding in at least 75% of the namespace, (b) is mechanical, and (c) leaves observable behavior untouched. Structural features were extracted from the filesystem; semantic features from lib/main.js and lib/index.js. Candidates were then reviewed along three independent axes — is the deviation intentional, does anything depend on it, and is the majority pattern the right thing to apply.

Checks performed:

  • Repo-wide consumer search. The only external reference to any of these plugins is etc/.makie.js, which maps target names to package paths and is consumed generically; there is no name- or arity-specific coupling. No test, benchmark, or example exists anywhere under _tools/makie.
  • view-cov Makefile target confirmed to take no per-invocation arguments, so the args change is inert.
  • spawn interception before and after the args change, confirming an identical command.
  • Module load and arity check on all three modified files; arities are unchanged.

Deliberately excluded

  • Extra trailing @param tags. makie-view-cov, makie-view-complexity, and makie-list-pkgs-names document dir, cwd, and subpath while declaring fewer parameters. This is not drift: makie/README.md documents the plugin interface as plugin( dir, cwd, subpath ) and states all three arguments are always supplied, etc/eslint/rules/programmer_errors.js sets allowExtraTrailingParamDocs: true, and among the four plugins that narrow the signature, three document the full contract — so the majority inverts once restricted to comparable packages. The tags document the interface, not the implementation.
  • makie-markdown-examples-javascript description. lib/main.js says "in README.md files." against "in Markdown files." in lib/index.js and package.json. The markdown-examples-javascript recipe greps for README.md, so lib/main.js is the more accurate text and the package is internally inconsistent in the opposite direction. Whether to loosen lib/main.js or tighten the other two is a maintainer's call.
  • Error construction. All 22 plugins that report errors use console.error with string concatenation, and none require @stdlib/string/format. This is a uniform namespace convention rather than drift — there is no outlier to normalize — but it does diverge from format as used elsewhere in stdlib. Flagged for a maintainer; normalizing all 22 is out of scope here.
  • Copyright year in makie-complexity/lib/index.js. It reads 2018 while the other 22 lib/index.js files read 2022, consistent with these files having been introduced by a single later split of index.js from main.js. Left alone because a copyright year is an attestation about provenance rather than a code-quality matter.
  • Cosmetic-only divergences. A blank JSDoc line in makie-list-pkgs's @example, and makie-install-node-addons naming its child-process variable child rather than proc. Both are real but carry no reader benefit; excluded as churn.
  • Intentional deviations. makie-repl and makie-stats-list-contributors omit stdout/stderr handlers because they set opts.stdio = 'inherit'; makie-repl omits the process dependency because it never uses it. Plugins declaring fewer than three parameters do so because they use fewer.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

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)
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This pull request was written by Claude Code. It ran an automated cross-package comparison over the namespace, proposed the corrections, and applied them; the reviews that rejected four of the seven candidates were also carried out by Claude Code. Every claim in this description — the conformance percentages, the spawn equivalence, the lint configuration, and the Makefile recipe behavior — was verified against the repository. Reviewers should confirm the three surviving changes are wanted before this is promoted out of draft.


🤖 Generated with Claude Code

https://claude.ai/code/session_019jbKvYDh4CASxMJWBErc42


Generated by Claude Code

The plugin description in `lib/main.js` read "Plugin to run
benchmarks.", which is byte-identical to the description in
`makie-benchmark` and therefore describes the wrong plugin. Both
`lib/index.js` and the package `description` field already read
"...run cross-language benchmarks.", and the invoked `benchmark-lang`
Makefile target is documented as "Runs cross-language benchmarks."

Corrected drift item:

-   Synchronized the `lib/main.js` plugin description with
    `lib/index.js` and `package.json` (20 of 23 siblings, 87%, keep the
    three in agreement).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jbKvYDh4CASxMJWBErc42
The plugin description in `lib/main.js` read "Plugin for launching a
REPL.", while `lib/index.js` and the package `description` field both
read "...to launch a REPL."

Corrected drift items:

-   Synchronized the `lib/main.js` plugin description with
    `lib/index.js` and `package.json` (20 of 23 siblings, 87%, keep the
    three in agreement).
-   Adopted the "Plugin to <verb>" phrasing used by 22 of 23 siblings
    (96%); this was the only description opening with "Plugin for".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jbKvYDh4CASxMJWBErc42
The plugin initialized its `make` argument list with an array literal
containing the target (`args = [ 'view-cov' ];`) rather than
initializing an empty array and pushing the target, as every other
plugin in the namespace does. The sibling `makie-view-complexity` was
converted to the empty-array-and-push form when `stdlib/no-new-array`
lint errors were fixed; this plugin was not, because an array literal
does not trigger that rule.

Corrected drift item:

-   Initialize `args` as an empty array and append the target via
    `args.push` (22 of 23 siblings, 96%).

The spawned command is unchanged. Intercepting `child_process.spawn`
before and after yields an identical invocation:

    { cmd: 'make', args: [ 'view-cov' ], opts: { cwd: <dir> } }

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019jbKvYDh4CASxMJWBErc42
@stdlib-bot stdlib-bot added the Tools Issue or pull request related to project tooling. label Sep 26, 2026
@kgryte
kgryte marked this pull request as ready for review September 26, 2026 07:00
@kgryte
kgryte requested a review from a team September 26, 2026 07:00
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 26, 2026
@kgryte kgryte changed the title refactor: fix descriptions and argument setup in _tools/makie/plugins chore: clean-up Sep 26, 2026
@kgryte
kgryte merged commit fa7647d into develop Sep 26, 2026
47 checks passed
@kgryte
kgryte deleted the philipp/drift-tools-makie-plugins-2026-09-26 branch September 26, 2026 07:01
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Sep 26, 2026
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