test(api): pin v1.8 value-type guards and widen the engine-leak guard#188
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):<3points, non-positive/NaN/∞ box, null points, defensive vertex-ring copy.DocumentColorTest(new):withOpacityrange +NaNrejection, boundary alpha rounding (0.0→0,1.0→255,0.5→128),rgbaalpha channel.ShapeOutlineTest:ShapeOutline.Pathsegment-count /MoveTo-first / null guards + defensive segment copy.PathBuilderTest:dashed()empty + non-positive rejection, and the documentedbuild()-snapshot reuse contract.PublicApiNoEngineLeakTest: add the new publicdocument.svgpackage (peer ofdocument.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.