Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Add side-hole BRep boundary trace contract
Yuechen Li6a2c27863f68
diff --git a/Aetheris.CLI.Tests/AirTraceCommandTests.cs b/Aetheris.CLI.Tests/AirTraceCommandTests.csindex 184b392a..a7b319ee 100644--- a/Aetheris.CLI.Tests/AirTraceCommandTests.cs+++ b/Aetheris.CLI.Tests/AirTraceCommandTests.cs@@ -305,7 +305,7 @@ public sealed class AirTraceCommandTests}[Fact]- public void TraceSideHoleRegion_YieldContract_DefaultText()+ public void TraceSideHoleRegion_BRepBoundary_DefaultText(){var (exitCode, output, error) = Run("trace", "--fixture", RegionFixture("valid/side-hole-face-attached-region.valid.firmfixture"));Assert.Equal(0, exitCode); Assert.True(string.IsNullOrWhiteSpace(error));@@ -318,17 +318,23 @@ public sealed class AirTraceCommandTestsAssert.Contains("Parent field: Box", output); Assert.Contains("Subtract field: Cylinder", output);Assert.Contains("no topology authority", output); Assert.Contains("no face identity", output);Assert.Contains("no Boolean", output); Assert.Contains("no BRep emission", output);++ Assert.Contains("Region BRepPlan boundary", output); Assert.Contains("PlannedContractOnly", output);+ Assert.Contains("Affected face: +X", output); Assert.Contains("circular entry loop intent", output);+ Assert.Contains("opposite-side exit deferred", output); Assert.Contains("cylindrical cut wall intent deferred", output);+ Assert.Contains("CutEntryLoop", output); Assert.Contains("CutWallFace", output);+ Assert.Contains("no parent topology mutation", output); Assert.Contains("no BRepPlan elements materialized", output);}[Fact]- public void TraceSideHoleRegion_YieldContract_Json()+ public void TraceSideHoleRegion_BRepBoundary_Json(){var (exitCode, output, _) = Run("trace", "--fixture", RegionFixture("valid/side-hole-face-attached-region.valid.firmfixture"), "--json");Assert.Equal(0, exitCode);using var doc = JsonDocument.Parse(output); var root = doc.RootElement;Assert.Equal("valid", root.GetProperty("fixture").GetProperty("expectation").GetString());Assert.True(root.GetProperty("fixture").GetProperty("expectationSatisfied").GetBoolean());- Assert.Equal("region-cir-mirror", root.GetProperty("actualStageReached").GetString());+ Assert.Equal("region-brep-boundary", root.GetProperty("actualStageReached").GetString());var regions = root.GetProperty("regions");Assert.Equal(2, regions.GetProperty("regionCount").GetInt32());Assert.True(regions.GetProperty("hasNestedRegions").GetBoolean());@@ -364,6 +370,25 @@ public sealed class AirTraceCommandTestsvar losses = mirror.GetProperty("knownLosses").EnumerateArray().Select(x => x.GetString()).ToArray();Assert.Contains("no-topology-authority", losses); Assert.Contains("no-face-identity", losses);Assert.Contains("no-brep-plan-role-parity", losses); Assert.Contains("no-step-export-authority", losses);++ var brepBoundary = side.GetProperty("brepBoundary");+ Assert.Equal("PlannedContractOnly", brepBoundary.GetProperty("status").GetString());+ Assert.Equal("+X", brepBoundary.GetProperty("affectedParent").GetProperty("affectedFaceSelector").GetString());+ Assert.Equal("ParentBodyLocalFeature", brepBoundary.GetProperty("affectedParent").GetProperty("affectedScope").GetString());+ Assert.Equal("CircularEntry", brepBoundary.GetProperty("entryBoundary").GetProperty("boundaryKind").GetString());+ Assert.Equal("CircularEntryLoop", brepBoundary.GetProperty("entryBoundary").GetProperty("loopIntent").GetString());+ Assert.Equal("OppositeSideExit", brepBoundary.GetProperty("exitBoundary").GetProperty("exitKind").GetString());+ Assert.Equal("Deferred", brepBoundary.GetProperty("exitBoundary").GetProperty("status").GetString());+ Assert.Equal("CylindricalCutWallIntent", brepBoundary.GetProperty("cutWallIntent").GetProperty("wallKind").GetString());+ Assert.Equal("Deferred", brepBoundary.GetProperty("cutWallIntent").GetProperty("status").GetString());+ var plannedRoles = brepBoundary.GetProperty("plannedRoles").EnumerateArray().Select(x => x.GetString()).ToArray();+ Assert.Contains("CutEntryLoop", plannedRoles); Assert.Contains("CutWallFace", plannedRoles);+ var boundaryLosses = brepBoundary.GetProperty("knownLosses").EnumerateArray().Select(x => x.GetString()).ToArray();+ Assert.Contains("no-emitted-entry-loop-identity", boundaryLosses);+ Assert.Contains("no-emitted-exit-loop-identity", boundaryLosses);+ Assert.Contains("no-emitted-cut-wall-face-identity", boundaryLosses);+ Assert.Contains("no-brep-plan-element-materialization", boundaryLosses);+ Assert.Equal("Deferred", brepBoundary.GetProperty("integrationStatus").GetString());Assert.False(root.GetProperty("emission").GetProperty("succeeded").GetBoolean());Assert.False(root.GetProperty("stepSmoke").GetProperty("succeeded").GetBoolean());Assert.Equal("none", root.GetProperty("brepPlan").GetProperty("planKind").GetString());@@ -384,10 +409,12 @@ public sealed class AirTraceCommandTestsAssert.Contains("air-region-x2-missing-explicit-yield-rejected", diagnostics);Assert.Contains("air-region-x2-boundary-contract-required", diagnostics);Assert.False(root.GetProperty("emission").GetProperty("succeeded").GetBoolean());+ var side = root.GetProperty("regions").GetProperty("regions").EnumerateArray().Single(r => r.GetProperty("regionKind").GetString() == "FaceAttachedRegion");+ Assert.False(side.TryGetProperty("brepBoundary", out _));}[Fact]- public void RegionCirMirrorSummaries_AreDeterministic()+ public void RegionBRepBoundarySummaries_AreDeterministic(){var valid = RegionFixture("valid/side-hole-face-attached-region.valid.firmfixture");var invalid = RegionFixture("invalid/implicit-parent-mutation.invalid.firmfixture");@@ -430,6 +457,7 @@ public sealed class AirTraceCommandTestsvar regions = root.GetProperty("regions");Assert.Equal(1, regions.GetProperty("regionCount").GetInt32());Assert.DoesNotContain("SideHole", output, StringComparison.Ordinal);+ Assert.DoesNotContain("brepBoundary", output, StringComparison.Ordinal);}[Fact]diff --git a/Aetheris.CLI/AirTrace.cs b/Aetheris.CLI/AirTrace.csindex 92be15d6..c441c465 100644--- a/Aetheris.CLI/AirTrace.cs+++ b/Aetheris.CLI/AirTrace.cs@@ -192,11 +192,11 @@ internal static class AirTraceReportBuilderprivate static AirTraceReport BuildSideHoleFaceAttachedRegionFixture(FirmFixture fixture){var regions = AirRegionTraceFactory.ForFaceAttachedSideHoleDeferred();- var actualStage = "region-cir-mirror";+ var actualStage = "region-brep-boundary";var expectationSatisfied = fixture.Expectation == "valid" && (string.IsNullOrWhiteSpace(fixture.ExpectedStage) || fixture.ExpectedStage == actualStage);- var fxDiagnostics = Stable([.. fixture.Diagnostics, .. regions.Diagnostics, "air-region-x1-firmfixture-case-mapped", expectationSatisfied ? "air-region-x1-expectation-satisfied" : "air-region-x1-expectation-not-satisfied"]).ToArray();- return new("AIR-REGION-X3", "trace", "lowering", "firmfixture", fixture.CaseName, expectationSatisfied, "FaceAttachedRegion side-hole yield contract admits a conservative analysis-only CIR mirror summary; parent integration remains deferred and no geometry is emitted.",- new("RegionFixture", "none", "none", "none", "metadata-driven-region-contract", fixture.CaseName, fixture.CaseName, "AIR-REGION-X3"),+ var fxDiagnostics = Stable([.. fixture.Diagnostics, .. regions.Diagnostics, "air-region-x1-firmfixture-case-mapped", "air-region-x4-firmfixture-boundary-contract-created", expectationSatisfied ? "air-region-x1-expectation-satisfied" : "air-region-x1-expectation-not-satisfied"]).ToArray();+ return new("AIR-REGION-X4", "trace", "lowering", "firmfixture", fixture.CaseName, expectationSatisfied, "FaceAttachedRegion side-hole reports a trace-only BRepPlan boundary contract; parent integration remains deferred and no topology or geometry is emitted.",+ new("RegionFixture", "none", "none", "none", "metadata-driven-region-contract", fixture.CaseName, fixture.CaseName, "AIR-REGION-X4"),new("none", null, false, "region integration deferred; no route selection invoked", "none", "none", []),new("none", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "none", "none", null, []),new("none", false, "no geometry emitted for trace-only region fixture"),@@ -335,6 +335,26 @@ internal static class AirTraceTextRendererb.AppendLine(" Guarantees:");foreach (var guarantee in m.Guarantees) b.AppendLine($" - {guarantee}");}++ if (region.BrepBoundary is not null)+ {+ var bb = region.BrepBoundary;+ b.AppendLine(" Region BRepPlan boundary");+ b.AppendLine($" Region: {bb.SourceRegionId}");+ b.AppendLine($" Feature: {bb.FeatureKind}");+ b.AppendLine($" Status: {bb.Status}");+ b.AppendLine($" Affected parent: {bb.AffectedParent.ParentBody}");+ b.AppendLine($" Affected face: {bb.AffectedParent.AffectedFaceSelector}");+ b.AppendLine(" Entry boundary: circular entry loop intent");+ b.AppendLine(" Exit boundary: opposite-side exit deferred");+ b.AppendLine(" Cut wall: cylindrical cut wall intent deferred");+ b.AppendLine($" Planned roles: {string.Join(", ", bb.PlannedRoles)}");+ b.AppendLine($" Integration: {bb.IntegrationStatus}");+ b.AppendLine(" Known losses:");+ foreach (var loss in bb.KnownLosses) b.AppendLine($" - {loss.Replace('-', ' ')}");+ b.AppendLine(" Guarantees:");+ foreach (var guarantee in bb.Guarantees) b.AppendLine($" - {guarantee}");+ }foreach (var loss in region.KnownLosses) b.AppendLine($" Reason: {loss}");foreach (var guarantee in region.Guarantees) b.AppendLine($" Guarantee: {guarantee}");}diff --git a/Aetheris.Kernel.Core/Air/AirRegions.cs b/Aetheris.Kernel.Core/Air/AirRegions.csindex df083a0f..8f253416 100644--- a/Aetheris.Kernel.Core/Air/AirRegions.cs+++ b/Aetheris.Kernel.Core/Air/AirRegions.cs@@ -8,6 +8,7 @@ internal enum AirLocalFrameKind { WorldRoot, FaceAttached, Unsupported }internal enum AirLocalFrameHandedness { RightHanded, LeftHanded, Unknown }internal enum AirRegionIntegrationStatus { NotRequired, Deferred, Rejected, Admitted, Unsupported }internal enum AirRegionCirMirrorStatus { MirrorAdmittedConservative, MirrorUnavailable, MirrorRejectedLossyForRequest }+internal enum AirRegionBRepBoundaryStatus { PlannedContractOnly, Deferred, Rejected, Unsupported }internal sealed record AirVectorSummary(double X, double Y, double Z);@@ -20,6 +21,11 @@ internal sealed record AirRegionDirectionSummary(string DirectionKind, string Axinternal sealed record AirRegionAffectedScopeSummary(string ScopeKind, bool ParentBodyOnly, string AffectedFaceSelector, bool MayAffectSiblings, bool EscapesOnlyThroughYield, IReadOnlyList<string> Diagnostics);internal sealed record AirRegionBoundaryIntentSummary(string BoundaryKind, string EntryBoundary, string ExitBoundary, string RimIntent, string PatchIntent, IReadOnlyList<string> Diagnostics);internal sealed record AirRegionCirMirrorSummary(string SourceRegionId, AirRegionKind SourceRegionKind, string YieldId, string YieldFeatureKind, string Status, string Backend, AirRegionEffectKind Effect, string ParentField, string SubtractField, IReadOnlyList<string> Capabilities, IReadOnlyList<string> KnownLosses, IReadOnlyList<string> Diagnostics, IReadOnlyList<string> Guarantees);+internal sealed record AirRegionBRepBoundarySummary(string SourceRegionId, AirRegionKind SourceRegionKind, string YieldId, string FeatureKind, AirRegionBRepBoundaryStatus Status, AirRegionAffectedParentSummary AffectedParent, AirRegionEntryBoundarySummary EntryBoundary, AirRegionExitBoundarySummary ExitBoundary, AirRegionCutWallIntentSummary CutWallIntent, string PatchIntent, IReadOnlyList<string> PlannedRoles, IReadOnlyList<string> DeferredElements, AirRegionIntegrationStatus IntegrationStatus, IReadOnlyList<string> Diagnostics, IReadOnlyList<string> KnownLosses, IReadOnlyList<string> Guarantees);+internal sealed record AirRegionAffectedParentSummary(string ParentRegionId, string ParentBody, string AffectedFaceSelector, string AffectedFaceRole, string AffectedScope, string Locality);+internal sealed record AirRegionEntryBoundarySummary(string BoundaryKind, string ProfileKind, string ProfileSource, string LocalFrameId, string LoopIntent, string Role);+internal sealed record AirRegionExitBoundarySummary(string BoundaryKind, string ExitKind, string Role, string Status, IReadOnlyList<string> Diagnostics);+internal sealed record AirRegionCutWallIntentSummary(string WallKind, string SourceProfile, string Direction, string Role, string Status);internal sealed record AirRegionCirMirrorRequest(AirRegionSummary Region, AirRegionYieldSummary Yield, IReadOnlyList<string> RequestedCapabilities);internal sealed record AirRegionCirMirrorResult(bool Succeeded, AirRegionCirMirrorSummary Summary);@@ -99,7 +105,9 @@ internal sealed record AirRegionSummary(IReadOnlyList<string> KnownLosses,IReadOnlyList<string> Guarantees,AirRegionYieldSummary? Yield = null,- AirRegionCirMirrorSummary? CirMirror = null);+ AirRegionCirMirrorSummary? CirMirror = null,+ [property: System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull)]+ AirRegionBRepBoundarySummary? BrepBoundary = null);internal sealed record AirRegionTraceSummary(IReadOnlyList<AirRegionSummary> Regions,@@ -137,16 +145,18 @@ internal static class AirRegionTraceFactory["escapes only through explicit yield", "no implicit parent mutation", "no Boolean", "no BRep emission", "no production route replacement", "trace-only"],SideHoleYield(root.RegionId));var mirror = AirSideHoleRegionCirMirrorAdapter.Admit(sideBase);+ var boundary = SideHoleBRepBoundary(sideBase);var side = sideBase with{- StageReached = "region-cir-mirror",- Provenance = "AIR-REGION-X3 metadata-driven fixture",- Diagnostics = Stable([.. sideBase.Diagnostics.Where(d => d != "air-region-x2-no-cir-mirror"), .. mirror.Summary.Diagnostics]).ToArray(),- KnownLosses = Stable([.. sideBase.KnownLosses, .. mirror.Summary.KnownLosses]).ToArray(),- Guarantees = Stable([.. sideBase.Guarantees, .. mirror.Summary.Guarantees]).ToArray(),- CirMirror = mirror.Summary+ StageReached = "region-brep-boundary",+ Provenance = "AIR-REGION-X4 metadata-driven fixture",+ Diagnostics = Stable([.. sideBase.Diagnostics.Where(d => d != "air-region-x2-no-cir-mirror"), .. mirror.Summary.Diagnostics, .. boundary.Diagnostics]).ToArray(),+ KnownLosses = Stable([.. sideBase.KnownLosses, .. mirror.Summary.KnownLosses, .. boundary.KnownLosses]).ToArray(),+ Guarantees = Stable([.. sideBase.Guarantees, .. mirror.Summary.Guarantees, .. boundary.Guarantees]).ToArray(),+ CirMirror = mirror.Summary,+ BrepBoundary = boundary};- return Summary([root, side], ["air-region-x1-region-trace-created", "air-region-x1-no-implicit-parent-mutation", "air-region-x1-no-boolean", "air-region-x1-no-brep-emission", "air-region-x1-no-production-route-replacement", "air-region-x1-trace-only", "air-region-x2-yield-contract-created", "air-region-x2-side-hole-yield-created", "air-region-x2-region-locality-enforced", "air-region-x2-explicit-yield-only", "air-region-x2-parent-integration-deferred", "air-region-x2-no-boolean", "air-region-x2-no-brep-emission", "air-region-x2-no-step-smoke", "air-region-x2-trace-only", .. side.CirMirror!.Diagnostics], ["escapes only through explicit yield", "no Boolean", "no geometry", "no BRep emission", "no STEP smoke", "no production route replacement", .. side.CirMirror.Guarantees]);+ return Summary([root, side], ["air-region-x1-region-trace-created", "air-region-x1-no-implicit-parent-mutation", "air-region-x1-no-boolean", "air-region-x1-no-brep-emission", "air-region-x1-no-production-route-replacement", "air-region-x1-trace-only", "air-region-x2-yield-contract-created", "air-region-x2-side-hole-yield-created", "air-region-x2-region-locality-enforced", "air-region-x2-explicit-yield-only", "air-region-x2-parent-integration-deferred", "air-region-x2-no-boolean", "air-region-x2-no-brep-emission", "air-region-x2-no-step-smoke", "air-region-x2-trace-only", .. side.CirMirror!.Diagnostics, .. side.BrepBoundary!.Diagnostics], ["escapes only through explicit yield", "no Boolean", "no geometry", "no BRep emission", "no STEP smoke", "no production route replacement", .. side.CirMirror.Guarantees, .. side.BrepBoundary.Guarantees]);}public static AirRegionTraceSummary ForImplicitParentMutationRejected()@@ -168,6 +178,29 @@ internal static class AirRegionTraceFactory["concrete through depth deferred", "opposite-side exit boundary deferred", "side-hole geometry integration not implemented"],["escapes only through explicit yield", "parent body local feature scope", "no implicit parent mutation", "no Boolean", "no BRep emission"]);+ private static AirRegionBRepBoundarySummary SideHoleBRepBoundary(AirRegionSummary region)+ {+ if (region.Yield is null) throw new ArgumentException("Side-hole region must carry a yield summary.", nameof(region));+ var y = region.Yield;+ return new(+ region.RegionId,+ region.RegionKind,+ y.YieldId,+ y.FeatureKind,+ AirRegionBRepBoundaryStatus.PlannedContractOnly,+ new(y.ParentRegionId, "root box", y.Attachment.FaceSelector, y.Attachment.FaceRole, y.AffectedScope.ScopeKind, "parent body local; no sibling effects"),+ new("CircularEntry", y.Profile.ProfileKind, "side-hole yield profile", y.LocalFrameId, "CircularEntryLoop", "EntryLoopIntent"),+ new("ThroughExit", "OppositeSideExit", "ExitLoopIntent", "Deferred", ["air-region-x4-exit-boundary-deferred"]),+ new("CylindricalCutWallIntent", y.Profile.ProfileKind, "through/inward", "CutWallIntent", "Deferred"),+ "Deferred",+ ["AffectedParentFace", "CutBoundaryPatch", "CutEntryLoop", "CutExitLoop", "CutWallFace", "DeferredIntegration", "RegionIntegrationPatch", "SideHoleFeature"],+ ["entry-loop-identity", "exit-loop-identity", "cut-wall-face-identity", "boundary-patch-identity", "parent-topology-mutation", "brep-plan-element-materialization", "boolean-invocation", "brep-emission", "step-smoke"],+ AirRegionIntegrationStatus.Deferred,+ Stable(["air-region-x4-brep-boundary-request-created", "air-region-x4-side-hole-brep-boundary-created", "air-region-x4-affected-parent-recorded", "air-region-x4-affected-face-recorded", "air-region-x4-entry-boundary-intent-recorded", "air-region-x4-exit-boundary-deferred", "air-region-x4-cut-wall-intent-recorded", "air-region-x4-planned-boundary-roles-recorded", "air-region-x4-region-topology-contract-created", "air-region-x4-no-brep-plan-elements-materialized", "air-region-x4-no-parent-topology-mutation", "air-region-x4-parent-integration-deferred", "air-region-x4-no-boolean", "air-region-x4-no-brep-emission", "air-region-x4-no-step-smoke", "air-region-x4-no-cir-authority-for-topology", "air-region-x4-entry-loop-identity-not-materialized", "air-region-x4-exit-loop-identity-not-materialized", "air-region-x4-cut-wall-face-identity-not-materialized", "air-region-x4-boundary-patch-identity-not-materialized"]).ToArray(),+ ["no-emitted-entry-loop-identity", "no-emitted-exit-loop-identity", "no-emitted-cut-wall-face-identity", "no-emitted-boundary-patch-identity", "no-parent-topology-mutation", "no-brep-plan-element-materialization", "integration-deferred", "boolean-not-invoked"],+ ["no parent topology mutation", "no BRepPlan elements materialized", "no Boolean", "no BRep emission", "no STEP smoke", "CIR topology authority remains denied"]);+ }+private static AirRegionSummary RootRegion(string stageReached) => new("region:root", AirRegionKind.RootRegion, null, AirRegionEffectKind.PureConstruction, AirRegionYieldKind.YieldBody, AirRegionBoundaryContractKind.YieldsBody, new AirLocalFrameSummary("frame:world-root", AirLocalFrameKind.WorldRoot, new(0, 0, 0), new(1, 0, 0), new(0, 1, 0), new(0, 0, 1), AirLocalFrameHandedness.RightHanded, null, null, null, true, ["air-region-x1-world-root-frame-created"]), AirRegionIntegrationStatus.NotRequired, "root-body", stageReached, "AIR-REGION-X1", ["air-region-x1-root-region-created"], [], ["root region is a trace-only summary"]);private static AirRegionTraceSummary Summary(IReadOnlyList<AirRegionSummary> regions, IReadOnlyList<string> diagnostics, IReadOnlyList<string> guarantees) => new(regions, "region:root", regions.Count, regions.Any(r => r.ParentRegionId is not null), diagnostics.Order(StringComparer.Ordinal).ToArray(), guarantees.Order(StringComparer.Ordinal).ToArray());private static IEnumerable<string> Stable(IEnumerable<string> values) => values.Distinct(StringComparer.Ordinal).OrderBy(x => x, StringComparer.Ordinal);diff --git a/docs/air-a0-aetheris-v2-compiler-ir-constitution.md b/docs/air-a0-aetheris-v2-compiler-ir-constitution.mdindex 3d844838..3483d62c 100644--- a/docs/air-a0-aetheris-v2-compiler-ir-constitution.md+++ b/docs/air-a0-aetheris-v2-compiler-ir-constitution.md@@ -797,3 +797,7 @@ AIR-REGION-X2 reinforces that AIR Region yields carry construction intent across## AIR-REGION-X3 constitutional noteThe AIR Region side-hole CIR mirror is a side-channel analysis summary only. It reinforces that CIR evaluation mirrors can describe field behavior while AIR/BRepPlan/BRep/STEP retain their separate authority boundaries.++## AIR-REGION-X4 side-hole BRep boundary contract note++AIR-REGION-X4 treats side-hole BRepPlan boundary information as a trace-only contract, not as topology materialization. The side-hole `FaceAttachedRegion` may report affected parent face intent, entry/exit boundary intent, cut-wall intent, planned role strings, deferred elements, losses, and guarantees while retaining deferred parent integration and denying Boolean, BRepPlan element, BRep, STEP, CIR topology authority, grammar, and route-selection behavior changes.diff --git a/docs/air-a1-air-regions-scoped-feature-lowering-audit.md b/docs/air-a1-air-regions-scoped-feature-lowering-audit.mdindex b828047f..afa262cf 100644--- a/docs/air-a1-air-regions-scoped-feature-lowering-audit.md+++ b/docs/air-a1-air-regions-scoped-feature-lowering-audit.md@@ -637,3 +637,7 @@ AIR-REGION-X2 implements a trace-only side-hole yield boundary contract for the## AIR-REGION-X3 status noteAIR-REGION-X3 demonstrates the A1 doctrine that region effects may be mirrored for analysis without transferring topology authority to CIR. The side-hole region reports an analysis-only parent-box-minus-cylinder mirror summary while BRepPlan, BRep, STEP, Boolean, and production integration remain deferred.++### AIR-REGION-X4 status note++AIR-REGION-X4 adds a trace-only BRepPlan boundary contract for the side-hole `FaceAttachedRegion`. The summary records the affected `+X` parent face, circular entry-loop intent, deferred opposite-side exit intent, deferred cylindrical cut-wall intent, planned semantic role strings, deferred elements, losses, and guarantees. It preserves A1 locality: no parent topology mutation, no BRepPlan materialization, no Boolean, no BRep emission, no STEP smoke, and no production route replacement.diff --git a/docs/air-region-x2-side-hole-yield-boundary-contract.md b/docs/air-region-x2-side-hole-yield-boundary-contract.mdindex 49fa57d2..2e139565 100644--- a/docs/air-region-x2-side-hole-yield-boundary-contract.md+++ b/docs/air-region-x2-side-hole-yield-boundary-contract.md@@ -84,3 +84,7 @@ Recommended: **AIR-REGION-X3 — Region BRepPlan boundary contract for side-hole## AIR-REGION-X3 CIR mirror noteAIR-REGION-X3 preserves the X2 side-hole yield boundary contract and adds a trace-only CIR mirror admission summary for the same `FaceAttachedRegion`. The summary backend is `cir-region-parent-minus-cylinder`, records parent `Box` and subtract `Cylinder` fields, remains analysis-only, and keeps parent integration deferred with no Boolean, no BRep emission, no BRepPlan integration, and no STEP authority.++## AIR-REGION-X4 boundary-contract note++AIR-REGION-X4 builds on the X2 yield contract by adding a trace-only BRepPlan boundary contract summary under the side-hole `FaceAttachedRegion`. The summary reuses X2 attachment/profile/direction/scope facts and records future topology-planning roles as strings while keeping parent integration deferred and denying emitted entry loop, exit loop, cut-wall face, boundary patch, BRepPlan element, BRep, Boolean, and STEP identities.diff --git a/docs/air-region-x3-side-hole-cir-mirror-analysis.md b/docs/air-region-x3-side-hole-cir-mirror-analysis.mdindex 7d59d24f..307f4f1d 100644--- a/docs/air-region-x3-side-hole-cir-mirror-analysis.md+++ b/docs/air-region-x3-side-hole-cir-mirror-analysis.md@@ -72,3 +72,7 @@ Validation used the focused CLI trace commands and filtered test commands record## Recommended next milestoneRecommended next milestone: **AIR-REGION-X4 — Region-to-CIR occupancy sample artifact**. X3 found the mirror summary boundary clean, so the next narrow step is to add an explicit trace/test-only sample artifact without changing production analyzer behavior or claiming topology authority.++## AIR-REGION-X4 boundary-contract note++AIR-REGION-X4 preserves the X3 CIR mirror as analysis-only and adds a separate `brepBoundary` trace summary for side-hole topology-side intent. The BRep boundary summary records affected `+X` parent face intent, circular entry-loop intent, deferred opposite-side exit intent, deferred cylindrical cut-wall intent, planned semantic role strings, losses, and guarantees. It does not grant CIR topology authority and does not materialize BRepPlan, BRep, Boolean, or STEP output.diff --git a/docs/air-region-x4-side-hole-brep-boundary-contract.md b/docs/air-region-x4-side-hole-brep-boundary-contract.mdnew file mode 100644index 00000000..9294bec5--- /dev/null+++ b/docs/air-region-x4-side-hole-brep-boundary-contract.md@@ -0,0 +1,98 @@+# AIR-REGION-X4 — Side-hole BRepPlan boundary contract++## Purpose and scope++AIR-REGION-X4 adds a trace-only topology-side boundary contract for the metadata-driven side-hole `FaceAttachedRegion` fixture at `fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture`.++The contract records what a future BRepPlan integration would need to know without performing that integration. It does not implement side-hole geometry, invoke Boolean, emit BRep, emit STEP, mutate parent topology, or materialize BRepPlan elements.++## Relationship to prior doctrine++- AIR-A1 defines regions as scoped construction islands whose effects escape through explicit yields.+- AIR-REGION-X1 introduced trace-only `RootRegion` and `FaceAttachedRegion` summaries.+- AIR-REGION-X2 made the side-hole yield contract explicit: +X attachment, circular profile, through/inward subtractive effect, through-cut boundary intent, parent-body-local scope, and deferred integration.+- AIR-REGION-X3 added an analysis-only CIR mirror and denied topology authority.+- AIR-X3/AIR-X4 define BRepPlan as a backend topology emission plan that can preserve semantic roles before materialization.++X4 bridges those doctrines by adding region-local BRepPlan boundary intent while preserving deferred integration.++## Why boundary contracts matter++A side-hole region should not force future lowering to rediscover feature topology from raw geometry or immediately choose Boolean. The boundary contract carries the affected parent face, intended entry and exit boundaries, cut-wall intent, planned roles, and explicit losses so a future integration route can be selected with provenance intact.++## Boundary contract fields++The side-hole region now reports `brepBoundary` in JSON and a `Region BRepPlan boundary` block in text.++- `affectedParent`: root box, parent region `region:root`, affected face selector `+X`, face role `SideFace`, scope `ParentBodyLocalFeature`, parent-body locality with no sibling effects.+- `entryBoundary`: `CircularEntry` sourced from the side-hole circular yield profile in `frame:side-hole:+x`, with `CircularEntryLoop` / `EntryLoopIntent` intent.+- `exitBoundary`: through-cut opposite-side exit intent, status `Deferred`, not materialized.+- `cutWallIntent`: cylindrical cut-wall intent from the circular profile in the through/inward direction, status `Deferred`.+- `patchIntent`: `Deferred`.+- `plannedRoles`: semantic role strings, not global BRepPlan enum additions: `AffectedParentFace`, `CutBoundaryPatch`, `CutEntryLoop`, `CutExitLoop`, `CutWallFace`, `DeferredIntegration`, `RegionIntegrationPatch`, and `SideHoleFeature`.+- `deferredElements`: entry loop identity, exit loop identity, cut wall face identity, boundary patch identity, parent topology mutation, BRepPlan element materialization, Boolean invocation, BRep emission, and STEP smoke.+- `integrationStatus`: `Deferred`.++## Topology-side locality++The contract is local to the parent body and identifies the affected parent face selector. It is not a parent topology mutation. No BRepPlan patch element, BRep face, loop, coedge, or STEP entity identity is emitted by this milestone.++## Relationship to CIR mirror++The X3 CIR mirror remains analysis-only. It can summarize occupancy/containment/bounds behavior for a parent-box-minus-cylinder interpretation, but it still denies topology authority, face identity, loop identity, boundary patch identity, BRepPlan role parity, STEP/export authority, and production integration authority.++The X4 BRep boundary contract is topology-side intent only. It does not change CIR evaluator or tape behavior.++## Guarantees++For the side-hole fixture, X4 guarantees:++- no parent topology mutation;+- no BRepPlan elements materialized;+- no Boolean;+- no BRep emission;+- no STEP smoke;+- no side-hole geometry implementation;+- no production route replacement;+- no Firmament grammar expansion.++## Trace examples++Text trace includes:++```text+Region BRepPlan boundary+ Region: region:side-hole:+x+ Feature: SideHole+ Status: PlannedContractOnly+ Affected parent: root box+ Affected face: +X+ Entry boundary: circular entry loop intent+ Exit boundary: opposite-side exit deferred+ Cut wall: cylindrical cut wall intent deferred+ Planned roles: AffectedParentFace, CutBoundaryPatch, CutEntryLoop, CutExitLoop, CutWallFace, DeferredIntegration, RegionIntegrationPatch, SideHoleFeature+ Integration: Deferred+```++JSON trace includes stable `regions.regions[].brepBoundary` fields such as `status`, `affectedParent`, `entryBoundary`, `exitBoundary`, `cutWallIntent`, `plannedRoles`, `integrationStatus`, `knownLosses`, and `guarantees`.++## Non-goals++- no side-hole geometry;+- no Boolean;+- no BRepPlan integration or materialization;+- no CIR topology authority;+- no production route replacement;+- no grammar expansion;+- no STEP/export support for side-hole.++## Tests run++- `dotnet build Aetheris.CLI/Aetheris.CLI.csproj -f net10.0`+- `dotnet test Aetheris.CLI.Tests/Aetheris.CLI.Tests.csproj --filter "Trace|Fixture|FirmFixture|Region|AirRegion|RegionYield|RegionCir|RegionBRep|SideHole|ParserBacked|Firmament|FeatureAir|ConstructiveAir|ProfileEmission|ProfileExtrude|AIR|Air|CIR|Cir|Mirror|BRepPlan|BrepPlan|Analyze|Map|CliBaseline|Step|Prismatic|AirChamfer|Experimental|Corpus"`++## Recommended next milestone++Recommended: **AIR-REGION-X5 — Side-hole integration route decision scaffold, no integration**.++X4 now records enough topology-planning intent to evaluate future routes without immediately materializing BRepPlan elements. The next blocker is route decision scaffolding that can compare direct BRepPlan placeholder planning, constructive side-hole insertion, or Boolean fallback as explicit deferred candidates without changing production behavior.diff --git a/docs/air-x4-brep-plan-top-face-loop-chamfer-roles.md b/docs/air-x4-brep-plan-top-face-loop-chamfer-roles.mdindex 396d4395..4ba941de 100644--- a/docs/air-x4-brep-plan-top-face-loop-chamfer-roles.md+++ b/docs/air-x4-brep-plan-top-face-loop-chamfer-roles.md@@ -107,3 +107,7 @@ AIR-X5 adds an internal/test-visible AIR-to-CIR mirror adapter envelope for gene## AIR-X7 fixture noteThe AIR-X7 valid Chamfer corpus includes `fixtures/Firmament/Chamfer/valid/top-face-loop-chamfer.valid.firmfixture`, which traces the Class B top-face boundary-loop uniform chamfer through the existing `TopFaceLoopChamferPrismatic` route and preserves the AIR-X4 BRepPlan chamfer-face role count of four.++## AIR-REGION-X4 contract-only region role note++AIR-REGION-X4 uses planned role strings inside the side-hole region `brepBoundary` trace summary instead of extending global BRepPlan role enums. These strings are future topology-planning intent only and do not materialize BRepPlan elements or claim emitted face/loop identity.diff --git a/docs/air-x6-aetheris-trace-lowering-report-cli.md b/docs/air-x6-aetheris-trace-lowering-report-cli.mdindex ba5e9e6d..b662a1ef 100644--- a/docs/air-x6-aetheris-trace-lowering-report-cli.md+++ b/docs/air-x6-aetheris-trace-lowering-report-cli.md@@ -176,3 +176,7 @@ For the side-hole region fixture, `aetheris trace` now renders a `Region yield`## AIR-REGION-X3 trace note`aetheris trace --fixture fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture` now prints a `Region CIR mirror` section for the side-hole `FaceAttachedRegion`. The JSON region entry includes `cirMirror` with stable status, backend, fields, capabilities, losses, diagnostics, and guarantees.++## AIR-REGION-X4 region BRep boundary trace note++For `fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture`, `aetheris trace` now reports a `Region BRepPlan boundary` text section and a structured `regions.regions[].brepBoundary` JSON object. The summary is contract-only: it records affected parent face, circular entry intent, deferred exit intent, deferred cylindrical cut-wall intent, planned role strings, losses, and guarantees while keeping integration deferred and materializing no topology.diff --git a/fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture b/fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixtureindex 3715e797..b3decdf7 100644--- a/fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture+++ b/fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture@@ -1,6 +1,6 @@// case: side-hole-face-attached-region// expected: valid-// expected-stage: region-cir-mirror+// expected-stage: region-brep-boundary// expected-region-kind: FaceAttachedRegion// expected-effect: Subtractive// expected-yield: YieldSubtractiveVolume@@ -19,6 +19,13 @@// expected-cir-loss: no-face-identity// expected-cir-loss: no-entry-loop-identity// expected-affected-scope: ParentBodyLocalFeature+// expected-brep-boundary: planned-contract-only+// expected-entry-boundary: circular-entry-loop+// expected-exit-boundary: opposite-side-exit-deferred+// expected-cut-wall: cylindrical-cut-wall-intent+// expected-brep-role: CutEntryLoop+// expected-brep-role: CutWallFace+// expected-brep-loss: no-emitted-entry-loop-identity// description: Trace-only face-attached side-hole region fixture; integration deferred.solid box = Box(width: 10, depth: 8, height: 6);