Skip to content

Commit 1a5d0c3

Browse files
committed
llms mess
1 parent 66fe50e commit 1a5d0c3

247 files changed

Lines changed: 819 additions & 2168 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ Release retain their separate responsibilities and least-privilege permissions.
193193

194194
## Dependency ownership and delivery
195195

196+
Version increases require the owner's explicit permission for that specific increase. This includes packages, releases, grain interfaces, protocol versions, serializer aliases and persisted/public contracts. Cleanup, refactoring, contract changes and standing delivery authorization do not authorize a version increase.
197+
196198
`ManagedCode.*` projects and packages are ours. A confirmed defect is fixed in its
197199
owning sibling repository after reading its policy. Do not replace the dependency,
198200
copy its implementation or hide the defect with a consumer workaround.

‎KeyLoad.slnx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<Solution>
22
<Folder Name="/src/">
3-
<Project Path="src/KeyLoad.Replication/KeyLoad.Replication.csproj" />
43
<Project Path="src/KeyLoad.Abstractions/KeyLoad.Abstractions.csproj" />
54
<Project Path="src/KeyLoad.Core/KeyLoad.Core.csproj" />
65
<Project Path="src/KeyLoad.Diagnostics/KeyLoad.Diagnostics.csproj" />

‎src/KeyLoad.Abstractions/AdminDashboard/Contracts/AdminNodeSnapshot.cs‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace KeyLoad;
44

