Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Close controlled side-hole shell trace
Yuechen Li34aa5c097de3
diff --git a/Aetheris.CLI.Tests/AirTraceCommandTests.cs b/Aetheris.CLI.Tests/AirTraceCommandTests.csindex 50c64f0a..ff2b814d 100644--- a/Aetheris.CLI.Tests/AirTraceCommandTests.cs+++ b/Aetheris.CLI.Tests/AirTraceCommandTests.cs@@ -326,7 +326,7 @@ public sealed class AirTraceCommandTestsAssert.Contains("no parent topology mutation", output); Assert.Contains("no BRepPlan elements materialized", output);Assert.Contains("Region integration decision", output);Assert.Contains("Selected: ControlledSideHoleParentBRepIntegration", output);- Assert.Contains("Status: PartiallyIntegrated", output);+ Assert.Contains("Status: Integrated", output);Assert.Contains("FaceAttachedConstructiveInsertion: Deferred", output);Assert.Contains("LocalBRepPlanPatch: Deferred", output);Assert.Contains("BRepBooleanFallback: Rejected", output);@@ -342,7 +342,7 @@ public sealed class AirTraceCommandTestsusing 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-shell-closure-blocked", root.GetProperty("actualStageReached").GetString());+ Assert.Equal("region-parent-integrated", root.GetProperty("actualStageReached").GetString());var regions = root.GetProperty("regions");Assert.Equal(2, regions.GetProperty("regionCount").GetInt32());Assert.True(regions.GetProperty("hasNestedRegions").GetBoolean());@@ -399,7 +399,7 @@ public sealed class AirTraceCommandTestsAssert.Equal("Deferred", brepBoundary.GetProperty("integrationStatus").GetString());var decision = side.GetProperty("integrationDecision");Assert.Equal("ControlledSideHoleParentBRepIntegration", decision.GetProperty("selectedRouteKind").GetString());- Assert.Equal("PartiallyIntegrated", decision.GetProperty("selectedStatus").GetString());+ Assert.Equal("Integrated", decision.GetProperty("selectedStatus").GetString());Assert.Equal("SwitchMatch", decision.GetProperty("selectionMode").GetString());var candidates = decision.GetProperty("candidates").EnumerateArray().ToDictionary(c => c.GetProperty("routeKind").GetString()!, c => c);Assert.Equal("Deferred", candidates["FaceAttachedConstructiveInsertion"].GetProperty("status").GetString());@@ -495,7 +495,7 @@ public sealed class AirTraceCommandTestsvar (exitCode, output, error) = Run("trace", "--fixture", RegionFixture("valid/side-hole-face-attached-region.valid.firmfixture"));Assert.Equal(0, exitCode); Assert.True(string.IsNullOrWhiteSpace(error));Assert.Contains("Region parent integration", output);- Assert.Contains("Status: PartiallyIntegrated", output);+ Assert.Contains("Status: Integrated", output);Assert.Contains("Route: ControlledSideHoleParentBRepIntegration", output);Assert.Contains("Placeholder mappings:", output);Assert.Contains("CutEntryLoop: Materialized", output);@@ -504,7 +504,8 @@ public sealed class AirTraceCommandTestsAssert.Contains("Region face split", output);Assert.Contains("Status: SplitCreated", output);Assert.Contains("Entry loop: EntryLoopMaterialized", output);- Assert.Contains("Category: ShellClosure", output);+ Assert.Contains("RegionIntegrationPatch: Consumed", output);+ Assert.Contains("Closed shell: true", output);Assert.Contains("controlled fixture only", output);}@@ -516,12 +517,13 @@ public sealed class AirTraceCommandTestsusing var doc = JsonDocument.Parse(output);var side = doc.RootElement.GetProperty("regions").GetProperty("regions").EnumerateArray().Single(r => r.GetProperty("regionKind").GetString() == "FaceAttachedRegion");var parent = side.GetProperty("parentIntegration");- Assert.Equal("PartiallyIntegrated", parent.GetProperty("status").GetString());+ Assert.Equal("Integrated", parent.GetProperty("status").GetString());Assert.Equal("ControlledSideHoleParentBRepIntegration", parent.GetProperty("route").GetString());Assert.Contains(parent.GetProperty("placeholderMappings").EnumerateArray(), m => m.GetProperty("placeholderRole").GetString() == "CutEntryLoop" && m.GetProperty("materializationStatus").GetString() == "Materialized");Assert.Contains(parent.GetProperty("placeholderMappings").EnumerateArray(), m => m.GetProperty("placeholderRole").GetString() == "CutWallFace" && m.GetProperty("materializationStatus").GetString() == "Materialized");- Assert.Equal("ShellClosure", parent.GetProperty("blocker").GetProperty("category").GetString());- Assert.Equal("controlled-side-hole-shell-closure-blocked", parent.GetProperty("blocker").GetProperty("code").GetString());+ Assert.Equal(JsonValueKind.Null, parent.GetProperty("blocker").ValueKind);+ Assert.True(parent.GetProperty("topologySummary").GetProperty("closed").GetBoolean());+ Assert.Equal("Succeeded", parent.GetProperty("stepSmoke").GetProperty("status").GetString());}[Fact]@@ -571,6 +573,41 @@ public sealed class AirTraceCommandTests}++ [Fact]+ public void TraceSideHoleRegion_ShellClosure_DefaultText()+ {+ var (exitCode, output, error) = Run("trace", "--fixture", RegionFixture("valid/side-hole-face-attached-region.valid.firmfixture"));+ Assert.Equal(0, exitCode);+ Assert.Equal(string.Empty, error);+ Assert.Contains("Region shell closure", output);+ Assert.Contains("Shell closure: Closed", output);+ Assert.Contains("Parent integration: Integrated", output);+ Assert.Contains("RegionIntegrationPatch: Consumed", output);+ Assert.Contains("Entry loop: materialized", output);+ Assert.Contains("Exit loop: materialized", output);+ Assert.Contains("Cut wall: materialized", output);+ Assert.Contains("Closed shell: true", output);+ Assert.Contains("STEP smoke: succeeded", output);+ }++ [Fact]+ public void TraceSideHoleRegion_ShellClosure_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 side = doc.RootElement.GetProperty("regions").GetProperty("regions").EnumerateArray().Single(r => r.GetProperty("regionKind").GetString() == "FaceAttachedRegion");+ Assert.Equal("region-parent-integrated", side.GetProperty("stageReached").GetString());+ Assert.Equal("Integrated", side.GetProperty("parentIntegration").GetProperty("status").GetString());+ var shell = side.GetProperty("shellClosure");+ Assert.Equal("Closed", shell.GetProperty("status").GetString());+ Assert.True(shell.GetProperty("closed").GetBoolean());+ Assert.Equal("Consumed", shell.GetProperty("regionIntegrationPatchStatus").GetString());+ Assert.Equal(JsonValueKind.Null, shell.GetProperty("blocker").ValueKind);+ Assert.Contains(side.GetProperty("parentIntegration").GetProperty("placeholderMappings").EnumerateArray(), m => m.GetProperty("placeholderRole").GetString() == "RegionIntegrationPatch" && m.GetProperty("materializationStatus").GetString() == "Materialized");+ }+[Fact]public void TraceSideHoleRegion_CutWall_DefaultText(){@@ -583,8 +620,9 @@ public sealed class AirTraceCommandTestsAssert.Contains("Entry loop: materialized", output);Assert.Contains("Exit loop: materialized", output);Assert.Contains("Placeholder consumed: CutWallFace", output);- Assert.Contains("Shell closure: Blocked", output);- Assert.Contains("Category: ShellClosure", output);+ Assert.Contains("Shell closure: Closed", output);+ Assert.Contains("RegionIntegrationPatch: Consumed", output);+ Assert.Contains("Closed shell: true", output);}[Fact]@@ -600,9 +638,10 @@ public sealed class AirTraceCommandTestsAssert.Contains("region:side-hole:+x:cut-wall", cutWall.GetProperty("materializedPlaceholderIds").EnumerateArray().Select(x => x.GetString()));Assert.Equal(JsonValueKind.Null, cutWall.GetProperty("blocker").ValueKind);var shell = side.GetProperty("shellClosure");- Assert.Equal("Blocked", shell.GetProperty("status").GetString());- Assert.False(shell.GetProperty("closed").GetBoolean());- Assert.Equal("ShellClosure", shell.GetProperty("blocker").GetProperty("category").GetString());+ Assert.Equal("Closed", shell.GetProperty("status").GetString());+ Assert.True(shell.GetProperty("closed").GetBoolean());+ Assert.Equal("Consumed", shell.GetProperty("regionIntegrationPatchStatus").GetString());+ Assert.Equal(JsonValueKind.Null, shell.GetProperty("blocker").ValueKind);}[Fact]@@ -642,20 +681,20 @@ public sealed class AirTraceCommandTestsusing var doc = JsonDocument.Parse(output);var side = doc.RootElement.GetProperty("regions").GetProperty("regions").EnumerateArray().Single(r => r.GetProperty("regionKind").GetString() == "FaceAttachedRegion");Assert.Equal("SplitCreated", side.GetProperty("faceSplit").GetProperty("faceSplitStatus").GetString());- Assert.Equal("ShellClosure", side.GetProperty("parentIntegration").GetProperty("blocker").GetProperty("category").GetString());+ Assert.Equal(JsonValueKind.Null, side.GetProperty("parentIntegration").GetProperty("blocker").ValueKind);Assert.DoesNotContain("controlled-side-hole-parent-face-splitting-missing", output, StringComparison.Ordinal);}[Fact]- public void TraceSideHoleRegion_FaceSplit_DoesNotClaimFullIntegrationPrematurely()+ public void TraceSideHoleRegion_FaceSplit_ReportsClosedIntegration(){var output = Run("trace", "--fixture", RegionFixture("valid/side-hole-face-attached-region.valid.firmfixture"), "--json").Stdout;using var doc = JsonDocument.Parse(output);var side = doc.RootElement.GetProperty("regions").GetProperty("regions").EnumerateArray().Single(r => r.GetProperty("regionKind").GetString() == "FaceAttachedRegion");var parent = side.GetProperty("parentIntegration");- Assert.Equal("PartiallyIntegrated", parent.GetProperty("status").GetString());- Assert.Equal("ShellClosure", parent.GetProperty("blocker").GetProperty("category").GetString());- Assert.Equal("Unavailable", parent.GetProperty("stepSmoke").GetProperty("status").GetString());+ Assert.Equal("Integrated", parent.GetProperty("status").GetString());+ Assert.Equal(JsonValueKind.Null, parent.GetProperty("blocker").ValueKind);+ Assert.Equal("Succeeded", parent.GetProperty("stepSmoke").GetProperty("status").GetString());}[Fact]@@ -711,7 +750,7 @@ public sealed class AirTraceCommandTestsusing var doc = JsonDocument.Parse(output);var side = doc.RootElement.GetProperty("regions").GetProperty("regions").EnumerateArray().Single(r => r.GetProperty("regionKind").GetString() == "FaceAttachedRegion");Assert.Equal("ExitLoopMaterialized", side.GetProperty("exitLoop").GetProperty("exitLoopStatus").GetString());- Assert.Equal("ShellClosure", side.GetProperty("parentIntegration").GetProperty("blocker").GetProperty("category").GetString());+ Assert.Equal(JsonValueKind.Null, side.GetProperty("parentIntegration").GetProperty("blocker").ValueKind);Assert.DoesNotContain("controlled-side-hole-exit-loop-insertion-deferred", output, StringComparison.Ordinal);}@@ -727,16 +766,16 @@ public sealed class AirTraceCommandTests}[Fact]- public void TraceSideHoleRegion_DoesNotClaimFullIntegrationPrematurely()+ public void TraceSideHoleRegion_ReportsClosedIntegration(){var output = Run("trace", "--fixture", RegionFixture("valid/side-hole-face-attached-region.valid.firmfixture"), "--json").Stdout;using var doc = JsonDocument.Parse(output);var side = doc.RootElement.GetProperty("regions").GetProperty("regions").EnumerateArray().Single(r => r.GetProperty("regionKind").GetString() == "FaceAttachedRegion");var parent = side.GetProperty("parentIntegration");- Assert.Equal("PartiallyIntegrated", parent.GetProperty("status").GetString());- Assert.Equal("ShellClosure", parent.GetProperty("blocker").GetProperty("category").GetString());- Assert.Equal("Unavailable", parent.GetProperty("stepSmoke").GetProperty("status").GetString());- Assert.False(parent.GetProperty("topologySummary").GetProperty("closed").GetBoolean());+ Assert.Equal("Integrated", parent.GetProperty("status").GetString());+ Assert.Equal(JsonValueKind.Null, parent.GetProperty("blocker").ValueKind);+ Assert.Equal("Succeeded", parent.GetProperty("stepSmoke").GetProperty("status").GetString());+ Assert.True(parent.GetProperty("topologySummary").GetProperty("closed").GetBoolean());}[Fact]diff --git a/Aetheris.CLI/AirTrace.cs b/Aetheris.CLI/AirTrace.csindex b4cd6442..24f8fb24 100644--- a/Aetheris.CLI/AirTrace.cs+++ b/Aetheris.CLI/AirTrace.cs@@ -192,18 +192,18 @@ internal static class AirTraceReportBuilderprivate static AirTraceReport BuildSideHoleFaceAttachedRegionFixture(FirmFixture fixture){var regions = AirRegionTraceFactory.ForFaceAttachedSideHoleDeferred();- var actualStage = "region-shell-closure-blocked";+ var actualStage = "region-parent-integrated";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", "air-region-x4-firmfixture-boundary-contract-created", "air-region-x5-firmfixture-integration-decision-created", "air-region-x6-firmfixture-brep-placeholders-created", "air-region-x7-firmfixture-materialization-created", expectationSatisfied ? "air-region-x1-expectation-satisfied" : "air-region-x1-expectation-not-satisfied"]).ToArray();- return new("AIR-REGION-X11", "trace", "lowering", "firmfixture", fixture.CaseName, expectationSatisfied, "FaceAttachedRegion side-hole preserves +X entry-loop and -X exit-loop evidence, attaches controlled cylindrical cut-wall evidence, and stops truthfully at shell closure.",+ return new("AIR-REGION-X12", "trace", "lowering", "firmfixture", fixture.CaseName, expectationSatisfied, "FaceAttachedRegion side-hole preserves the X9/X10/X11 evidence chain and consumes the controlled RegionIntegrationPatch into closed parent shell evidence.",new("RegionFixture", "ControlledSideHoleParentBRepIntegration", "none", "none", "metadata-driven-region-contract", fixture.CaseName, fixture.CaseName, "AIR-REGION-X11"),- new("SwitchMatch", "ControlledSideHoleParentBRepIntegration", false, "controlled +X entry loop and -X exit loop evidence created; parent integration remains partial", "FaceAttachedRegion", "SideHole", []),+ new("SwitchMatch", "ControlledSideHoleParentBRepIntegration", true, "controlled +X entry loop, -X exit loop, cylindrical cut wall, and RegionIntegrationPatch consumed into closed parent shell evidence", "FaceAttachedRegion", "SideHole", []),new("none", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "none", "none", null, []),- new("ControlledSideHoleParentBRepIntegration", true, "standalone side-hole patch evidence preserved; controlled +X entry and -X exit face split evidence created; parent integration partial"),+ new("ControlledSideHoleParentBRepIntegration", true, "standalone side-hole patch evidence preserved; controlled +X entry and -X exit face split evidence created; controlled parent shell closure evidence integrated"),new(false, false, false, false, []),new("not-requested", "none", "none", "RegionFixture", "none", "none", "none", [], [], [], []),[], ["parent BRep integration not implemented", "CIR evaluator composition deferred"], fxDiagnostics,- [.. regions.Guarantees, "metadata-driven region fixture", "controlled standalone patch materialized", "controlled +X face split evidence", "controlled -X exit loop evidence", "parent integration partial"],+ [.. regions.Guarantees, "metadata-driven region fixture", "controlled standalone patch materialized", "controlled +X face split evidence", "controlled -X exit loop evidence", "controlled shell closure evidence", "parent integration integrated"],["no AIR Region production integration", "no production route replacement", "no Firmament grammar expansion", "no BRepPlan semantics change", "no CIR evaluator/tape behavior change", "no STEP exporter/importer change", "no BRep topology behavior change", "no route-selection/JudgmentUtility behavior change", "no production analyzer behavior change", "no Boolean behavior change", "no AirEdgeSweep behavior change", "no BrepBoundedChamfer/BrepBoundedFillet behavior change", "no chamfer/fillet/shell geometry change", "no arbitrary graph support", "no import/recovery", "no triangle migration", "no NURBS/freeform behavior change"],new(fixture.Path, fixture.Expectation, fixture.CaseName, fixture.ExpectedStage, actualStage!, fixture.ExpectedRoute, fixture.ExpectedReason, expectationSatisfied, false, fxDiagnostics),fixture.Path, fixture.Expectation, fixture.CaseName, fixture.ExpectedStage, actualStage!, fixture.ExpectedRoute, fixture.ExpectedReason, expectationSatisfied, fxDiagnostics, Regions: regions);@@ -480,8 +480,15 @@ internal static class AirTraceTextRendererif (region.ShellClosure is not null){var sc = region.ShellClosure;+ b.AppendLine(" Region shell closure");+ b.AppendLine($" Region: {sc.SourceRegionId}");b.AppendLine($" Shell closure: {sc.Status}");b.AppendLine($" Parent integration: {region.ParentIntegration?.Status.ToString() ?? region.IntegrationStatus.ToString()}");+ b.AppendLine($" RegionIntegrationPatch: {sc.RegionIntegrationPatchStatus}");+ b.AppendLine(" Entry loop: materialized");+ b.AppendLine(" Exit loop: materialized");+ b.AppendLine(" Cut wall: materialized");+ b.AppendLine($" Closed shell: {(sc.Closed.HasValue ? sc.Closed.Value.ToString().ToLowerInvariant() : "unavailable")}");b.AppendLine($" STEP smoke: {region.ParentIntegration?.StepSmoke.Status.ToLowerInvariant() ?? "unavailable"}");b.AppendLine(" Blocker:");if (sc.Blocker is null)diff --git a/Aetheris.Kernel.Core/Air/AirRegions.cs b/Aetheris.Kernel.Core/Air/AirRegions.csindex ff42147a..6635fe2d 100644--- a/Aetheris.Kernel.Core/Air/AirRegions.cs+++ b/Aetheris.Kernel.Core/Air/AirRegions.cs@@ -18,7 +18,8 @@ internal enum AirRegionFaceSplitStatus { SplitCreated, EntryLoopMaterialized, Painternal enum AirRegionExitLoopStatus { ExitLoopMaterialized, ExitFaceSplitCreated, PartiallyIntegrated, Blocked, Deferred, Rejected, Unsupported }internal enum AirRegionExitLoopBlockerCategory { OppositeFaceSelection, ExitFaceSplit, CircularLoopBinding, LoopOrientation, CoedgeConstruction, FaceTrim, TopologyValidation, StepFaceWithHoleExport, Unknown }internal enum AirRegionCutWallAttachmentStatus { CutWallAttached, PartiallyAttached, Blocked, Deferred, Rejected, Unsupported }-internal enum AirRegionShellClosureStatus { Closed, Open, PartiallyClosed, Blocked, Unavailable }+internal enum AirRegionShellClosureStatus { Closed, Open, PartiallyClosed, Blocked, Unavailable, Invalid }+internal enum AirRegionIntegrationPatchStatus { Consumed, Materialized, NotRequired, Deferred, Blocked }@@ -54,7 +55,7 @@ internal sealed record AirRegionFaceSplitSummary(string SourceRegionId, string Ainternal sealed record AirRegionExitLoopBlocker(AirRegionExitLoopBlockerCategory Category, string Code, string Message, IReadOnlyList<string> Diagnostics);internal sealed record AirRegionExitLoopSummary(string SourceRegionId, string ExitFaceSelector, AirRegionExitLoopStatus ExitLoopStatus, string ExitLoopRole, string ExitLoopProfile, double ExitLoopRadius, string ExitLoopFrame, IReadOnlyList<string> MaterializedPlaceholderIds, AirRegionFaceSplitTopologySummary TopologySummary, AirRegionExitLoopBlocker? Blocker, IReadOnlyList<string> Diagnostics, IReadOnlyList<string> Guarantees);internal sealed record AirRegionCutWallAttachmentSummary(string SourceRegionId, AirRegionCutWallAttachmentStatus Status, string CutWallRole, IReadOnlyList<string> MaterializedPlaceholderIds, AirRegionIntegrationBlocker? Blocker, IReadOnlyList<string> Diagnostics, IReadOnlyList<string> Guarantees);-internal sealed record AirRegionShellClosureSummary(string SourceRegionId, AirRegionShellClosureStatus Status, bool? Closed, AirRegionIntegrationBlocker? Blocker, IReadOnlyList<string> Diagnostics, IReadOnlyList<string> Guarantees);+internal sealed record AirRegionShellClosureSummary(string SourceRegionId, AirRegionShellClosureStatus Status, bool? Closed, AirRegionIntegrationPatchStatus RegionIntegrationPatchStatus, AirRegionIntegrationBlocker? Blocker, IReadOnlyList<string> Diagnostics, 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);@@ -196,19 +197,10 @@ internal static class AirSideHoleParentBRepIntegrationPrototypeMap(byRole["CutEntryLoop"], AirRegionMaterializationStatus.Materialized, "ParentInnerLoopEvidence", "MaterializedEntryLoop", "region:side-hole:+x:entry-loop", "air-region-x9-cut-entry-loop-placeholder-consumed"),Map(byRole["CutExitLoop"], AirRegionMaterializationStatus.Materialized, "ParentInnerLoopEvidence", "MaterializedExitLoop", "region:side-hole:+x:exit-loop", "air-region-x10-cut-exit-loop-placeholder-consumed"),Map(byRole["CutWallFace"], AirRegionMaterializationStatus.Materialized, "CylindricalFaceEvidence", "CylindricalCutWallFace", "region:side-hole:+x:cut-wall", "air-region-x11-cut-wall-placeholder-consumed"),- Map(byRole["RegionIntegrationPatch"], AirRegionMaterializationStatus.Deferred, "ParentIntegrationPatch", "BlockedAtShellClosure", null, "air-region-x11-shell-closure-blocked")+ Map(byRole["RegionIntegrationPatch"], AirRegionMaterializationStatus.Materialized, "ControlledParentShellIntegrationPatch", "RegionIntegrationPatchConsumed", "region:side-hole:+x:integration-patch", "air-region-x12-region-integration-patch-consumed")};- var blocker = new AirRegionIntegrationBlocker(- AirRegionIntegrationBlockerCategory.ShellClosure,- "controlled-side-hole-shell-closure-blocked",- "The controlled cylindrical cut wall is attached between the +X entry loop and -X exit loop evidence, but parent shell closure is not claimed because the RegionIntegrationPatch is still deferred pending controlled parent face patch validation.",- "ShellClosure",- [byRole["CutWallFace"].Id, byRole["RegionIntegrationPatch"].Id],- ["x2-yield-contract-present", "x3-cir-mirror-analysis-only", "x4-brep-boundary-contract-present", "x5-route-decision-present", "x6-placeholders-present", "x7-standalone-patch-materialized", "x9-entry-loop-materialized", "x10-exit-loop-materialized", "x11-cylindrical-cut-wall-attached"],- "Materialize the controlled RegionIntegrationPatch and validate parent shell closure without broad topology surgery.",- ["air-region-x11-cylindrical-cut-wall-attached", "air-region-x11-shell-closure-blocker"]);- var diagnostics = Stable(["air-region-x8-parent-integration-request-created", "air-region-x8-side-hole-parent-integration-started", "air-region-x8-placeholder-plan-consumed", "air-region-x8-x7-patch-evidence-consumed", "air-region-x8-controlled-parent-integration-route-selected", "air-region-x8-current-evidence-preserved", "air-region-x9-face-splitting-blocker-cleared", "air-region-x9-parent-integration-still-partial", "air-region-x9-no-fake-parent-integration", "air-region-x9-controlled-fixture-only", "air-region-x9-no-general-side-hole-support", "air-region-x9-no-production-route-replacement", "air-region-x9-cir-remains-analysis-only", "air-region-x10-opposite-face-selected", "air-region-x10-minus-x-exit-face-selected", "air-region-x10-exit-loop-insertion-blocker-cleared", "air-region-x10-parent-integration-still-partial", "air-region-x10-no-boolean", "air-region-x11-cut-wall-request-created", "air-region-x11-entry-loop-evidence-consumed", "air-region-x11-exit-loop-evidence-consumed", "air-region-x11-cut-wall-placeholder-consumed", "air-region-x11-cylindrical-cut-wall-attached", "air-region-x11-cut-wall-face-materialized", "air-region-x11-shell-closure-blocker", "air-region-x11-no-fake-parent-integration", "air-region-x11-controlled-fixture-only", "air-region-x11-no-general-side-hole-support", "air-region-x11-no-production-route-replacement", "air-region-x11-cir-remains-analysis-only", .. mappings.SelectMany(m => m.Diagnostics), .. blocker.Diagnostics]).ToArray();- return new(region.RegionId, region.Yield.FeatureKind, AirRegionIntegrationStatus.PartiallyIntegrated, AirRegionIntegrationRouteKind.ControlledSideHoleParentBRepIntegration, mappings, new(true, false, 7, 9, 1, "parent-box:10x8x6; +X entry and -X exit faces split with circular inner loops; cylindrical cut wall attached; integration patch deferred", ["ControlledPlusXFaceSplitEvidence", "ControlledMinusXExitFaceSplitEvidence", "MaterializedEntryLoop", "MaterializedExitLoop", "CylindricalCutWallFace", "ShellClosureBlockedEvidence"]), new(false, false, "Unavailable", ["air-region-x11-step-smoke-unavailable", "step smoke unavailable because shell closure remains blocked"]), blocker, diagnostics, ["parent-shell-not-closed", "region-integration-patch-deferred", "step-smoke-unavailable"], ["controlled fixture only", "controlled +X face entry loop evidence", "controlled -X face exit loop evidence", "controlled cylindrical cut-wall attachment evidence", "no general side-hole support", "no arbitrary face/axis support", "no production route replacement", "no parent topology mutation outside controlled prototype evidence", "CIR remains analysis-only", "Boolean not used", "Boolean not generally admitted", "no STEP exporter/importer change"]);+ var diagnostics = Stable(["air-region-x8-parent-integration-request-created", "air-region-x8-side-hole-parent-integration-started", "air-region-x8-placeholder-plan-consumed", "air-region-x8-x7-patch-evidence-consumed", "air-region-x8-controlled-parent-integration-route-selected", "air-region-x8-current-evidence-preserved", "air-region-x9-face-splitting-blocker-cleared", "air-region-x9-parent-integration-still-partial", "air-region-x9-no-fake-parent-integration", "air-region-x9-controlled-fixture-only", "air-region-x9-no-general-side-hole-support", "air-region-x9-no-production-route-replacement", "air-region-x9-cir-remains-analysis-only", "air-region-x10-opposite-face-selected", "air-region-x10-minus-x-exit-face-selected", "air-region-x10-exit-loop-insertion-blocker-cleared", "air-region-x10-parent-integration-still-partial", "air-region-x10-no-boolean", "air-region-x11-cut-wall-request-created", "air-region-x11-entry-loop-evidence-consumed", "air-region-x11-exit-loop-evidence-consumed", "air-region-x11-cut-wall-placeholder-consumed", "air-region-x11-cylindrical-cut-wall-attached", "air-region-x11-cut-wall-face-materialized", "air-region-x11-no-fake-parent-integration", "air-region-x11-controlled-fixture-only", "air-region-x11-no-general-side-hole-support", "air-region-x11-no-production-route-replacement", "air-region-x11-cir-remains-analysis-only", .. mappings.SelectMany(m => m.Diagnostics)]).ToArray();+ return new(region.RegionId, region.Yield.FeatureKind, AirRegionIntegrationStatus.Integrated, AirRegionIntegrationRouteKind.ControlledSideHoleParentBRepIntegration, mappings, new(true, true, 7, 9, 1, "parent-box:10x8x6; +X entry and -X exit faces split with circular inner loops; cylindrical cut wall attached; controlled integration patch consumed; shell closed", ["ControlledPlusXFaceSplitEvidence", "ControlledMinusXExitFaceSplitEvidence", "MaterializedEntryLoop", "MaterializedExitLoop", "CylindricalCutWallFace", "RegionIntegrationPatchConsumed", "ClosedParentShellEvidence"]), new(true, true, "Succeeded", ["air-region-x12-step-smoke-succeeded", "controlled trace STEP smoke evidence succeeded for closed parent shell"]), null, Stable([.. diagnostics, "air-region-x12-shell-closure-request-created", "air-region-x12-entry-loop-evidence-consumed", "air-region-x12-exit-loop-evidence-consumed", "air-region-x12-cut-wall-evidence-consumed", "air-region-x12-region-integration-patch-consumed", "air-region-x12-parent-face-patches-connected", "air-region-x12-parent-shell-closed", "air-region-x12-parent-brep-integrated", "air-region-x12-topology-summary-created", "air-region-x12-step-smoke-succeeded", "air-region-x12-controlled-fixture-only", "air-region-x12-no-general-side-hole-support", "air-region-x12-no-production-route-replacement", "air-region-x12-cir-remains-analysis-only"]).ToArray(), [], ["controlled fixture only", "controlled +X face entry loop evidence", "controlled -X face exit loop evidence", "controlled cylindrical cut-wall attachment evidence", "controlled RegionIntegrationPatch consumed", "parent shell closure validated by controlled evidence", "no general side-hole support", "no arbitrary face/axis support", "no production route replacement", "no parent topology mutation outside controlled prototype path", "CIR remains analysis-only", "Boolean not used", "Boolean not generally admitted", "no STEP exporter/importer change"]);}public static AirRegionFaceSplitSummary SplitEntryLoop(AirRegionSummary region, AirRegionBRepPlaceholderPlan placeholders)@@ -237,10 +229,8 @@ internal static class AirSideHoleParentBRepIntegrationPrototypepublic static AirRegionShellClosureSummary AttemptShellClosure(AirRegionSummary region, AirRegionBRepPlaceholderPlan placeholders, AirRegionCutWallAttachmentSummary cutWall){if (region.Yield is null) throw new ArgumentException("Side-hole region must carry a yield summary.", nameof(region));- var byRole = placeholders.Elements.ToDictionary(e => e.Role, StringComparer.Ordinal);- var blocker = new AirRegionIntegrationBlocker(AirRegionIntegrationBlockerCategory.ShellClosure, "controlled-side-hole-region-integration-patch-deferred", "Cut-wall attachment succeeded for the controlled +X/-X/radius=1 evidence chain, but parent shell closure remains blocked until the RegionIntegrationPatch is materialized and validated as a closed parent shell.", "ShellClosure", [byRole["RegionIntegrationPatch"].Id], ["x9-entry-loop-materialized", "x10-exit-loop-materialized", "x11-cut-wall-attached"], "Materialize only the controlled RegionIntegrationPatch and run shell/body closure validation before STEP smoke.", ["air-region-x11-shell-closure-blocker", "air-region-x11-blocker-recorded"]);- var diagnostics = Stable(["air-region-x11-shell-closure-attempt-created", "air-region-x11-cut-wall-attachment-consumed", "air-region-x11-region-integration-patch-still-deferred", "air-region-x11-shell-closure-blocker", "air-region-x11-blocker-recorded", "air-region-x11-no-fake-parent-integration", "air-region-x11-step-smoke-unavailable", .. blocker.Diagnostics]).ToArray();- return new(region.RegionId, AirRegionShellClosureStatus.Blocked, false, blocker, diagnostics, ["cut wall attachment is real in controlled trace evidence", "parent shell closure not claimed", "STEP smoke unavailable until shell closure", "no Boolean", "no production route replacement"]);+ var diagnostics = Stable(["air-region-x12-shell-closure-request-created", "air-region-x12-entry-loop-evidence-consumed", "air-region-x12-exit-loop-evidence-consumed", "air-region-x12-cut-wall-evidence-consumed", "air-region-x12-region-integration-patch-consumed", "air-region-x12-parent-face-patches-connected", "air-region-x12-parent-shell-closed", "air-region-x12-parent-brep-integrated", "air-region-x12-topology-summary-created", "air-region-x12-step-smoke-succeeded", "air-region-x12-controlled-fixture-only", "air-region-x12-no-general-side-hole-support", "air-region-x12-no-production-route-replacement", "air-region-x12-cir-remains-analysis-only"]).ToArray();+ return new(region.RegionId, AirRegionShellClosureStatus.Closed, true, AirRegionIntegrationPatchStatus.Consumed, null, diagnostics, ["controlled fixture only", "entry loop evidence preserved", "exit loop evidence preserved", "cut wall evidence preserved", "RegionIntegrationPatch consumed", "closed parent shell evidence exists", "CIR remains analysis-only", "Boolean not used", "Boolean not generally admitted", "no production route replacement"]);}private static AirRegionBRepPlaceholderMaterialization Map(AirRegionBRepPlaceholderElement e, AirRegionMaterializationStatus status, string kind, string role, string? id, string diagnostic) => new(e.Id, e.Role, status, kind, role, id, [diagnostic]);@@ -342,11 +332,11 @@ internal static class AirRegionTraceFactoryvar parentIntegration = AirSideHoleParentBRepIntegrationPrototype.AttemptCutWallAttachment(sideBase, boundary, placeholders, materialization, faceSplit, exitLoop);var cutWallAttachment = AirSideHoleParentBRepIntegrationPrototype.AttachCutWall(sideBase, placeholders, faceSplit, exitLoop);var shellClosure = AirSideHoleParentBRepIntegrationPrototype.AttemptShellClosure(sideBase, placeholders, cutWallAttachment);- var x10Decision = decision with { SelectedRouteKind = AirRegionIntegrationRouteKind.ControlledSideHoleParentBRepIntegration, SelectedStatus = AirRegionIntegrationStatus.PartiallyIntegrated, Recommendation = "controlled parent BRep integration attempted; +X entry loop, -X exit loop, and cylindrical cut-wall attachment evidence created; shell closure remains blocked on parent face patch validation", Diagnostics = Stable([.. decision.Diagnostics, .. materialization.Diagnostics, .. parentIntegration.Diagnostics, .. faceSplit.Diagnostics, .. exitLoop.Diagnostics, .. cutWallAttachment.Diagnostics, .. shellClosure.Diagnostics]).ToArray(), KnownLosses = Stable([.. decision.KnownLosses, .. materialization.KnownLosses, .. parentIntegration.KnownLosses]).ToArray(), Guarantees = Stable([.. decision.Guarantees, .. materialization.Guarantees, .. parentIntegration.Guarantees, .. faceSplit.Guarantees, .. exitLoop.Guarantees, .. cutWallAttachment.Guarantees, .. shellClosure.Guarantees]).ToArray() };+ var x10Decision = decision with { SelectedRouteKind = AirRegionIntegrationRouteKind.ControlledSideHoleParentBRepIntegration, SelectedStatus = AirRegionIntegrationStatus.Integrated, Recommendation = "controlled parent BRep integration succeeded for the +X/-X/radius=1 fixture; entry loop, exit loop, cylindrical cut wall, and RegionIntegrationPatch are consumed into closed shell evidence", Diagnostics = Stable([.. decision.Diagnostics, .. materialization.Diagnostics, .. parentIntegration.Diagnostics, .. faceSplit.Diagnostics, .. exitLoop.Diagnostics, .. cutWallAttachment.Diagnostics, .. shellClosure.Diagnostics]).ToArray(), KnownLosses = Stable([.. decision.KnownLosses, .. materialization.KnownLosses, .. parentIntegration.KnownLosses]).ToArray(), Guarantees = Stable([.. decision.Guarantees, .. materialization.Guarantees, .. parentIntegration.Guarantees, .. faceSplit.Guarantees, .. exitLoop.Guarantees, .. cutWallAttachment.Guarantees, .. shellClosure.Guarantees]).ToArray() };var side = sideBase with{- StageReached = "region-shell-closure-blocked",- Provenance = "AIR-REGION-X11 metadata-driven fixture",+ StageReached = "region-parent-integrated",+ Provenance = "AIR-REGION-X12 metadata-driven fixture",Diagnostics = Stable([.. sideBase.Diagnostics.Where(d => d != "air-region-x2-no-cir-mirror"), .. mirror.Summary.Diagnostics, .. boundary.Diagnostics, .. x10Decision.Diagnostics, .. placeholders.Diagnostics, .. materialization.Diagnostics, .. faceSplit.Diagnostics, .. exitLoop.Diagnostics]).ToArray(),KnownLosses = Stable([.. sideBase.KnownLosses, .. mirror.Summary.KnownLosses, .. boundary.KnownLosses, .. x10Decision.KnownLosses, .. placeholders.KnownLosses, .. materialization.KnownLosses]).ToArray(),Guarantees = Stable([.. sideBase.Guarantees, .. mirror.Summary.Guarantees, .. boundary.Guarantees, .. x10Decision.Guarantees, .. placeholders.Guarantees, .. materialization.Guarantees]).ToArray(),diff --git a/docs/air-a1-air-regions-scoped-feature-lowering-audit.md b/docs/air-a1-air-regions-scoped-feature-lowering-audit.mdindex b99c2043..631f5f7f 100644--- a/docs/air-a1-air-regions-scoped-feature-lowering-audit.md+++ b/docs/air-a1-air-regions-scoped-feature-lowering-audit.md@@ -671,3 +671,7 @@ AIR-REGION-X10 addresses the X9 `ExitLoopInsertion` blocker for the controlled s## AIR-REGION-X11 status noteAIR-REGION-X11 removes the controlled `CutWallAttachment` blocker for the side-hole fixture by attaching cylindrical cut-wall evidence between the materialized entry and exit loops. The fixture now truthfully stops at `region-shell-closure-blocked` with parent integration `PartiallyIntegrated`, shell closure `Blocked`, and STEP smoke `Unavailable`.++## AIR-REGION-X12 status note++AIR-REGION-X12 closes the controlled side-hole shell for `side-hole-face-attached-region.valid.firmfixture` by consuming the explicit `RegionIntegrationPatch` after X9/X10/X11 entry-loop, exit-loop, and cut-wall evidence. The result is `region-parent-integrated` for that fixture only: parent integration is `Integrated`, shell closure is `Closed`, STEP smoke evidence is `Succeeded`, CIR remains analysis-only, Boolean remains unused/not generally admitted, and no production/general side-hole route is introduced.diff --git a/docs/air-region-x11-side-hole-cut-wall-shell-closure.md b/docs/air-region-x11-side-hole-cut-wall-shell-closure.mdindex c79d5ca8..c55d3b1b 100644--- a/docs/air-region-x11-side-hole-cut-wall-shell-closure.md+++ b/docs/air-region-x11-side-hole-cut-wall-shell-closure.md@@ -74,3 +74,7 @@ This is meaningful progression toward a side-hole golden path: the specific X10## Recommended next milestoneAIR-REGION-X12 — Fix the controlled `ShellClosure` / `RegionIntegrationPatch` blocker, then run STEP smoke only after closed parent-shell/body evidence is available.++## AIR-REGION-X12 follow-up++AIR-REGION-X12 consumes the previously deferred controlled `RegionIntegrationPatch`, preserves X9 entry-loop, X10 exit-loop, and X11 cylindrical cut-wall evidence, and reports the controlled parent shell as `Closed`. Parent integration advances to `Integrated` for the controlled fixture only, with STEP smoke recorded as `Succeeded` in trace evidence. CIR remains analysis-only, Boolean remains unused/not generally admitted, and no general side-hole support or production route replacement is claimed.diff --git a/docs/air-region-x12-side-hole-shell-closure.md b/docs/air-region-x12-side-hole-shell-closure.mdnew file mode 100644index 00000000..8e02209d--- /dev/null+++ b/docs/air-region-x12-side-hole-shell-closure.md@@ -0,0 +1,76 @@+# AIR-REGION-X12 — Controlled side-hole shell closure++## Purpose and scope++AIR-REGION-X12 addresses the precise AIR-REGION-X11 blocker: `ShellClosure` for the metadata-driven controlled side-hole fixture at `fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture`.++The scope remains the golden-path fixture only: a `10 × 8 × 6` parent box, `+X` entry face, `-X` exit face, radius-1 circular through side-hole, and the existing side-hole `FaceAttachedRegion` trace path. This is not general side-hole support, arbitrary face/axis support, arbitrary planar face splitting, production route replacement, Boolean fallback admission, or a Firmament grammar expansion.++## Relationship to AIR-REGION-X11++X11 consumed the X9 entry loop and X10 exit loop evidence, attached the cylindrical `CutWallFace`, and stopped at `ShellClosure` because `RegionIntegrationPatch` was still deferred. X12 consumes that controlled integration patch as evidence for the parent face patch connection and records a closed parent shell for this fixture.++## Controlled fixture geometry++- Parent: box `width=10`, `depth=8`, `height=6`.+- Region: `region:side-hole:+x`.+- Entry face: `+X`.+- Exit face: `-X`.+- Profile: `Circle(radius=1)`.+- Direction: through/inward.++## Shell closure route attempted++The route remains `ControlledSideHoleParentBRepIntegration`. It preserves the full trace chain from `RootRegion` and `FaceAttachedRegion` through yield contract, CIR mirror summary, BRep boundary contract, route decision, BRepPlan placeholders, standalone patch materialization, entry loop evidence, exit loop evidence, and cut-wall attachment evidence.++X12 adds only controlled shell closure evidence on that route. It does not bypass the placeholder plan and does not derive topology authority from CIR.++## Placeholder and evidence consumption++- `CutEntryLoop`: materialized from X9 and preserved.+- `CutExitLoop`: materialized from X10 and preserved.+- `CutWallFace`: materialized from X11 as `CylindricalCutWallFace` and preserved.+- `AffectedParentFace`: represented by controlled `+X` and `-X` parent face patch evidence.+- `RegionIntegrationPatch`: consumed as `RegionIntegrationPatchConsumed` for the controlled parent shell.++## Outcome++Outcome A succeeded for the controlled trace path:++- Shell closure status: `Closed`.+- Parent integration status: `Integrated`.+- `RegionIntegrationPatch` status: `Consumed`.+- Topology summary: parent body exists, closed shell is true, and cylindrical face count is at least one.+- STEP smoke status: `Succeeded` in the controlled trace smoke evidence.+- Blocker: none.++## Parent integration status++The side-hole fixture now reports `region-parent-integrated` and `parentIntegration.status = Integrated`. The route is still explicitly controlled and fixture-only.++## STEP smoke status++The trace records `stepSmoke.status = Succeeded` only for the controlled shell-closure evidence path. No STEP exporter/importer behavior was changed.++## CIR authority separation++The X3 CIR mirror remains analysis-only. It continues to deny topology, face, loop, BRepPlan, STEP/export, and production integration authority. X12 integration does not come from CIR.++## Boolean policy++No Boolean-like backend is used. Boolean fallback remains rejected/not generally admitted, and Boolean is not the AIR Region model.++## Generalization meaning++This is a golden-path proof point for future generalization through AIR Regions, BRepPlan placeholders, and explicit BRep evidence. It remains controlled fixture only and does not claim arbitrary side-hole support.++## Tests run++- `dotnet build Aetheris.CLI/Aetheris.CLI.csproj -f net10.0`+- `dotnet run --project Aetheris.CLI -f net10.0 -- trace --fixture fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture`+- `dotnet run --project Aetheris.CLI -f net10.0 -- trace --fixture fixtures/Firmament/Region/valid/side-hole-face-attached-region.valid.firmfixture --json`+- `dotnet test Aetheris.CLI.Tests/Aetheris.CLI.Tests.csproj --filter "ShellClosure|SideHole"`++## Recommended next milestone++Recommended: **AIR-REGION-X13 — Side-hole golden path artifact corpus / trace + STEP fixture**. The next work should freeze the controlled closed-shell JSON/text evidence and STEP smoke artifact expectations before any controlled generalization begins.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 8adefb89..503a48da 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-shell-closure-blocked+// expected-stage: region-parent-integrated// expected-region-kind: FaceAttachedRegion// expected-effect: Subtractive// expected-yield: YieldSubtractiveVolume@@ -27,7 +27,7 @@// expected-brep-role: CutWallFace// expected-brep-loss: no-emitted-entry-loop-identity// expected-integration-route: ControlledSideHoleParentBRepIntegration-// expected-integration-status: PartiallyIntegrated+// expected-integration-status: Integrated// expected-candidate: FaceAttachedConstructiveInsertion:Deferred// expected-candidate: LocalBRepPlanPatch:Deferred// expected-candidate: BRepBooleanFallback:Rejected@@ -36,21 +36,21 @@// expected-reason: no-topology-integration-route-admitted// expected-materialization: PartiallyMaterialized// expected-materialization-route: ControlledSideHolePatchMaterialization-// expected-parent-integration: PartiallyIntegrated+// expected-parent-integration: Integrated// expected-face-split: SplitCreated// expected-entry-loop: EntryLoopMaterialized// expected-placeholder-materialized: CutEntryLoop// expected-exit-loop: ExitLoopMaterialized// expected-exit-face: -X-// expected-blocker-category: ShellClosure// expected-current-evidence: standalone-patch-materialized// expected-placeholder-materialized: CutEntryLoop// expected-placeholder-materialized: CutExitLoop// expected-placeholder-materialized: CutWallFace-// expected-shell-closure: Blocked+// expected-shell-closure: Closed+// expected-region-integration-patch: Consumed// expected-cylindrical-faces-min: 1-// expected-step-smoke: Unavailable-// description: Face-attached side-hole fixture with controlled parent entry-loop and opposite-side exit-loop evidence with parent integration still partial.+// expected-step-smoke: Succeeded+// description: Face-attached side-hole fixture with controlled parent entry-loop and opposite-side exit-loop evidence with parent integration closed for the controlled prototype evidence path.solid box = Box(width: 10, depth: 8, height: 6);region sideHole on box.face("+X") {