Alarm pipeline wiring + full code-review backlog resolution #119

Open
dohertj2 wants to merge 51 commits from docs/alarm-client-wm-app-finding into main
Showing only changes of commit 964b40dcbc - Show all commits
@@ -29,9 +29,16 @@ public sealed class WorkerProjectReferenceTests
Assert.Equal("x86", ElementValue(project, "PlatformTarget")); Assert.Equal("x86", ElementValue(project, "PlatformTarget"));
} }
/// <summary>Verifies that MXAccess interop reference exists only in the worker project.</summary> /// <summary>
/// Verifies that the MXAccess COM interop is referenced only by the
/// worker project and its test project — never by the gateway server
/// or the contracts project. The gateway must never load MXAccess COM
/// directly (see <c>gateway.md</c>); the worker test project
/// legitimately references the interop so it can exercise the
/// COM-facing worker code (e.g. <c>WnWrapAlarmConsumer</c>).
/// </summary>
[Fact] [Fact]
public void MxAccessInteropReference_ExistsOnlyInWorkerProject() public void MxAccessInteropReference_ExistsOnlyInWorkerAndWorkerTestProjects()
{ {
DirectoryInfo repositoryRoot = FindRepositoryRoot(); DirectoryInfo repositoryRoot = FindRepositoryRoot();
string[] projectFiles = Directory.GetFiles(repositoryRoot.FullName, "*.csproj", SearchOption.AllDirectories) string[] projectFiles = Directory.GetFiles(repositoryRoot.FullName, "*.csproj", SearchOption.AllDirectories)
@@ -42,9 +49,12 @@ public sealed class WorkerProjectReferenceTests
IReadOnlyList<string> projectsWithMxAccessReference = projectFiles IReadOnlyList<string> projectsWithMxAccessReference = projectFiles
.Where(ProjectReferencesMxAccess) .Where(ProjectReferencesMxAccess)
.Select(path => Path.GetFileNameWithoutExtension(path)) .Select(path => Path.GetFileNameWithoutExtension(path))
.OrderBy(name => name, StringComparer.Ordinal)
.ToArray(); .ToArray();
Assert.Equal(["MxGateway.Worker"], projectsWithMxAccessReference); Assert.Equal(
["MxGateway.Worker", "MxGateway.Worker.Tests"],
projectsWithMxAccessReference);
} }
private static bool ProjectReferencesMxAccess(string projectPath) private static bool ProjectReferencesMxAccess(string projectPath)