refactor(comm): retire ClusterClient naming after the gRPC cutover

Phase 4 of the ClusterClient -> gRPC migration deleted the Akka transports
but left the naming behind: `ClusterClientSiteAuditClient` was transport-
agnostic and worked unchanged, so it survived the deletion under a name
that now describes a transport the repo no longer has. Same for a scatter
of doc-comments still framing gRPC as "the new transport" beside an Akka
one that is gone.

Renames it to `SiteCommunicationAuditClient` (and its test file) and
rewrites the stale comments to describe the single transport that exists.
Also tightens CLAUDE.md: drops the self-describing directory listing and
the 27-component enumeration in favour of the non-obvious parts only.

Behaviour-neutral: names and prose only. Recorded as the Phase 4
follow-up in docs/plans/2026-07-22-clusterclient-to-grpc-plan.md.
This commit is contained in:
Joseph Doherty
2026-07-27 15:40:01 -04:00
parent b3dc17a5fe
commit 63c16d6912
57 changed files with 193 additions and 244 deletions
@@ -28,7 +28,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Deployment;
/// <b>Tolerant terminal-state assertion (validation-behavior protocol):</b> whether
/// <c>Connect</c> reaches a <b>Live</b> badge depends on the owning site returning a
/// snapshot for the instance. Reading <c>DebugView.razor::Connect</c>: it awaits
/// <c>DebugStreamService.StartStreamAsync</c> (a ClusterClient snapshot round-trip);
/// <c>DebugStreamService.StartStreamAsync</c> (a site snapshot round-trip);
/// on success it flips <c>_connected = true</c> (Live badge + success toast), and on
/// any exception it surfaces a <c>Connect failed: …</c> error <c>.toast</c>. Either
/// way <c>_connecting</c> resets, so the click always resolves — it never hangs. The
@@ -19,13 +19,13 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Deployment;
/// and would never appear, so the test mints an instance via the shared
/// <see cref="DeploymentFixture"/> and drives it to <c>Enabled</c> over the CLI
/// (<c>instance deploy</c>) before selecting it. The fixture provisions onto the
/// real, running <c>site-a</c> so the ClusterClient snapshot round-trip resolves
/// fast (an unknown site has no registered ClusterClient and only times out).
/// real, running <c>site-a</c> so the snapshot round-trip resolves
/// fast (an unknown site has no reachable gRPC endpoint and only times out).
/// </para>
///
/// <para>
/// <b>Tolerant terminal-state wait, then the tabs/trees assertions</b> — Connect
/// awaits a ClusterClient snapshot round-trip; on success the page flips to the
/// awaits a site snapshot round-trip; on success the page flips to the
/// Live badge and renders the tabbed card, on failure it surfaces a
/// <c>Connect failed: …</c> <c>.toast</c> (see <c>DebugView.razor::Connect</c>).
/// The test first waits on a TERMINAL state (Live badge OR error toast) within a
@@ -11,8 +11,8 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Deployment;
///
/// <para>
/// <b>Why <c>site-a</c> and not a throwaway site:</b> the deploy / enable / disable
/// actions relay to the owning site over the Akka <c>ClusterClient</c>. An unknown
/// site identifier has no registered <c>ClusterClient</c>, so the relay only
/// actions relay to the owning site over the gRPC site command plane. An unknown
/// site identifier has no reachable gRPC endpoint, so the relay only
/// resolves on a slow 10-second timeout (and never surfaces a fast failure toast).
/// To exercise the real action path, the ephemeral instances must therefore live
/// on a <em>real, running</em> site — <c>site-a</c> — rather than a fixture-created
@@ -282,8 +282,8 @@ public class SiteCallsPageTests
// be relayed to the owning site. Unlike the display-only tests above,
// this one actually relays to the owning site, so the SourceSite must
// be a *real* site identifier from the running cluster (site-a) and
// not the cosmetic "plant-a" label: an unknown site has no registered
// ClusterClient, so CentralCommunicationActor drops the envelope
// not the cosmetic "plant-a" label: an unknown site has no reachable
// gRPC endpoint, so CentralCommunicationActor drops the envelope
// without replying and the relay only resolves on the 10s inner Ask
// timeout — too slow for the toast assertion below. Relayed to a live
// site, the site finds no parked S&F message for this freshly-seeded
@@ -319,7 +319,7 @@ public class SiteCallsPageTests
// We only assert that an outcome toast appears (exactly one — the
// single-toast contract), not which one, since the live cluster
// state determines the outcome. The wait is generous (15s): the
// relay round-trips to the site over ClusterClient, and a worst-case
// relay round-trips to the site over gRPC, and a worst-case
// path can sit on the 10s inner relay timeout before the response —
// and the toast itself auto-dismisses 5s after it appears, so the
// assertion must catch it inside that window.