|
90 | 90 | Run("SIGTRAN performance readiness separates foundation from benchmark evidence", SigtranPerformanceReadinessSeparatesFoundationFromBenchmarkEvidence); |
91 | 91 | Run("SIGTRAN performance CI profile keeps benchmarks opt-in", SigtranPerformanceCiProfileKeepsBenchmarksOptIn); |
92 | 92 | Run("SIGTRAN phase 14 status summarizes performance foundation", SigtranPhase14StatusSummarizesPerformanceFoundation); |
| 93 | +Run("SIGTRAN API surface catalog exposes protocol and governance surfaces", SigtranApiSurfaceCatalogExposesProtocolAndGovernanceSurfaces); |
| 94 | +Run("SIGTRAN API stability contracts mark pre-stable surfaces", SigtranApiStabilityContractsMarkPreStableSurfaces); |
| 95 | +Run("SIGTRAN API version matrix separates pre-stable and stable lines", SigtranApiVersionMatrixSeparatesPreStableAndStableLines); |
| 96 | +Run("SIGTRAN deprecation policy requires obsolete migration and release notes", SigtranDeprecationPolicyRequiresObsoleteMigrationAndReleaseNotes); |
| 97 | +Run("SIGTRAN migration guides require code samples", SigtranMigrationGuidesRequireCodeSamples); |
| 98 | +Run("SIGTRAN breaking change review requires baseline migration and approval", SigtranBreakingChangeReviewRequiresBaselineMigrationAndApproval); |
| 99 | +Run("SIGTRAN public API baseline covers known surfaces", SigtranPublicApiBaselineCoversKnownSurfaces); |
| 100 | +Run("SIGTRAN API lifecycle readiness separates foundation from stable claims", SigtranApiLifecycleReadinessSeparatesFoundationFromStableClaims); |
| 101 | +Run("SIGTRAN API lifecycle CI profile requires public API diff review", SigtranApiLifecycleCiProfileRequiresPublicApiDiffReview); |
| 102 | +Run("SIGTRAN phase 15 status summarizes API lifecycle foundation", SigtranPhase15StatusSummarizesApiLifecycleFoundation); |
93 | 103 | Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability); |
94 | 104 | Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform); |
95 | 105 | Run("Native SCTP connection planner resolves endpoints", NativeSctpConnectionPlannerResolvesEndpoints); |
@@ -1151,6 +1161,104 @@ static void SigtranPhase14StatusSummarizesPerformanceFoundation() |
1151 | 1161 | Assert(!SigtranPhase14Status.ProductionPerformanceReady, SigtranPhase14Status.Describe()); |
1152 | 1162 | } |
1153 | 1163 |
|
| 1164 | +static void SigtranApiSurfaceCatalogExposesProtocolAndGovernanceSurfaces() |
| 1165 | +{ |
| 1166 | + IReadOnlyList<SigtranApiSurface> surfaces = SigtranApiSurfaceCatalog.GetSurfaces(); |
| 1167 | + |
| 1168 | + AssertEqual(6, surfaces.Count, "API surface count"); |
| 1169 | + Assert(surfaces.Any(surface => surface.Name == "M3UA" && surface.Category == SigtranApiSurfaceCategory.Codec), "M3UA codec surface should be present"); |
| 1170 | + Assert(surfaces.Any(surface => surface.Name == "CoreUtilities" && surface.Category == SigtranApiSurfaceCategory.Governance), "governance surface should be present"); |
| 1171 | +} |
| 1172 | + |
| 1173 | +static void SigtranApiStabilityContractsMarkPreStableSurfaces() |
| 1174 | +{ |
| 1175 | + IReadOnlyList<SigtranApiStabilityContract> contracts = SigtranApiStability.GetContracts(); |
| 1176 | + |
| 1177 | + AssertEqual(6, contracts.Count, "API stability contract count"); |
| 1178 | + Assert(contracts.Any(contract => contract.Surface == "M3UA" && contract.Level == SigtranApiStabilityLevel.Preview), "M3UA should be preview"); |
| 1179 | + Assert(contracts.Any(contract => contract.Surface == "MAP" && contract.Level == SigtranApiStabilityLevel.Experimental), "MAP should be experimental"); |
| 1180 | + Assert(contracts.All(contract => contract.AllowsBreakingChangesBeforeStable), "pre-stable contracts should allow breaking changes"); |
| 1181 | +} |
| 1182 | + |
| 1183 | +static void SigtranApiVersionMatrixSeparatesPreStableAndStableLines() |
| 1184 | +{ |
| 1185 | + IReadOnlyList<SigtranApiVersionMatrixEntry> entries = SigtranApiVersionMatrix.GetEntries(); |
| 1186 | + |
| 1187 | + AssertEqual(2, entries.Count, "API version matrix count"); |
| 1188 | + Assert(entries.Any(entry => entry.ReleaseLine == "0.x" && entry.AcceptsBreakingChanges), "0.x should accept pre-stable breaking changes"); |
| 1189 | + Assert(entries.Any(entry => entry.ReleaseLine == "1.x" && !entry.AcceptsBreakingChanges), "1.x should reject breaking changes without major version"); |
| 1190 | +} |
| 1191 | + |
| 1192 | +static void SigtranDeprecationPolicyRequiresObsoleteMigrationAndReleaseNotes() |
| 1193 | +{ |
| 1194 | + SigtranDeprecationPolicy policy = SigtranDeprecationPolicies.CreateStableDefault(); |
| 1195 | + |
| 1196 | + Assert(policy.MinimumNoticePeriod >= TimeSpan.FromDays(90), "deprecation notice should be at least 90 days"); |
| 1197 | + Assert(policy.RequiresObsoleteAttribute, "deprecation should require ObsoleteAttribute"); |
| 1198 | + Assert(policy.RequiresMigrationGuide, "deprecation should require migration guide"); |
| 1199 | + Assert(policy.RequiresReleaseNotes, "deprecation should require release notes"); |
| 1200 | + Assert(policy.IsStableLifecyclePolicy, "deprecation policy should satisfy stable lifecycle requirements"); |
| 1201 | +} |
| 1202 | + |
| 1203 | +static void SigtranMigrationGuidesRequireCodeSamples() |
| 1204 | +{ |
| 1205 | + IReadOnlyList<SigtranMigrationGuideEntry> entries = SigtranMigrationGuides.GetEntries(); |
| 1206 | + |
| 1207 | + AssertEqual(3, entries.Count, "migration guide count"); |
| 1208 | + Assert(entries.All(entry => entry.RequiresCodeSamples), "migration guides should require code samples"); |
| 1209 | + Assert(entries.Any(entry => entry.Id == "prestable-to-1.0"), "prestable to 1.0 migration guide should be planned"); |
| 1210 | +} |
| 1211 | + |
| 1212 | +static void SigtranBreakingChangeReviewRequiresBaselineMigrationAndApproval() |
| 1213 | +{ |
| 1214 | + SigtranBreakingChangeReviewPolicy policy = SigtranBreakingChangeReview.CreateDefault(); |
| 1215 | + |
| 1216 | + Assert(policy.RequiresApiBaselineDiff, "breaking-change review should require API baseline diff"); |
| 1217 | + Assert(policy.RequiresMigrationGuide, "breaking-change review should require migration guide"); |
| 1218 | + Assert(policy.RequiresMaintainerApproval, "breaking-change review should require maintainer approval"); |
| 1219 | + Assert(policy.RequiresMajorVersionAfterStable, "stable breaking changes should require major version"); |
| 1220 | + Assert(policy.IsCommercialApiGovernanceReady, "breaking-change review should be commercial governance ready"); |
| 1221 | +} |
| 1222 | + |
| 1223 | +static void SigtranPublicApiBaselineCoversKnownSurfaces() |
| 1224 | +{ |
| 1225 | + SigtranPublicApiBaselineManifest manifest = SigtranPublicApiBaseline.CreateCurrent(); |
| 1226 | + |
| 1227 | + AssertEqual("prestable-public-api", manifest.Name, "public API baseline name"); |
| 1228 | + Assert(manifest.RequiresDiffReview, "public API baseline should require diff review"); |
| 1229 | + Assert(manifest.CoversKnownSurfaces, "public API baseline should cover known surfaces"); |
| 1230 | +} |
| 1231 | + |
| 1232 | +static void SigtranApiLifecycleReadinessSeparatesFoundationFromStableClaims() |
| 1233 | +{ |
| 1234 | + SigtranApiLifecycleReadinessReport report = SigtranApiLifecycleReadiness.GetReport(); |
| 1235 | + |
| 1236 | + Assert(report.FoundationReady, "API lifecycle foundation should be ready"); |
| 1237 | + Assert(!report.CommercialReady, "API lifecycle readiness should still depend on commercial gates"); |
| 1238 | + Assert(!report.StableApiLifecycleReady, "stable API lifecycle should not be claimed before commercial readiness"); |
| 1239 | +} |
| 1240 | + |
| 1241 | +static void SigtranApiLifecycleCiProfileRequiresPublicApiDiffReview() |
| 1242 | +{ |
| 1243 | + SigtranApiLifecycleCiProfile profile = SigtranApiLifecycleCi.CreateDefault(); |
| 1244 | + |
| 1245 | + AssertEqual("api-lifecycle", profile.Name, "API lifecycle CI profile name"); |
| 1246 | + Assert(profile.Commands.Count >= 3, "API lifecycle CI should reuse official verification commands"); |
| 1247 | + Assert(profile.RequiresApiLifecycleReadiness, "API lifecycle CI should require readiness"); |
| 1248 | + Assert(profile.RequiresPublicApiDiffReview, "API lifecycle CI should require public API diff review"); |
| 1249 | +} |
| 1250 | + |
| 1251 | +static void SigtranPhase15StatusSummarizesApiLifecycleFoundation() |
| 1252 | +{ |
| 1253 | + IReadOnlyList<string> capabilities = SigtranPhase15Status.GetCompletedCapabilities(); |
| 1254 | + |
| 1255 | + AssertEqual(10, SigtranPhase15Status.CompletedUnitCount, "Phase 15 completed unit count"); |
| 1256 | + AssertEqual(10, capabilities.Count, "Phase 15 capability count"); |
| 1257 | + Assert(capabilities.Contains("api-lifecycle-ci-profile"), "Phase 15 should include API lifecycle CI profile"); |
| 1258 | + Assert(SigtranPhase15Status.FoundationReady, SigtranPhase15Status.Describe()); |
| 1259 | + Assert(!SigtranPhase15Status.StableApiLifecycleReady, SigtranPhase15Status.Describe()); |
| 1260 | +} |
| 1261 | + |
1154 | 1262 | static void NativeSctpPlatformProbeReportsSocketCreationCapability() |
1155 | 1263 | { |
1156 | 1264 | AssertEqual(132, NativeSctpPlatform.IpProtocolSctp, "native SCTP protocol number"); |
|
0 commit comments