Skip to content

module-diagrams: test-health batch e3855-module-diagrams-01 #3910

Closed

Description

@schlessera

Context

This is one shard of the test-health push in #3855. Shard e3855-module-diagrams-01 covers the 17 Bun unit test files under packages/module-diagrams/tests/. They were audited through all eight lenses in 9 clusters, in run th-20261110203030-1866df, on branch test-health/e3855-module-diagrams-01 (cut from epic/3855-test-health).

Fixed findings, each with a killed mutation receipt:

  • packages/module-diagrams/tests/positional.test.ts, conditional-assertion, four cases. Each assertion ran only inside a loop over a collection that could be empty:
    • loop/flywheel clearance: the label masks and ring arcs it samples are now pinned (2 masks for loop, 5 arcs). Mutant killed: spoke masks repainted as nodes (packages/module-diagrams/src/positional-layout.ts:78).
    • generated scenes: the ring radius, sweep and station-edge checks ran only for ids starting with ring-. Five ring paths are now pinned for loop and flywheel. Mutant killed: ring paths renamed (positional-layout.ts:61).
    • Venn: the intersection containment loop now pins the region count to the authored intersections. Mutant killed: intersection region renamed (positional-layout.ts:107).
    • pyramid/funnel: the width, apex and text-inside checks sat in polygons.forEach. Four trapezoids are now pinned. Mutant killed: polygon shape kind changed (positional-layout.ts:19).
  • packages/module-diagrams/tests/spec.test.ts, empty-by-construction. Every off-grid input was odd (189, 149), so a grid check weakened to mod 2 still passed. An even off-grid x of 190 is now refused by its exact finding. Mutant killed: % 4 changed to % 2 (packages/module-diagrams/src/check.ts:121).
  • packages/module-diagrams/tests/skin.test.ts, empty-by-construction. Same gap in the authored-narrow grid case (x = 41 only). An x = 42 case is added. Mutant killed: % 4 changed to % 2 (packages/module-diagrams/src/layout.ts:37).
  • packages/module-diagrams/tests/export.test.ts, opaque-failure. A some(...) boolean now compares the audit issue category and path, so a failure prints the issues.

Scope

Test code under packages/module-diagrams/tests/ only.

Out of scope

Product code, timeouts, shards and selection, and test files outside the shard.

Acceptance criteria

  • The batch gate (bun scripts/test-health.ts batch verify --base origin/epic/3855-test-health) passes, with no test removed (50 tests before and after).
  • Each fixed finding carries a killed mutation receipt in the run directory.

Verification

bun scripts/test-health.ts batch verify and bun run check:pr --base origin/epic/3855-test-health on the batch head.

Contract impact

None.

Activity

  1. added this to the 0.45.0 milestone on Nov 10, 2026
  2. added
    type: test
    area: modules
    on Nov 10, 2026
  3. added
    priority: p1
    on Nov 10, 2026
  4. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Delivered by #3913, which merged into epic/3855-test-health as 25d946858 (the push in #3855). It landed in the combined merge without proof of its own; the gate, typecheck and check:pr passed on the combined branch. The epic's two exhaustive runs on dc2439551, 42996974186 and 42997012467, then passed. GitHub does not apply Closes for a pull request into a non-default branch, so I'm closing this by hand. The change reaches main with the epic's single landing pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: modulespriority: p1type: test

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions