Skip to content

test(api): pin v1.8 value-type guards and widen the engine-leak guard#188

Merged
DemchaAV merged 2 commits into
developfrom
test/pin-v18-value-type-guards
Jun 14, 2026
Merged

test(api): pin v1.8 value-type guards and widen the engine-leak guard#188
DemchaAV merged 2 commits into
developfrom
test/pin-v18-value-type-guards

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

Several new v1.8 public value types carry fail-loud guards that nothing drives directly — the kind of unreached-but-correct code a later refactor deletes with no test going red (the repo's own PR-7.3 lesson). Senior-review audit flagged the gaps. Test-only PR.

What

  • PolygonNodeTest (new): <3 points, non-positive/NaN/∞ box, null points, defensive vertex-ring copy.
  • DocumentColorTest (new): withOpacity range + NaN rejection, boundary alpha rounding (0.0→0, 1.0→255, 0.5→128), rgba alpha channel.
  • ShapeOutlineTest: ShapeOutline.Path segment-count / MoveTo-first / null guards + defensive segment copy.
  • PathBuilderTest: dashed() empty + non-positive rejection, and the documented build()-snapshot reuse contract.
  • PublicApiNoEngineLeakTest: add the new public document.svg package (peer of document.chart, already covered). Engine-clean today; the guard now keeps the largest new public package from leaking engine types.

Tests

Full suite 1368 green. No production code touched.

Lane: test / architecture guard.

DemchaAV and others added 2 commits June 14, 2026 13:16
Several new 1.8.0 public value types carry fail-loud guards that nothing
drives directly — the kind of unreached-but-correct code a later refactor
deletes with no test going red (the repo's own PR-7.3 lesson). Pin them:

- PolygonNodeTest: <3 points, non-positive/NaN/Infinity box, null points,
  defensive vertex-ring copy.
- DocumentColorTest: withOpacity range + NaN rejection, boundary alpha
  rounding (0.0->0, 1.0->255, 0.5->128), rgba alpha channel.
- ShapeOutlineTest: ShapeOutline.Path segment-count / MoveTo-first / null
  guards and defensive segment copy.
- PathBuilderTest: dashed() empty + non-positive rejection, and the
  documented build()-snapshot reuse contract.

Also add the new public document.svg package to PublicApiNoEngineLeakTest
(peer of document.chart, which was already covered). The package is
engine-clean today; the guard now keeps the largest new public package
from leaking engine types. Test-only; full suite green.
@DemchaAV DemchaAV merged commit 942d705 into develop Jun 14, 2026
11 checks passed
@DemchaAV DemchaAV deleted the test/pin-v18-value-type-guards branch June 14, 2026 13:12
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.

1 participant