55
/// <summary>Administrator-authorized observation of the actual executing node.</summary>
66
/// <param name="CapturedAt">Node capture time for process counter sampling.</param>
7-
/// <param name="Node">Actual physical status; never implies all voters are healthy.</param>
7+
/// <param name="Node">Actual physical status; native membership supplies each silo status.</param>
88
/// <param name="Admission">Current node command and HTTP occupancy, not throughput.</param>
99
/// <param name="Storage">Bounded physical file observation.</param>
1010
/// <param name="Http">Actual process HTTP observations.</param>
@@ -13,16 +13,13 @@ namespace KeyLoad;
1313
public sealed record AdminNodeSnapshot([property: Orleans.Id(0)] DateTimeOffset CapturedAt, [property: Orleans.Id(1)] NodeStatus Node, [property: Orleans.Id(2)] NodeAdmissionStatus Admission,
1414
[property: Orleans.Id(3)] AdminStorageSnapshot Storage, [property: Orleans.Id(4)] AdminHttpSnapshot Http)
1515
{
16-
/// <summary>Gets the configured voter identity of the executing node, comparable with the reported leader.</summary>
16+
/// <summary>Gets the executing native Orleans silo name.</summary>
1717
[Orleans.Id(5)]
18-
public string? LocalVoter
19-
{
20-
get; init;
21-
}
18+
public string? SiloName { get; init; }
2219

23-
/// <summary>Gets the configured voter membership; membership never implies that another voter is healthy.</summary>
20+
/// <summary>Gets active silo names directly from native Orleans membership.</summary>
2421
[Orleans.Id(6)]
25-
public ImmutableArray<string> Voters { get; init; } = [];
22+
public ImmutableArray<string> ActiveSilos { get; init; } = [];
2623

2724
/// <summary>Gets bounded native derived history of this physical node; null when the embedding host provides none.</summary>
2825
[Orleans.Id(7)]
Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
namespace KeyLoad;
22

3-
/// <summary>Reports node identity, replication progress, and readiness.</summary>
4-
/// <param name="NodeId">The canonical persisted physical storage owner identifier, formatted as a GUID.</param>
5-
/// <param name="Incarnation">The unique identifier for this process incarnation.</param>
6-
/// <param name="Applied">The highest committed position applied by this node.</param>
7-
/// <param name="Leader">The current leader identifier, if known.</param>
8-
/// <param name="Voters">The number of voting nodes in the cluster.</param>
9-
/// <param name="Durability">The configured durability profile.</param>
10-
/// <param name="RoutingReady">Whether the node is ready to receive routed requests.</param>
11-
/// <param name="ProcessId">The operating system process identifier.</param>
12-
/// <param name="ReadGeneration">The generation of the node's read view.</param>
13-
[Orleans.GenerateSerializer]
14-
[Orleans.Alias(NativeContractAliases.NodeStatus)]
15-
public sealed record NodeStatus([property: Orleans.Id(0)] string NodeId, [property: Orleans.Id(1)] Guid Incarnation, [property: Orleans.Id(2)] long Applied, [property: Orleans.Id(3)] string? Leader, [property: Orleans.Id(4)] int Voters, [property: Orleans.Id(5)] DurabilityProfile Durability, [property: Orleans.Id(6)] bool RoutingReady, [property: Orleans.Id(7)] int ProcessId,
16-
[property: Orleans.Id(8)] long ReadGeneration = NodeStatus.DefaultReadGeneration)
17-
{
18-
/// <summary>Gets the current native consensus term from the same locked status snapshot.</summary>
19-
[Orleans.Id(9)]
20-
public long ConsensusTerm
21-
{
22-
get; init;
23-
}
24-
25-
private const int DefaultReadGeneration = 0;
26-
}
3+
/// <summary>Reports this physical store, native Orleans membership count and configured data-copy requirement.</summary>
4+
/// <param name="NodeId">Persisted physical store identifier.</param>
5+
/// <param name="Incarnation">Persisted database incarnation.</param>
6+
/// <param name="Position">Local ZoneTree position; positions on different stores are not interchangeable read tokens.</param>
7+
/// <param name="SiloCount">Active silos observed by native Orleans membership.</param>
8+
/// <param name="ReplicaCount">Required persisted copies for a successful write.</param>
9+
/// <param name="Durability">Actual database durability contract.</param>
10+
/// <param name="RoutingReady">Whether native runtime and database startup completed.</param>
11+
/// <param name="ProcessId">Operating system process identifier.</param>
12+
/// <param name="ReadGeneration">Current physical store read generation.</param>
13+
[Orleans.GenerateSerializer, Orleans.Alias(NativeContractAliases.NodeStatus)]
14+
public sealed record NodeStatus([property: Orleans.Id(0)] string NodeId,
15+
[property: Orleans.Id(1)] Guid Incarnation, [property: Orleans.Id(2)] long Position,
16+
[property: Orleans.Id(3)] int SiloCount, [property: Orleans.Id(4)] int ReplicaCount,
17+
[property: Orleans.Id(5)] DurabilityProfile Durability, [property: Orleans.Id(6)] bool RoutingReady,
18+
[property: Orleans.Id(7)] int ProcessId, [property: Orleans.Id(8)] long ReadGeneration);

src/KeyLoad.Replication/ClusterReplication/Configuration/ReplicaCopyOptions.cs renamed to src/KeyLoad.Clustering/ClusterReplication/Configuration/ReplicaCopyOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Microsoft.Extensions.Options;
22

3-
namespace KeyLoad.Replication;
3+
namespace KeyLoad.Clustering;
44

55
/// <summary>Independent deployment size and required durable data copies.</summary>
66
[ConfigurationOptions]

src/KeyLoad.Replication/ClusterReplication/Contracts/IDatabaseCommitGrain.cs renamed to src/KeyLoad.Clustering/ClusterReplication/Contracts/IDatabaseCommitGrain.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
namespace KeyLoad.Replication;
1+
using Orleans.CodeGeneration;
2+
3+
namespace KeyLoad.Clustering;
24

35
/// <summary>Native Orleans scheduling for commands sharing one database's atomic metadata.</summary>
4-
[Alias(StorageCopyContract.GrainAlias)]
6+
[Version(BackgroundWorkerIdentity.InterfaceVersion)]
57
public interface IDatabaseCommitGrain : IGrainWithGuidKey
68
{
79
/// <summary>Returns only after every configured data copy has persisted the same operation.</summary>
8-
[Alias(StorageCopyContract.Apply)]
910
Task<OperationResult> ApplyAsync(ReplicatedOperation operation, CancellationToken cancellationToken);
1011
/// <summary>Requires matching durable copies before admitting a read.</summary>
11-
[Alias(StorageCopyContract.ReadCut)]
1212
Task<SiloStorageCut> ReadCutAsync(CancellationToken cancellationToken);
1313
}

src/KeyLoad.Replication/ClusterReplication/Contracts/ISiloDatabaseService.cs renamed to src/KeyLoad.Clustering/ClusterReplication/Contracts/ISiloDatabaseService.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
using Orleans.Services;
22

3-
namespace KeyLoad.Replication;
3+
using Orleans.CodeGeneration;
4+
5+
namespace KeyLoad.Clustering;
46

57
/// <summary>Typed Orleans access to one silo's exclusively owned ZoneTree database.</summary>
6-
[Alias(StorageCopyContract.ServiceAlias)]
8+
[Version(BackgroundWorkerIdentity.InterfaceVersion)]
79
public interface ISiloDatabaseService : IGrainService
810
{
911
/// <summary>Reads the durable local cut without changing storage.</summary>
10-
[Alias(StorageCopyContract.Cut)]
1112
Task<SiloStorageCut> ReadCutAsync(CancellationToken cancellationToken);
1213
/// <summary>Evaluates business time and deterministic command decisions at the selected store.</summary>
13-
[Alias(StorageCopyContract.Prepare)]
1414
Task<ReplicatedOperation> PrepareAsync(ReplicatedOperation operation, CancellationToken cancellationToken);
1515
/// <summary>Applies exactly the prepared operation through ZoneTree's atomic commit gate.</summary>
16-
[Alias(StorageCopyContract.Apply)]
1716
Task<OperationResult> ApplyAsync(ReplicatedOperation operation, CancellationToken cancellationToken);
1817
}

src/KeyLoad.Replication/ClusterReplication/Contracts/SiloStorageCut.cs renamed to src/KeyLoad.Clustering/ClusterReplication/Contracts/SiloStorageCut.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
namespace KeyLoad.Replication;
1+
namespace KeyLoad.Clustering;
22

33
/// <summary>Actual persisted store identity and local cut; this contains no cluster authority.</summary>
4-
[GenerateSerializer, Alias(StorageCopyContract.CutAlias)]
4+
[GenerateSerializer]
55
public sealed record SiloStorageCut([property: Id(0)] Guid Incarnation,
66
[property: Id(1)] long Position);

src/KeyLoad.Replication/ClusterReplication/Contracts/StorageCopyContract.cs renamed to src/KeyLoad.Clustering/ClusterReplication/Contracts/StorageCopyContract.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
namespace KeyLoad.Replication;
1+
namespace KeyLoad.Clustering;
22

33
internal static class StorageCopyContract
44
{
55
internal const int MinimumCount = 1;
66
internal const int FirstOwner = 0;
7-
internal const string ServiceAlias = "keyload.silo-database-service";
8-
internal const string GrainAlias = "keyload.database-commit-grain";
9-
internal const string CutAlias = "keyload.silo-storage-cut";
10-
internal const string ReadCut = "read-cut";
11-
internal const string Cut = "cut";
12-
internal const string Prepare = "prepare";
13-
internal const string Apply = "apply";
147
internal const string InvalidIncarnation = "A database incarnation is required.";
158
internal const string InvalidCounts = "SiloCount and ReplicaCount must be positive; ReplicaCount cannot exceed SiloCount.";
169
internal const string DifferentOutcomes = "The persisted data-copy outcomes differ.";

src/KeyLoad.Replication/ClusterReplication/Execution/SiloCommandCoordinator.cs renamed to src/KeyLoad.Clustering/ClusterReplication/Execution/SiloCommandCoordinator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using KeyLoad.Core;
22

3-
namespace KeyLoad.Replication;
3+
namespace KeyLoad.Clustering;
44

55
/// <summary>Submits authorized native operations to Orleans; it owns no cluster lifecycle or protocol.</summary>
66
public sealed class SiloCommandCoordinator(DatabaseEngine database, IGrainFactory grains) : ICommitCoordinator

0 commit comments

Comments
 (0)