Skip to content

Commit 48c8b0f

Browse files
committed
Add maintained peer lab CI profile
1 parent 684dc10 commit 48c8b0f

5 files changed

Lines changed: 125 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ The roadmap is intentionally conservative:
205205
3. Harden SCCP with external interoperability vectors and trace validation.
206206
4. Harden TCAP with external interoperability vectors and MAP profile validation.
207207

208-
Phase 27 tracks the maintained external peer lab contract, including package-neutral binding, host prerequisites, validated lab configuration, deterministic artifact planning, command planning, traffic vectors, and digest-covered retained evidence gates.
208+
Phase 27 tracks the maintained external peer lab contract, including package-neutral binding, host prerequisites, validated lab configuration, deterministic artifact planning, command planning, traffic vectors, manual self-hosted CI policy, and digest-covered retained evidence gates.
209209
5. Harden MAP SMS with external interoperability vectors and operator-profile validation.
210210
6. Use completed interoperability tooling to run external lab validation, native SCTP verification, and release automation hardening.
211211
7. Complete commercial readiness gates and publish governed release candidates.

docs/PHASE27_MAINTAINED_EXTERNAL_PEER_LAB.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ The catalog flattens these vectors into an ordered expected message sequence so
9696

9797
This keeps commercial readiness honest: a command plan or artifact plan is not treated as proof until retained outputs and digests exist.
9898

99+
## Unit 9 - CI Profile
100+
101+
`SigtranMaintainedPeerLabCi` now defines the CI execution policy for the maintained peer lab:
102+
103+
- Manual dispatch only.
104+
- Self-hosted Linux runner required.
105+
- Environment variables required for peer binding and SCTP endpoints.
106+
- Artifact upload patterns for PCAP, logs, config, traces, comparison, and reports.
107+
108+
The profile is deliberately not safe for default pull request CI because it depends on native SCTP, packet capture permissions, retained artifacts, and a configured maintained peer package.
109+
99110
## Environment Contract
100111

101112
The default binding exposes these variables:
@@ -137,4 +148,4 @@ dotnet run --project src\Sigtran.NET.Tests\Sigtran.NET.Tests.csproj
137148
dotnet pack src\Sigtran.NET\Sigtran.NET.csproj -c Release
138149
```
139150

140-
The tests verify that the default binding satisfies the maintained peer selection policy, public binding summaries remain package-neutral, host prerequisite reports identify missing lab capabilities, environment-derived lab configuration is validated before use, the artifact plan covers every required retained evidence path, the command plan covers every required execution step, the traffic vector catalog yields a comparable expected message sequence, and evidence promotion is blocked without complete digest-covered artifacts.
151+
The tests verify that the default binding satisfies the maintained peer selection policy, public binding summaries remain package-neutral, host prerequisite reports identify missing lab capabilities, environment-derived lab configuration is validated before use, the artifact plan covers every required retained evidence path, the command plan covers every required execution step, the traffic vector catalog yields a comparable expected message sequence, evidence promotion is blocked without complete digest-covered artifacts, and CI remains manual/self-hosted for real lab execution.

docs/SDK_ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Status: Phase 26 is foundation-complete for package-neutral commercial roadmap r
243243
- Define host prerequisites, peer config, artifact naming, command scripts, traffic vectors, evidence promotion, readiness, and commercial gate alignment.
244244
- Keep selected package details outside public SDK type names.
245245

246-
Status: Phase 27 has canonical `Sigtran.NET` naming, a package-neutral maintained peer lab binding catalog, host prerequisite readiness modeling, validated lab configuration contracts, deterministic retained artifact planning, an ordered command plan, maintained peer traffic vectors, and a digest-covered evidence promotion gate. Commercial release remains blocked until the maintained peer lab produces passing digest-covered evidence.
246+
Status: Phase 27 has canonical `Sigtran.NET` naming, a package-neutral maintained peer lab binding catalog, host prerequisite readiness modeling, validated lab configuration contracts, deterministic retained artifact planning, an ordered command plan, maintained peer traffic vectors, a digest-covered evidence promotion gate, and manual self-hosted CI policy. Commercial release remains blocked until the maintained peer lab produces passing digest-covered evidence.
247247

248248
## Recommended First Deliverable
249249

src/Sigtran.NET.Tests/Program.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
Run("SIGTRAN maintained peer lab command plan covers execution steps", SigtranMaintainedPeerLabCommandPlanCoversExecutionSteps);
4444
Run("SIGTRAN maintained peer lab traffic vectors expose comparable sequence", SigtranMaintainedPeerLabTrafficVectorsExposeComparableSequence);
4545
Run("SIGTRAN maintained peer lab evidence gate requires complete retained artifacts", SigtranMaintainedPeerLabEvidenceGateRequiresCompleteRetainedArtifacts);
46+
Run("SIGTRAN maintained peer lab CI profile is manual and self-hosted", SigtranMaintainedPeerLabCiProfileIsManualAndSelfHosted);
4647
Run("SIGTRAN trace comparison reports ordered mismatches", SigtranTraceComparisonReportsOrderedMismatches);
4748
Run("SIGTRAN interoperability evidence promotion requires passing lab run", SigtranInteropEvidencePromotionRequiresPassingLabRun);
4849
Run("SIGTRAN interoperability lab CI profile is opt-in", SigtranInteropLabCiProfileIsOptIn);
@@ -865,6 +866,20 @@ static void SigtranMaintainedPeerLabEvidenceGateRequiresCompleteRetainedArtifact
865866
Assert(missingDigest.Describe().Contains("promotion=False", StringComparison.Ordinal), missingDigest.Describe());
866867
}
867868

869+
static void SigtranMaintainedPeerLabCiProfileIsManualAndSelfHosted()
870+
{
871+
SigtranMaintainedPeerLabCiProfile profile = SigtranMaintainedPeerLabCi.CreateDefault();
872+
873+
AssertEqual("maintained-peer-lab", profile.Name, "maintained peer lab CI profile name");
874+
Assert(profile.ManualDispatchOnly, profile.Describe());
875+
Assert(profile.RequiresSelfHostedLinux, profile.Describe());
876+
Assert(!profile.SafeForDefaultCi, profile.Describe());
877+
Assert(profile.RequiredEnvironmentVariables.Contains(SigtranMaintainedPeerLabBindings.PackageEnvironmentVariable), "CI profile should require peer package variable");
878+
Assert(profile.RequiredEnvironmentVariables.Contains("LOCAL_SCTP_PORT"), "CI profile should require local SCTP port");
879+
Assert(profile.ArtifactPatterns.Any(static pattern => pattern.Contains("/pcap/", StringComparison.Ordinal)), "CI profile should upload PCAP artifacts");
880+
Assert(profile.ArtifactPatterns.Any(static pattern => pattern.Contains("/comparison/", StringComparison.Ordinal)), "CI profile should upload comparison artifacts");
881+
}
882+
868883
static void SigtranTraceComparisonReportsOrderedMismatches()
869884
{
870885
SigtranInteropLabTemplate template = SigtranInteropPeerProfiles.CreateExternalPeerM3uaAspToSgTemplate();
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
namespace Sigtran.NET.Core.Utilities;
2+
3+
/// <summary>
4+
/// Describes maintained external peer lab CI execution policy.
5+
/// </summary>
6+
public sealed class SigtranMaintainedPeerLabCiProfile
7+
{
8+
/// <summary>Creates a maintained external peer lab CI profile.</summary>
9+
/// <param name="name">The CI profile name.</param>
10+
/// <param name="manualDispatchOnly">Whether the lab is manual-dispatch only.</param>
11+
/// <param name="requiresSelfHostedLinux">Whether a self-hosted Linux runner is required.</param>
12+
/// <param name="requiredEnvironmentVariables">The required environment variables.</param>
13+
/// <param name="artifactPatterns">The retained artifact upload patterns.</param>
14+
public SigtranMaintainedPeerLabCiProfile(
15+
string name,
16+
bool manualDispatchOnly,
17+
bool requiresSelfHostedLinux,
18+
IReadOnlyList<string> requiredEnvironmentVariables,
19+
IReadOnlyList<string> artifactPatterns)
20+
{
21+
ArgumentNullException.ThrowIfNull(requiredEnvironmentVariables);
22+
ArgumentNullException.ThrowIfNull(artifactPatterns);
23+
24+
Name = string.IsNullOrWhiteSpace(name) ? throw new ArgumentException("CI profile name is required.", nameof(name)) : name;
25+
ManualDispatchOnly = manualDispatchOnly;
26+
RequiresSelfHostedLinux = requiresSelfHostedLinux;
27+
RequiredEnvironmentVariables = requiredEnvironmentVariables.Count == 0
28+
? throw new ArgumentException("At least one environment variable is required.", nameof(requiredEnvironmentVariables))
29+
: requiredEnvironmentVariables.ToArray();
30+
ArtifactPatterns = artifactPatterns.Count == 0
31+
? throw new ArgumentException("At least one artifact pattern is required.", nameof(artifactPatterns))
32+
: artifactPatterns.ToArray();
33+
}
34+
35+
/// <summary>The CI profile name.</summary>
36+
public string Name { get; }
37+
38+
/// <summary>Whether the lab is manual-dispatch only.</summary>
39+
public bool ManualDispatchOnly { get; }
40+
41+
/// <summary>Whether a self-hosted Linux runner is required.</summary>
42+
public bool RequiresSelfHostedLinux { get; }
43+
44+
/// <summary>The required environment variables.</summary>
45+
public IReadOnlyList<string> RequiredEnvironmentVariables { get; }
46+
47+
/// <summary>The retained artifact upload patterns.</summary>
48+
public IReadOnlyList<string> ArtifactPatterns { get; }
49+
50+
/// <summary>Whether this profile is safe to run in default pull request CI.</summary>
51+
public bool SafeForDefaultCi => !RequiresSelfHostedLinux && !ManualDispatchOnly;
52+
53+
/// <summary>Formats a compact CI profile summary.</summary>
54+
/// <returns>The CI profile summary.</returns>
55+
public string Describe()
56+
{
57+
return $"name={Name} manual={ManualDispatchOnly} selfHostedLinux={RequiresSelfHostedLinux} env={RequiredEnvironmentVariables.Count} artifacts={ArtifactPatterns.Count}";
58+
}
59+
}
60+
61+
/// <summary>
62+
/// Provides maintained external peer lab CI profile helpers.
63+
/// </summary>
64+
public static class SigtranMaintainedPeerLabCi
65+
{
66+
/// <summary>Creates the default maintained external peer lab CI profile.</summary>
67+
/// <returns>The default maintained external peer lab CI profile.</returns>
68+
public static SigtranMaintainedPeerLabCiProfile CreateDefault()
69+
{
70+
return new(
71+
"maintained-peer-lab",
72+
manualDispatchOnly: true,
73+
requiresSelfHostedLinux: true,
74+
requiredEnvironmentVariables:
75+
[
76+
SigtranMaintainedPeerLabBindings.PeerIdEnvironmentVariable,
77+
SigtranMaintainedPeerLabBindings.PackageEnvironmentVariable,
78+
SigtranMaintainedPeerLabBindings.PackageVersionEnvironmentVariable,
79+
SigtranMaintainedPeerLabBindings.ArtifactRootEnvironmentVariable,
80+
"LOCAL_IP",
81+
"LOCAL_SCTP_PORT",
82+
"REMOTE_IP",
83+
"REMOTE_SCTP_PORT",
84+
"ROUTING_CONTEXT"
85+
],
86+
artifactPatterns:
87+
[
88+
"artifacts/external-peer/**/pcap/*.pcap",
89+
"artifacts/external-peer/**/logs/*.log",
90+
"artifacts/external-peer/**/config/*.env",
91+
"artifacts/external-peer/**/trace/*.jsonl",
92+
"artifacts/external-peer/**/comparison/*.md",
93+
"artifacts/external-peer/**/reports/*.md"
94+
]);
95+
}
96+
}

0 commit comments

Comments
 (0)