Skip to content

bench: add missing benchmark to dstructs/compact-adjacency-matrix#11810

Draft
Planeshifter wants to merge 1 commit intodevelopfrom
philipp/drift-dstructs-2026-04-27
Draft

bench: add missing benchmark to dstructs/compact-adjacency-matrix#11810
Planeshifter wants to merge 1 commit intodevelopfrom
philipp/drift-dstructs-2026-04-27

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • Aligns outliers in the @stdlib/dstructs namespace with namespace majority patterns (random namespace pick, seed drift-routine-2026-04-27).

Namespace summary

  • Target: @stdlib/dstructs
  • Members analyzed: 8 (circular-buffer, compact-adjacency-matrix, doubly-linked-list, fifo, linked-list, named-typed-tuple, stack, struct); zero autogenerated, zero excluded.
  • Features analyzed: file tree / directory presence, package.json shape (top keys, directories, scripts, keywords), README section list and order, manifest shape, test/benchmark/example file naming, public signature, return kind, validation prologue, error construction, JSDoc shape, @stdlib/* dependency set.
  • Features with clear majority (≥75%): presence of lib/, test/, examples/, README.md, package.json, benchmark/ (87.5%), docs/ (87.5%); identical top-level package.json keys across all 8; directories.benchmark (87.5%) and directories.doc (87.5%); returnKind: value (100%); jsdocShape.hasExample: true (100%); README sections Usage (100%) and Examples (100%); deps @stdlib/utils/define-nonenumerable-read-only-property and @stdlib/utils/define-nonenumerable-read-only-accessor (100%).
  • Features without clear majority (excluded): README sections Notes (62.5%) and See Also (62.5%); README section ordering (no contiguous subsequence ≥75% beyond Usage→Examples); public-signature arity (0 args 50%, 1 arg 37.5%, 2 args 12.5%); validation prologue (no shared subsequence ≥75%); errorConstruction (format 62.5%, others split). All dropped from drift detection.

compact-adjacency-matrix

Adds a missing benchmark/ directory and directories.benchmark entry to @stdlib/dstructs/compact-adjacency-matrix, bringing it into line with 7 of 8 siblings (87.5%) in the dstructs namespace. The benchmark covers both new and no-new instantiation paths using the standard boilerplate shared across the namespace. Without this, the package was the sole outlier in an otherwise consistent drift run.

Validation

Three independent agents reviewed the candidate corrections:

  • Semantic-review (opus) — confirmed there are no semantic-feature drift findings: the plain-string throws in linked-list/doubly-linked-list use static messages without interpolation (not concatenation drift); fifo/stack contain no throws at all; signature variation is genuine API difference, not stylistic drift.
  • Cross-reference (opus) — confirmed compact-adjacency-matrix's test suite has no benchmark-file dependency, no upstream README in the namespace references the missing path, and the change is purely additive.
  • Structural-review (sonnet) — confirmed compact-adjacency-matrix benchmark drift; flagged struct's missing docs/ as needs-human (real REPL/types content cannot be safely auto-stubbed) and dropped from this run.

Excluded from this run

  • struct is missing the docs/ directory (docs/repl.txt, docs/types/index.d.ts) at 87.5% sibling conformance, but the fix requires authoring real package-specific REPL examples and TypeScript declarations — out of scope for mechanical drift correction. Logged for human authorship.
  • All semantic features (signatures, validation prologues, error construction, JSDoc paramTag types) are below the 75% majority threshold across the namespace; nothing advanced.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request?

This PR is the output of an automated cross-package API drift detection routine over the @stdlib/dstructs namespace. Namespace was picked uniformly at random from eligible (≥8 non-autogenerated members, ≤50% autogenerated) namespaces using seed drift-routine-2026-04-27. Detailed per-feature majority pattern, conformance percentages, outlier list, and validation-agent verdicts are in the local drift report (not committed to the repo). PR is intentionally left in draft state pending maintainer audit.

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

Disclosure

This PR was authored end-to-end by Claude Code running an automated cross-package drift-detection routine: namespace selection, structural feature extraction, semantic feature extraction (per-package sonnet agents), three-agent drift validation (opus + sonnet), and patch application. The generated benchmark/benchmark.js scaffold mirrors the boilerplate of sibling benchmarks in the namespace; the package.json directories.benchmark entry is a one-line additive change. PR is left in draft for human audit before promotion.


@stdlib-js/reviewers


Generated by Claude Code

…ntions

Added missing `benchmark/benchmark.js` (present in 87.5% of `dstructs`
siblings) with an instantiation-only scaffold matching the boilerplate
used by sibling benchmarks (Apache header, `format()`-based bench label,
`b.tic`/`b.toc`/`b.pass`/`b.end`); added `directories.benchmark` entry
to `package.json` (present in 87.5% of siblings).

https://claude.ai/code/session_01Y3Xf8psrX9CDj1KvW8f9xC
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
dstructs/compact-adjacency-matrix $\color{red}912/1463$
$\color{green}+62.34%$
$\color{red}14/15$
$\color{green}+93.33%$
$\color{red}1/24$
$\color{green}+4.17%$
$\color{red}912/1463$
$\color{green}+62.34%$

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

@Planeshifter Planeshifter changed the title style: align dstructs/compact-adjacency-matrix with namespace conventions bench: add missing benchmark to dstructs/compact-adjacency-matrix Apr 27, 2026
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