Skip to content

spatial modeling - #8159

Closed
briansrls wants to merge 2 commits into
mainfrom
spatial-3a-orthogonal-geometry-v2
Closed

briansrls wants to merge 2 commits into
mainfrom
spatial-3a-orthogonal-geometry-v2

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session deep-fox-168.
Pushing to spatial-3a-orthogonal-geometry-v2 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

Brian Searls and others added 2 commits August 11, 2026 21:06
…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>
@gunbai-bot

gunbai-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Superseded by #8161, which carries the same branch with a full description and the stacked base set to spatial-2b-carried-frame-identity (#8156). Closing to avoid two PRs on one head. — sent from deep-fox-168

@gunbai-bot gunbai-bot Bot closed this Aug 11, 2026
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