Skip to content

615-c · Intake contract: representability only — drop the clause-less empty-components rejection #619

Description

@grootstebozewolf

Umbrella: #615
claimId: 615-c
meso: fork / curves intake (Curves/CompoundCurve.cs, Curves/CircularString.cs, Curves/CurvePolygon.cs)
Blocked by: #617

Goal

Freeze the confirmed intake contract (decision 3 / Q11 = "freeze minus the over-strict one"): constructors reject exactly what makes a value unrepresentable — CircularString point-count shape (0 or odd ≥ 3, §7.3.1 Desc 7), CompoundCurve contiguity (§7.10.1 Desc 7), CurvePolygon ring closure — and nothing else. The one check with no clause behind it goes: the empty-components rejection (CompoundCurve.cs:64-68; the spec forbids only null components, §7.10.1 Desc 5, and is silent on empty — research doc §2.2/§5).

Plan

Read. The three ctor bodies post-615-b (the flatten changes the CompoundCurve walk); confirm nothing downstream indexes components assuming non-emptiness (component enumeration, boundary computation, WKT writer on empty components).

Green (TDD). Empty-component CompoundCurve constructs, round-trips WKT, and reports sane NumCurves/IsEmpty. Boundary-documenting tests, named as the intake contract: CIRCULARSTRING (0 0, 1 1, 0 0) (violates §7.3.1 Desc 6) constructs — its invalidity is the IsValid rung's job (615-g); even-count point lists still throw; non-contiguous components still throw; unclosed polygon ring still throws.

Refactor. Ctor comments cite the clause behind each surviving check plus the ADR (615-a); no check without a citation.

Witness

The intake test group reads as the executable form of the CONTEXT.md "Intake" entry: everything it accepts is representable, everything it rejects has a clause.

Definition of Done: fork suites green; research-doc §5 row for empty components updated (stricter-than-spec divergence dies).

topics: arc, wkt

Activity

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

    ImmediateHighest priority - blocking or critical for current RGR/curve work

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions