Reuse Odin fixture for product route witnesses

This commit is contained in:
Meta Vens 2026-08-18 02:18:56 +02:00
commit 989253a208
2 changed files with 21 additions and 5 deletions

View file

@ -36,12 +36,12 @@ static async Task RunOdinAsync(Args arguments)
throw new ArgumentException("The Odin fixture requires --provider-endpoint.");
using var catalog = new CultMeshVerseCatalog();
catalog.Upsert(new CultMeshVerseDescriptor(
"sample.counter",
"CultMesh browser counter",
arguments.VerseId,
arguments.VerseName,
CultMeshVerseAuthorityModel.OperatorCluster,
new CultMeshVerseCompatibility("cultmesh.v1", "sample-counter-v1"),
new CultMeshVerseCompatibility(arguments.TransportVersion, arguments.RulesHash),
discoveryEndpoints: [arguments.ProviderEndpoint],
authorityRuntimeIds: ["sample.counter-provider"],
authorityRuntimeIds: [arguments.AuthorityRuntimeId],
description: "Local executable Odin fixture for the browser/network onboarding witness."));
await using var schemaServer = new CultNetWebSocketSchemaServer();
@ -192,6 +192,11 @@ sealed class Args
public string Endpoint { get; private init; } = "";
public string ProviderEndpoint { get; private init; } = "";
public string Token { get; private init; } = "sample-session";
public string VerseId { get; private init; } = "sample.counter";
public string VerseName { get; private init; } = "CultMesh browser counter";
public string AuthorityRuntimeId { get; private init; } = "sample.counter-provider";
public string TransportVersion { get; private init; } = "cultmesh.v1";
public string RulesHash { get; private init; } = "sample-counter-v1";
public static Args Parse(string[] values)
{
@ -206,7 +211,12 @@ sealed class Args
StatePath = named.GetValueOrDefault("--state", "sample-counter.cc"),
Endpoint = named.GetValueOrDefault("--endpoint", ""),
ProviderEndpoint = named.GetValueOrDefault("--provider-endpoint", ""),
Token = named.GetValueOrDefault("--token", "sample-session")
Token = named.GetValueOrDefault("--token", "sample-session"),
VerseId = named.GetValueOrDefault("--verse-id", "sample.counter"),
VerseName = named.GetValueOrDefault("--verse-name", "CultMesh browser counter"),
AuthorityRuntimeId = named.GetValueOrDefault("--authority-runtime-id", "sample.counter-provider"),
TransportVersion = named.GetValueOrDefault("--transport-version", "cultmesh.v1"),
RulesHash = named.GetValueOrDefault("--rules-hash", "sample-counter-v1")
};
}
}

View file

@ -24,3 +24,9 @@ the local Odin fixture, and requires the still-open browser to rediscover the
route, resubscribe, execute a second command, and preserve the durable count.
The fixture speaks the production Verse-catalog contract; a deployment smoke
against the full Odin daemon remains a separate infrastructure gate.
The `odin` fixture defaults to this sample's Verse, but its `--verse-id`,
`--verse-name`, `--authority-runtime-id`, `--transport-version`, and
`--rules-hash` arguments can advertise another real provider during a product
route-rotation witness. The provider endpoint remains data owned by Odin; the
consumer still connects only by stable Verse and provider identity.