Skip to content

Commit 2bac51e

Browse files
committed
Add phase 15 API lifecycle readiness
1 parent e4beafc commit 2bac51e

16 files changed

Lines changed: 834 additions & 0 deletions

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The first production milestone is M3UA over a transport abstraction. SCCP, TCAP,
4444
| Operations | Phase 12 foundation-ready: production operations capability catalog, runbook catalog, incident response targets, health check matrix, rollback plan, maintenance policy, support handbook, readiness report, operations CI profile, and status report added; production operations still require commercial readiness |
4545
| Compliance and audit | Phase 13 foundation-ready: compliance capability catalog, audit event catalog, evidence retention policy, license compliance policy, data handling classification, export-control policy, readiness report, compliance CI profile, commercial compliance gate, and status report added; enterprise compliance claims still require commercial readiness and adopter-specific legal/regulatory review |
4646
| Performance and capacity | Phase 14 foundation-ready: performance capability catalog, benchmark scenario catalog, capacity profile, throughput targets, latency budgets, load-test plan, resource budget, readiness report, performance CI profile, and status report added; production performance claims still require representative benchmark evidence |
47+
| API lifecycle | Phase 15 foundation-ready: API surface catalog, stability contracts, version matrix, deprecation policy, migration guide catalog, breaking-change review policy, public API baseline, readiness report, API lifecycle CI profile, and status report added; stable API lifecycle claims still require commercial readiness and validation evidence |
4748
| Package governance | Phase 7 policy added: current package metadata is tracked; commercial target still requires package signing and SBOM automation |
4849
| Security governance | Phase 7 security policy added with private disclosure and severity response targets |
4950
| Compatibility policy | Phase 7 policy added: net10.0 target, SemVer, pre-stable breaking-change allowance, and stable major-version rule |
@@ -150,6 +151,8 @@ if (!M3uaTypedMessageParser.TryParseSignallingCongestion(
150151
- [Phase 13 Summary](docs/PHASE13_SUMMARY.md)
151152
- [Phase 14 Performance](docs/PHASE14_PERFORMANCE.md)
152153
- [Phase 14 Summary](docs/PHASE14_SUMMARY.md)
154+
- [Phase 15 API Lifecycle](docs/PHASE15_API_LIFECYCLE.md)
155+
- [Phase 15 Summary](docs/PHASE15_SUMMARY.md)
153156
- [Continuous Integration](docs/CI.md)
154157
- [SCTP Transport](docs/SCTP_TRANSPORT.md)
155158
- [Compatibility policy](docs/COMPATIBILITY.md)
@@ -177,6 +180,7 @@ The roadmap is intentionally conservative:
177180
12. Complete production operations and support readiness.
178181
13. Complete compliance and audit readiness foundations.
179182
14. Complete performance, capacity, and benchmark readiness foundations.
183+
15. Complete API stability, deprecation, and migration readiness foundations.
180184

181185
## License
182186

docs/CI.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,9 @@ The profile reuses build, test, and pack commands and requires compliance readin
5555
Phase 14 adds `SigtranPerformanceCi.CreateDefault()` as the metadata contract for validating performance readiness.
5656

5757
The profile reuses build, test, and pack commands, requires performance readiness, and keeps long-running benchmarks opt-in.
58+
59+
## API Lifecycle CI
60+
61+
Phase 15 adds `SigtranApiLifecycleCi.CreateDefault()` as the metadata contract for validating API lifecycle readiness.
62+
63+
The profile reuses build, test, and pack commands and requires public API diff review for API-shaping changes.

docs/PHASE15_API_LIFECYCLE.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Phase 15 API Stability Deprecation And Migration Readiness
2+
3+
Phase 15 adds API lifecycle readiness for SIGTRAN.NET.
4+
5+
This phase makes the public SDK surface easier to consume in large projects by documenting stability levels, version-line behavior, deprecation rules, migration expectations, breaking-change review, and public API baseline governance.
6+
7+
## API Surface Catalog
8+
9+
`SigtranApiSurfaceCatalog.GetSurfaces()` exposes the public API surfaces that adopters should track:
10+
11+
- M3UA
12+
- SCTP
13+
- SCCP
14+
- TCAP
15+
- MAP
16+
- CoreUtilities
17+
18+
Each surface includes a category and namespace prefix.
19+
20+
## Stability Contracts
21+
22+
`SigtranApiStability.GetContracts()` assigns a stability level to each public surface.
23+
24+
M3UA and SCTP are currently preview surfaces. SCCP, TCAP, and MAP remain experimental until their external interoperability evidence and profile validation are complete.
25+
26+
## Version Matrix
27+
28+
`SigtranApiVersionMatrix.GetEntries()` defines release-line behavior:
29+
30+
- `0.x` is pre-stable and can accept breaking changes.
31+
- `1.x` is planned stable and should reject breaking changes unless a major version is used.
32+
33+
## Deprecation Policy
34+
35+
`SigtranDeprecationPolicies.CreateStableDefault()` defines stable API deprecation expectations:
36+
37+
- At least 180 days of notice.
38+
- `ObsoleteAttribute` on deprecated APIs.
39+
- Migration guide coverage.
40+
- Release-note coverage.
41+
42+
## Migration Guides
43+
44+
`SigtranMigrationGuides.GetEntries()` identifies planned migration guides for the move from pre-stable APIs toward 1.0.
45+
46+
Migration guides must include code samples so users can update applications without reverse-engineering API changes.
47+
48+
## Breaking-Change Review
49+
50+
`SigtranBreakingChangeReview.CreateDefault()` requires API baseline diffs, migration guides, maintainer approval, and major-version handling after stable release.
51+
52+
## Public API Baseline
53+
54+
`SigtranPublicApiBaseline.CreateCurrent()` defines the current pre-stable public API baseline manifest.
55+
56+
The baseline covers known public surfaces and requires diff review before API-shaping changes are accepted.
57+
58+
## API Lifecycle Readiness
59+
60+
`SigtranApiLifecycleReadiness.GetReport()` separates API lifecycle foundation readiness from stable API lifecycle claims.
61+
62+
The API lifecycle foundation is ready when surface catalog, stability contracts, version matrix, deprecation policy, migration guide catalog, breaking-change review, and public API baseline are all present. Stable lifecycle claims still require wider commercial readiness.
63+
64+
## API Lifecycle CI
65+
66+
`SigtranApiLifecycleCi.CreateDefault()` reuses the official build, test, and pack commands while requiring API lifecycle readiness and public API diff review.
67+
68+
## Phase Status
69+
70+
`SigtranPhase15Status.Describe()` summarizes the completed Phase 15 units and separates API lifecycle foundation readiness from stable API lifecycle claims.

docs/PHASE15_SUMMARY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Phase 15 Summary
2+
3+
Phase 15 adds the API stability, deprecation, and migration-readiness foundation for SIGTRAN.NET.
4+
5+
## Completed Units
6+
7+
1. API surface catalog.
8+
2. API stability contracts.
9+
3. API version matrix.
10+
4. Deprecation policy.
11+
5. Migration guide catalog.
12+
6. Breaking-change review policy.
13+
7. Public API baseline manifest.
14+
8. API lifecycle readiness report.
15+
9. API lifecycle CI profile.
16+
10. Phase status and documentation.
17+
18+
## Current State
19+
20+
The Phase 15 API lifecycle foundation is complete.
21+
22+
`SigtranPhase15Status.FoundationReady` is expected to be true. `StableApiLifecycleReady` remains false until wider commercial readiness is complete.
23+
24+
## Production Claim Boundary
25+
26+
Phase 15 improves public API governance, but it does not make every protocol surface stable. M3UA and SCTP remain preview. SCCP, TCAP, and MAP remain experimental until interoperability and profile validation evidence exists.

docs/SDK_ROADMAP.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ Status: Phase 13 is foundation-ready for compliance capability catalog, audit ev
139139

140140
Status: Phase 14 is foundation-ready for performance capability catalog, benchmark scenario catalog, capacity profile, throughput targets, latency budgets, load-test plan, resource budget, performance readiness, performance CI profile, and phase documentation. Production performance claims remain blocked until representative native SCTP and external-peer benchmark evidence is captured and retained.
141141

142+
## Phase 15 - API Stability Deprecation And Migration Readiness
143+
144+
- Add public API surface catalog, stability contracts, version-line matrix, deprecation policy, migration guide catalog, breaking-change review, and API baseline foundations.
145+
- Keep API lifecycle foundation readiness separate from stable API lifecycle claims.
146+
- Make API-shaping changes visible and reviewable for open-source and commercial adopters.
147+
148+
Status: Phase 15 is foundation-ready for API surface catalog, stability contracts, version matrix, deprecation policy, migration guide catalog, breaking-change review policy, public API baseline, API lifecycle readiness, API lifecycle CI profile, and phase documentation. Stable API lifecycle claims remain blocked until wider commercial readiness is complete and protocol surfaces have the required validation evidence.
149+
142150
## Recommended First Deliverable
143151

144152
The first useful SDK release should be an alpha package focused on M3UA over a transport abstraction:

src/sigtran.net.Tests/Program.cs

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@
9090
Run("SIGTRAN performance readiness separates foundation from benchmark evidence", SigtranPerformanceReadinessSeparatesFoundationFromBenchmarkEvidence);
9191
Run("SIGTRAN performance CI profile keeps benchmarks opt-in", SigtranPerformanceCiProfileKeepsBenchmarksOptIn);
9292
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);
93103
Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability);
94104
Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform);
95105
Run("Native SCTP connection planner resolves endpoints", NativeSctpConnectionPlannerResolvesEndpoints);
@@ -1151,6 +1161,104 @@ static void SigtranPhase14StatusSummarizesPerformanceFoundation()
11511161
Assert(!SigtranPhase14Status.ProductionPerformanceReady, SigtranPhase14Status.Describe());
11521162
}
11531163

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+
11541262
static void NativeSctpPlatformProbeReportsSocketCreationCapability()
11551263
{
11561264
AssertEqual(132, NativeSctpPlatform.IpProtocolSctp, "native SCTP protocol number");
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
namespace sigtran.net.Core.Utilities;
2+
3+
/// <summary>
4+
/// Describes the API lifecycle CI profile.
5+
/// </summary>
6+
public sealed class SigtranApiLifecycleCiProfile
7+
{
8+
/// <summary>Creates an API lifecycle CI profile.</summary>
9+
/// <param name="name">The profile name.</param>
10+
/// <param name="commands">The verification commands.</param>
11+
/// <param name="requiresApiLifecycleReadiness">Whether API lifecycle readiness is required.</param>
12+
/// <param name="requiresPublicApiDiffReview">Whether public API diffs require review.</param>
13+
public SigtranApiLifecycleCiProfile(
14+
string name,
15+
IReadOnlyList<string> commands,
16+
bool requiresApiLifecycleReadiness,
17+
bool requiresPublicApiDiffReview)
18+
{
19+
ArgumentNullException.ThrowIfNull(commands);
20+
Name = string.IsNullOrWhiteSpace(name) ? throw new ArgumentException("Profile name is required.", nameof(name)) : name;
21+
Commands = commands.Count == 0 ? throw new ArgumentException("At least one command is required.", nameof(commands)) : commands.ToArray();
22+
RequiresApiLifecycleReadiness = requiresApiLifecycleReadiness;
23+
RequiresPublicApiDiffReview = requiresPublicApiDiffReview;
24+
}
25+
26+
/// <summary>The profile name.</summary>
27+
public string Name { get; }
28+
29+
/// <summary>The verification commands.</summary>
30+
public IReadOnlyList<string> Commands { get; }
31+
32+
/// <summary>Whether API lifecycle readiness is required.</summary>
33+
public bool RequiresApiLifecycleReadiness { get; }
34+
35+
/// <summary>Whether public API diffs require review.</summary>
36+
public bool RequiresPublicApiDiffReview { get; }
37+
}
38+
39+
/// <summary>
40+
/// Provides API lifecycle CI profile helpers.
41+
/// </summary>
42+
public static class SigtranApiLifecycleCi
43+
{
44+
/// <summary>Creates the default API lifecycle CI profile.</summary>
45+
/// <returns>The default API lifecycle CI profile.</returns>
46+
public static SigtranApiLifecycleCiProfile CreateDefault()
47+
{
48+
return new(
49+
"api-lifecycle",
50+
SigtranCiVerification.CreateDefaultProfile().GetCommands(),
51+
requiresApiLifecycleReadiness: true,
52+
requiresPublicApiDiffReview: true);
53+
}
54+
}

0 commit comments

Comments
 (0)