Repository navigation
spatial modeling - #8159
Closed
briansrls wants to merge 2 commits into
Closed
spatial modeling#8159briansrls wants to merge 2 commits into
briansrls wants to merge 2 commits into
Conversation
…efusal #8091 claimed that a phantom frame parameter made cross-frame subtraction fail to typecheck, and called that the stronger of the two available options. Measured on the production compile-and-run path 2026-08-11, that program compiles clean and returns 9 -- a plausible number for a question with no answer, which is the fabricated output DESIGN 5 forbids. The cause is a v1 seed limitation, not a modelling slip: the argument-position judge compares nominal HEAD NAMES, and applied type arguments live in the type node's children where every name-level comparison discards them. Point3 matched Point3, so the frames were never compared. A separate compiler PR closes the call boundary; it cannot close the producer side, because return-position conformance declines to judge record types at all pending feature:conformance-produced-type-identity. So the carried identity is the authority and the honest claim is frame consistency BY CHECKED DERIVATION, not by construction: - std.coordinate_frame mints CoordinateFrameIdentity, declaration-owned and never derived from a name or from contents (the HostResourceIdentity precedent). Recorded as the third minted-occurrence carrier in the corpus, which is evidence the subject-parameterized extraction is due -- left as a trigger rather than built here. - Phantom <F> is removed rather than demoted. Two authorities for one fact is the DESIGN 3 violation whichever is right, and the weaker one is the one the compiler cannot enforce end to end. - SpatialResult carries three arms: ready, arithmetic refusal, frame refusal. One coproduct rather than nested result types -- there is one question at the operation boundary and the causes are what differ. - The refusal names ROLES, not expected/observed: for a symmetric operation neither frame is normatively expected, so an operation identity and the required relation replace a report of argument order. - The frame check precedes the arithmetic everywhere, because operands in different frames pose no question to overflow. Green by execution, with discriminating controls: cross-frame subtraction, addition, subtraction, translation and transform application each refuse and name both frames; same-frame operations still answer (the positive sibling a refusal-only control cannot see); frame and overflow are asserted distinct in both directions; a transform's translation must be in its destination frame. The decisive one is the lying-producer control: a function handing back a room-frame value under a building-frame annotation cannot rewrite the carried frame, and the next operation refuses. Mutation-tested -- disabling a single frame guard reds the suite. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Everything here is closed under integer millimetre arithmetic -- no roots, no trigonometry, no rounding policy -- which is why the band sits before an approximate-numeric realization rather than after it. Rectilinear architectural geometry is exactly representable, so it is represented exactly, and the layer that needs a real number pays for it there. CARRIERS: Axis2/Axis3, AxisAlignedSegment2, AxisAlignedRectangle2, Plane3, AxisAlignedBox3, BoundingBox3, OrthogonalLoop2, AxisAlignedSurface3, OrthogonalPrism3, OrthogonalRotation3. THE WALLS ARE CONSTRUCTION, NOT VALIDATION. Every carrier is sole_constructor, so its record literal cannot be written and no cast reaches it from another module: the only route to a value is the mint beside it, and the mint refuses. A degenerate segment, an unclosed or self-intersecting loop, a zero-extent box and a cross-frame composition have no constructor outside this module rather than being checked by a caller who might not check. THE 24 ROTATIONS ARE 24 BY CONSTRUCTION. A rotation is fixed by the images of +X and +Y (six choices, then four perpendicular ones); +Z is DERIVED as their cross product, so orientation-preservation is not a determinant check that rejects reflections -- a reflection has no representation. Enumerating 24 variants would be a table to get wrong once and maintain forever, and storing three images concedes the reflected state is writable. TYPED REFUSALS, one per invalid state, because the remedies differ: coincident endpoints are an authoring slip, a diagonal is a limit of the exact kernel, a frame mismatch is a composition error. Extent refusals NAME THE AXIS that collapsed. TWO CARRIERS DELIBERATELY NOT MINTED, recorded rather than silently omitted: OrthogonalSegment2 and OrthogonalSurface3. In 2D an axis-aligned segment and an orthogonal segment denote the same set, as do an axis-aligned rectangle and an orthogonal surface in an axis-perpendicular plane; minting both spellings forks one concept across two authorities (DESIGN section 3). NO POLYGON BOOLEANS. Union, intersection and difference are absent, not stubbed and not approximated: rectilinear Booleans need a sweep with a canonical output ordering and a touching-edge degeneracy policy, and inventing that policy under the name `union` is how a plausible wrong region reaches a consumer. Green by execution, eight witnesses, every negative control with a positive sibling in the same witness -- a mint that refused everything would satisfy the refusal half of each pair, and that is exactly the gap that let SPATIAL-2 ship a wall which did not exist. Two controls earned their keep by failing first. The orientation control asserts a DERIVED z-image rather than that construction succeeded, and caught a sign inversion that made the identity rotation left-handed. The self-intersection control is a figure-eight whose eight edges are all axis-aligned, all adjacent pairs perpendicular, and no vertex repeated -- so nothing local to an edge distinguishes it, which is why the pairwise non-adjacent edge test exists rather than a repeated-vertex check standing in for it. Boundary convention, asserted rather than commented: touching faces are adjacent, not overlapping. Two rooms sharing a wall plane must not report as a collision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
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.
Auto-opened by session-dashboard for session
deep-fox-168.Pushing to
spatial-3a-orthogonal-geometry-v2advances this PR.Worker attestation
Before flipping this PR to ready for review, confirm each item:
npm test,cargo test) and the result.Closes #Ndirective.Summary
TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.
Test plan