diff --git a/.github/workflows/publish-container.yml b/.github/workflows/publish-container.yml deleted file mode 100644 index 56a9a18..0000000 --- a/.github/workflows/publish-container.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Publish Container - -on: - push: - branches: - - main - tags: - - "v*" - workflow_dispatch: - -env: - REGISTRY: ghcr.io - IMAGE_NAME: gamecult/bifrost - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - -jobs: - publish: - name: Build and publish Bifrost image - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Check out repository - uses: actions/checkout@v6 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GHCR - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract image metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=sha,prefix=sha- - type=ref,event=branch - type=ref,event=tag - - - name: Build and push image - uses: docker/build-push-action@v6 - with: - context: . - file: Dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index e0f9f0f..0e4ea9d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ It is closer to deployable now, but it is still not a finished internet-facing m - public app hostname: `bifrost.gamecult.org` - infrastructure context: `Yggdrasil` -- deployment model: GHCR image + Docker Compose behind nginx, with the older systemd path kept as rollback until the container path is boring +- deployment model: a release directory under `/srv/bifrost/app/releases`, switched by Idunn with a rollback point; no container images are published or pulled ## Next Build Target diff --git a/compose.local.yaml b/compose.local.yaml index dbd3d85..1afb56a 100644 --- a/compose.local.yaml +++ b/compose.local.yaml @@ -22,7 +22,7 @@ services: build: context: . dockerfile: Dockerfile - image: ghcr.io/gamecult/bifrost:local + image: bifrost-web:local container_name: bifrost-web depends_on: postgres: diff --git a/docs/bridge.md b/docs/bridge.md index a15bbbf..c2bc284 100644 --- a/docs/bridge.md +++ b/docs/bridge.md @@ -196,7 +196,7 @@ The command is a dry-run shape probe for public surfaces that are real enough to Bifrost's native Discord gateway is the conversation observer. A direct mention of the Bifrost bot, or a reply to one of its messages, becomes an immutable typed `bifrost.discord.persona_conversation_event.v0` only when the guild and channel have one exact Persona target binding. Bot-authored, ambient, empty, over-1200-character, unbound, and ambiguously bound messages do not enter the conversation path. The 1200-character cap is the shared signed alpha boundary with Epiphany. The observation store is Bifrost-private working state, never an actuator queue, and insert collisions must contain exactly equal content. VoidBot does not observe, schedule, or answer for the target Persona. -Persona speech goes out through Matrix, not Discord. `tools/persona-matrix-mouth.mjs` is the one process for every Persona (`PERSONAS`, a list of slugs): it holds each Persona's Matrix access token as its own systemd credential (`matrix-token-`) and nobody else holds any. Per Persona it keeps one `/sync` loop over the configured rooms and the account's direct rooms (a DM invitation from an account on `MATRIX_SERVER_NAME` is accepted while that Persona's brake is released, and one from any other server is declined), one cursor and one delivery sequence. A delivery carries the sender's Matrix id, the event's `m.mentions` user ids and whether the room is a DM. A media event (`m.image`, `m.file`, `m.audio`, `m.video`) is delivered as a typed text line, `[image filename="cat.png" mime=image/png size=2048 url=mxc://server/id]`, followed by its caption when it has one, in `text` and in context; the wire stays v1. A Persona turn is a tool-less text call and cannot open a file or see an image, so the mouth fetches nothing from the media API. Reading wakes nothing and acks nothing: the heartbeat polls with the non-consuming `gamecult.persona.chat_pending_request.v1`, and only `chat_ack` advances a position. The mouth speaks on a `gamecult.persona.chat_send_request.v1` and joins rooms only while that Persona's brake (`/etc/gamecult/minds//control.cc`) is released. One loopback CultNet RUDP endpoint serves all of them; a request naming an unlisted Persona gets a typed `chat_refusal` (`UnknownPersona`). Document shapes: `tools/persona-chat-documents.mjs`; golden bytes: `tests/fixtures/persona-chat-v1/`. The Discord posting actuator, its permit and its RUDP listener are removed. +Persona speech goes out through Matrix, not Discord. `tools/persona-matrix-mouth.mjs` is the one process for every Persona (`PERSONAS`, a list of slugs): it holds each Persona's Matrix access token as its own systemd credential (`matrix-token-`) and nobody else holds any. Per Persona it keeps one `/sync` loop over the configured rooms and the account's direct rooms (a DM invitation from an account on `MATRIX_SERVER_NAME` is accepted while that Persona's brake is released, and one from any other server is declined), one cursor and one delivery sequence. A delivery carries the sender's Matrix id, the event's `m.mentions` user ids and whether the room is a DM. A media event (`m.image`, `m.file`, `m.audio`, `m.video`) is delivered as a typed text line, `[image filename="cat.png" mime=image/png size=2048 url=mxc://server/id]`, followed by its caption when it has one, in `text` and in context. Only `m.image` is also fetched, and only when `IMAGE_STORE_ROOT` is set (unset, the line above is all there is and nothing is downloaded). The fetch is made as the receiving Persona, with its own token, from `/_matrix/client/v1/media/download//` on its homeserver, for a message the Persona is delivered (not its own words, a room it is not joined to, or history before the ear), and only from the event's own `content.url`; a URL in the message text is never followed. An encrypted attachment (`m.room.encrypted`, or `content.file`) is never fetched. The type is decided by the magic bytes alone (png, jpeg, gif, webp; SVG and anything else is refused, the declared mime is ignored), the body is capped at 5 MiB by `Content-Length` and by the bytes actually read, and the pixel count read from the image header (never decoded) is capped at 40 MP. A refused or failed fetch leaves the typed line with a fixed-word reason (`refused=encrypted|no-url|fetch-failed|too-big|wrong-type|bad-header|too-many-pixels|store-failed`) and no image. A stored image is written to `IMAGE_STORE_ROOT///[.png|.jpg|.gif|.webp]`, the name generated by the mouth, never the sender's: files `0640`, room directories `2750` (the Persona directory is setgid to the Persona's group, so the Persona's reader opens them by group; the mouth is the only writer), each written under a temporary name and renamed. It is deleted once it is at least 24 hours old and its delivery has been acked, whichever is later; a room keeps at most 50 MiB, the oldest evicted first. The sweep runs when an image is stored and when an ack arrives. A delivery is the 12-field tuple of `gamecult.persona.chat_pending.v2`: field 11, after `is_direct`, is nil or `[path, mime, size, sha256]`, a reference and never bytes; `path` is the store-relative `/` above, `mime` the sniffed type, `size` the file length (at most 5 MiB) and `sha256` its lowercase hex digest. The reader re-checks all four against the file. A Persona turn that has no reader for it still sees the typed line. Reading wakes nothing and acks nothing: the heartbeat polls with the non-consuming `gamecult.persona.chat_pending_request.v1`, and only `chat_ack` advances a position. An ack also posts that Persona's public `m.read` receipt, per room, at the newest acked event (fire and forget: the ack never waits on it, a failure is logged once and not retried; the room's next ack covers it); the heartbeat's and a turn's pending calls post none. Her Matrix presence follows her brake: each `/sync` carries `set_presence=online` while it is released and `offline` while it is held, and a round that finds her braked makes one `PUT /presence//status` to offline first (a brake placed mid long-poll shows within `syncTimeoutMs`, 30 s, plus one PUT; a stopped mouth reads offline after Synapse's sync timeout). The mouth speaks on a `gamecult.persona.chat_send_request.v1` and joins rooms only while that Persona's brake (`/etc/gamecult/minds//control.cc`) is released. One loopback CultNet RUDP endpoint serves all of them; a request naming an unlisted Persona gets a typed `chat_refusal` (`UnknownPersona`). Document shapes: `tools/persona-chat-documents.mjs`; golden bytes: `tests/fixtures/persona-chat-v1/`, `-v2/` and `-v3/` (the pending answer; Huginn pins the same bytes). The Discord posting actuator, its permit and its RUDP listener are removed. Bifrost admits an observation only when guild, channel, target runtime, canonical repository, Persona, producer, and producer runtime match a preconfigured `bifrost.persona_feedback.target_binding.v0` document in Bifrost's private provider store. That binding also owns source visibility, data classification, and the delivery-store target. Bifrost never infers public visibility from Discord identifiers. It classifies the author using its own `bifrost.discord.actor_link.v0` state: a match yields `linked_governance_feedback`; absence yields `unlinked_social_feedback`. Neither class grants adoption, work, release, or deployment authority. diff --git a/src/Bifrost.Web/Features/ConceptVotes/VoterKeyResolver.cs b/src/Bifrost.Web/Features/ConceptVotes/VoterKeyResolver.cs index ce9fbec..2948700 100644 --- a/src/Bifrost.Web/Features/ConceptVotes/VoterKeyResolver.cs +++ b/src/Bifrost.Web/Features/ConceptVotes/VoterKeyResolver.cs @@ -1,4 +1,5 @@ using System.Security.Cryptography; +using Bifrost.Web.Features.Shared; using Microsoft.AspNetCore.DataProtection; namespace Bifrost.Web.Features.ConceptVotes; @@ -7,8 +8,8 @@ namespace Bifrost.Web.Features.ConceptVotes; // decides the voter key and class. The cookie holds a protected random id, never a count, class or account. public sealed class VoterKeyResolver(IDataProtectionProvider dataProtection) { - public const string CookieName = "bifrost_voter"; - public const string CookiePath = "/mill"; + public const string CookieName = BifrostCookies.Voter; + public const string CookiePath = BifrostCookies.Path; public static readonly TimeSpan CookieLifetime = TimeSpan.FromDays(365); private const string Purpose = "Bifrost.ConceptVotes.DeviceToken.v1"; diff --git a/src/Bifrost.Web/Features/Heimdall/HeimdallAuthService.cs b/src/Bifrost.Web/Features/Heimdall/HeimdallAuthService.cs index 3e0b3a1..0d39c2f 100644 --- a/src/Bifrost.Web/Features/Heimdall/HeimdallAuthService.cs +++ b/src/Bifrost.Web/Features/Heimdall/HeimdallAuthService.cs @@ -446,13 +446,13 @@ public sealed record HeimdallAccount( /// /// The attempt cookies: a ring of fixed names, so the Cookie header a browser sends to -/// /auth/heimdall is bounded by construction (a worst-case attempt is about 2.4 KB; nginx's line limit is 8 KB). +/// every path is bounded by construction (the __Host- prefix forces Path=/; a worst-case attempt is about 2.4 KB, nginx's line limit is 8 KB). /// A start takes a free slot or overwrites the one expiring first; an overwritten attempt finds no cookie and /// is refused. The attempt's nonce lives inside the protected value, never in the cookie name. /// public static class HeimdallAttemptCookie { - public const string Prefix = "bifrost_heimdall_"; + public const string Prefix = BifrostCookies.HeimdallAttemptPrefix; public const int SlotCount = 2; public static readonly TimeSpan Lifetime = TimeSpan.FromMinutes(10); @@ -465,13 +465,14 @@ public static class HeimdallAttemptCookie HttpOnly = true, Secure = true, SameSite = SameSiteMode.Lax, - Path = "/auth/heimdall", + Path = BifrostCookies.Path, MaxAge = Lifetime }; /// - /// The options a deletion carries: only the attempt cookie's Path, which a cookie is matched on. It carries no - /// Max-Age, which would take precedence over the expiry Delete writes and leave the emptied cookie alive. + /// The options a deletion carries: the attempt cookie's Path, which a cookie is matched on, and Secure, without + /// which a browser ignores a Set-Cookie for a __Host- name. It carries no Max-Age, which would take precedence + /// over the expiry Delete writes and leave the emptied cookie alive. /// - public static CookieOptions DeleteOptions() => new() { Path = "/auth/heimdall" }; + public static CookieOptions DeleteOptions() => new() { Path = BifrostCookies.Path, Secure = true }; } diff --git a/src/Bifrost.Web/Features/Shared/BifrostCookies.cs b/src/Bifrost.Web/Features/Shared/BifrostCookies.cs new file mode 100644 index 0000000..1c099e8 --- /dev/null +++ b/src/Bifrost.Web/Features/Shared/BifrostCookies.cs @@ -0,0 +1,17 @@ +namespace Bifrost.Web.Features.Shared; + +// Every cookie Bifrost sets carries the __Host- prefix: the browser then accepts it only with Secure, Path=/ and no +// Domain, so no sibling subdomain of gamecult.org (the preview host is same-site) can plant or shadow one by setting +// a Domain=gamecult.org cookie of the same name. The prefix forbids a narrower Path, so these all live at Path=/. +public static class BifrostCookies +{ + public const string HostPrefix = "__Host-"; + + public const string Session = HostPrefix + "bifrost_session"; + public const string OAuthCorrelation = HostPrefix + "bifrost_oauth_correlation"; + public const string Antiforgery = HostPrefix + "bifrost_antiforgery"; + public const string Voter = HostPrefix + "bifrost_voter"; + public const string HeimdallAttemptPrefix = HostPrefix + "bifrost_heimdall_"; + + public const string Path = "/"; +} diff --git a/src/Bifrost.Web/Program.cs b/src/Bifrost.Web/Program.cs index d0656d3..c8a524a 100644 --- a/src/Bifrost.Web/Program.cs +++ b/src/Bifrost.Web/Program.cs @@ -76,6 +76,13 @@ builder.Services .AddOptions() .BindConfiguration(ConceptVoteOptions.SectionName); +builder.Services.AddAntiforgery(options => +{ + options.Cookie.Name = BifrostCookies.Antiforgery; + options.Cookie.SecurePolicy = CookieSecurePolicy.Always; + options.Cookie.Path = BifrostCookies.Path; +}); + builder.Services.AddRazorPages(options => { options.Conventions.AuthorizePage("/Membership/Status"); @@ -167,6 +174,10 @@ var authenticationBuilder = builder.Services .AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) .AddCookie(options => { + options.Cookie.Name = BifrostCookies.Session; + options.Cookie.SecurePolicy = CookieSecurePolicy.Always; + options.Cookie.Path = BifrostCookies.Path; + options.Cookie.Domain = null; options.LoginPath = "/auth/sign-in"; options.AccessDeniedPath = "/Membership/Status"; options.SlidingExpiration = true; @@ -183,6 +194,9 @@ if (configuredGitHubOAuthOptions.IsConfigured) options.TokenEndpoint = "https://github.com/login/oauth/access_token"; options.UserInformationEndpoint = "https://api.github.com/user"; options.SaveTokens = true; + options.CorrelationCookie.Name = BifrostCookies.OAuthCorrelation; + options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always; + options.CorrelationCookie.Path = BifrostCookies.Path; options.Scope.Add("read:user"); options.Scope.Add("user:email"); options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "id"); diff --git a/tests/Bifrost.Web.Tests/ConceptVotePageTests.cs b/tests/Bifrost.Web.Tests/ConceptVotePageTests.cs index 5434e8d..d0675d7 100644 --- a/tests/Bifrost.Web.Tests/ConceptVotePageTests.cs +++ b/tests/Bifrost.Web.Tests/ConceptVotePageTests.cs @@ -1,3 +1,4 @@ +using Bifrost.Web.Features.Shared; using System.Net; using System.Text.RegularExpressions; using Bifrost.Web.Data; @@ -14,7 +15,7 @@ namespace Bifrost.Web.Tests; public sealed partial class ConceptVotePageTests : IClassFixture { - private const string CookieName = "bifrost_voter"; + private const string CookieName = BifrostCookies.Voter; private const string Purpose = "Bifrost.ConceptVotes.DeviceToken.v1"; private readonly TestWebApplicationFactory _factory; @@ -40,7 +41,7 @@ public sealed partial class ConceptVotePageTests : IClassFixture { private const string Site = "https://localhost"; - private const string CookieName = "bifrost_voter"; + private const string CookieName = BifrostCookies.Voter; private readonly LimitedFactory _factory; diff --git a/tests/Bifrost.Web.Tests/CookieHardeningTests.cs b/tests/Bifrost.Web.Tests/CookieHardeningTests.cs new file mode 100644 index 0000000..287e8ac --- /dev/null +++ b/tests/Bifrost.Web.Tests/CookieHardeningTests.cs @@ -0,0 +1,100 @@ +using Bifrost.Web.Features.ConceptVotes; +using Bifrost.Web.Features.Heimdall; +using Bifrost.Web.Features.Shared; +using Bifrost.Web.Tests.Support; +using Microsoft.AspNetCore.Antiforgery; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Authentication.OAuth; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +namespace Bifrost.Web.Tests; + +// Every cookie is host-only: __Host- name, Secure, Path=/, no Domain. These pin the literals on purpose, so removing +// the prefix, Secure or Path=/ from any of them fails here and not only in a test that reads the same constant. +public sealed class CookieHardeningTests(CookieHardeningTests.OAuthConfiguredFactory factory) + : IClassFixture +{ + // Program reads GitHubOAuth at startup, before the base factory's in-memory settings land, so the GitHub scheme + // is only registered when the settings arrive as host settings. + public sealed class OAuthConfiguredFactory : TestWebApplicationFactory + { + protected override void ConfigureWebHost(Microsoft.AspNetCore.Hosting.IWebHostBuilder builder) + { + builder.UseSetting("GitHubOAuth:ClientId", "configured-for-tests"); + builder.UseSetting("GitHubOAuth:ClientSecret", "configured-for-tests"); + base.ConfigureWebHost(builder); + } + } + + [Fact] + public void Cookie_names_carry_the_host_prefix_and_live_at_the_root() + { + Assert.Equal("__Host-bifrost_session", BifrostCookies.Session); + Assert.Equal("__Host-bifrost_oauth_correlation", BifrostCookies.OAuthCorrelation); + Assert.Equal("__Host-bifrost_antiforgery", BifrostCookies.Antiforgery); + Assert.Equal("__Host-bifrost_voter", VoterKeyResolver.CookieName); + Assert.Equal("__Host-bifrost_heimdall_", HeimdallAttemptCookie.Prefix); + Assert.All(HeimdallAttemptCookie.SlotNames, x => Assert.StartsWith("__Host-", x, StringComparison.Ordinal)); + Assert.Equal("/", BifrostCookies.Path); + Assert.Equal("/", VoterKeyResolver.CookiePath); + } + + [Fact] + public void Session_cookie_is_host_only() + { + var cookie = factory.Services.GetRequiredService>() + .Get(CookieAuthenticationDefaults.AuthenticationScheme).Cookie; + AssertHostOnly(cookie.Name, cookie.SecurePolicy, cookie.Path, cookie.Domain); + Assert.True(cookie.HttpOnly); + } + + [Fact] + public void Oauth_correlation_cookie_is_host_only() + { + var cookie = factory.Services.GetRequiredService>().Get("GitHub").CorrelationCookie; + AssertHostOnly(cookie.Name, cookie.SecurePolicy, cookie.Path, cookie.Domain); + Assert.True(cookie.HttpOnly); + } + + [Fact] + public void Antiforgery_cookie_is_host_only() + { + var cookie = factory.Services.GetRequiredService>().Value.Cookie; + AssertHostOnly(cookie.Name, cookie.SecurePolicy, cookie.Path, cookie.Domain); + } + + [Fact] + public void Voter_and_attempt_cookies_set_secure_root_path_and_no_domain() + { + var context = new DefaultHttpContext(); + new VoterKeyResolver(new Microsoft.AspNetCore.DataProtection.EphemeralDataProtectionProvider()).Mint(context); + context.Response.Cookies.Append("__Host-bifrost_heimdall_0", "v", HeimdallAttemptCookie.Options()); + var deletion = new DefaultHttpContext(); + deletion.Response.Cookies.Delete("__Host-bifrost_heimdall_0", HeimdallAttemptCookie.DeleteOptions()); + + var headers = context.Response.Headers.SetCookie.Concat(deletion.Response.Headers.SetCookie).ToArray(); + Assert.Equal(3, headers.Length); + foreach (var header in headers) + { + var attributes = header!.Split(';').Select(x => x.Trim().ToLowerInvariant()).ToArray(); + Assert.StartsWith("__host-", attributes[0], StringComparison.Ordinal); + Assert.Contains("path=/", attributes); + Assert.DoesNotContain(attributes, x => x.StartsWith("domain", StringComparison.Ordinal)); + } + + // A browser ignores a __Host- Set-Cookie that lacks Secure, a deletion included. + Assert.All(headers, header => Assert.Contains("secure", header!.Split(';').Select(x => x.Trim().ToLowerInvariant()))); + Assert.All(headers.Take(2), header => + Assert.Contains("httponly", header!.Split(';').Select(x => x.Trim().ToLowerInvariant()))); + } + + private static void AssertHostOnly(string? name, CookieSecurePolicy secure, string? path, string? domain) + { + Assert.StartsWith("__Host-", name, StringComparison.Ordinal); + Assert.Equal(CookieSecurePolicy.Always, secure); + Assert.Equal("/", path); + Assert.Null(domain); + } +} diff --git a/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs b/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs index 3439b43..532f669 100644 --- a/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs +++ b/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs @@ -49,6 +49,29 @@ public sealed class HeimdallCompletionTests private static void AssertTokenRefused(HeimdallHost host, string rule) => AssertLogged(host, $"Heimdall token refused: {rule}."); + /// A __Host- cookie is only deleted by a Set-Cookie that is itself Secure at Path=/; a browser ignores any other. + private static void AssertAttemptCookieCleared(string? header) + { + Assert.NotNull(header); + var attributes = header!.Split(';').Select(x => x.Trim().ToLowerInvariant()).ToArray(); + Assert.Contains(attributes, x => x.StartsWith("expires=", StringComparison.Ordinal) && x.Contains("1970")); + Assert.Contains("secure", attributes); + Assert.Contains("path=/", attributes); + Assert.DoesNotContain(attributes, x => x.StartsWith("domain", StringComparison.Ordinal)); + } + + [Fact] + public async Task A_refused_completion_clears_the_attempt_cookie_with_a_set_cookie_the_browser_honours() + { + using var host = new HeimdallHost(); + var attempt = await host.StartAsync(); + + var refused = await host.CompleteAsync(attempt.Nonce, "unknown", attempt.Cookie); + + AssertRefusedRedirect(refused); + AssertAttemptCookieCleared(HeimdallHost.SetCookieHeader(refused.Response, attempt.CookieName!)); + } + private static void AssertRefusedRedirect(CompletionResult result) { Assert.Equal(HttpStatusCode.Redirect, result.Response.StatusCode); @@ -81,8 +104,7 @@ public sealed class HeimdallCompletionTests Assert.Equal(MembershipStatus.Authenticated, account.Membership!.Status); Assert.Empty(account.Membership.RoleAssignments); var cleared = HeimdallHost.SetCookieHeader(done.Response, attempt.CookieName!); - Assert.NotNull(cleared); - Assert.Contains("1970", cleared); + AssertAttemptCookieCleared(cleared); var again = await host.CompleteAsync(attempt, code); @@ -526,7 +548,7 @@ public sealed class HeimdallCompletionTests Assert.Contains("httponly", attributes); Assert.Contains("secure", attributes); Assert.Contains("samesite=lax", attributes); - Assert.Contains("path=/auth/heimdall", attributes); + Assert.Contains("path=/", attributes); Assert.Contains("max-age=600", attributes); Assert.NotEqual(first.Cookie, second.Cookie); Assert.DoesNotContain(first.Nonce, first.Cookie!); @@ -564,7 +586,7 @@ public sealed class HeimdallCompletionTests Assert.Contains("