fix(ui): schema-library delete-audit name + busy guard + edit-row guard + sanitized create-race test (#260)

This commit is contained in:
Joseph Doherty
2026-06-19 03:28:11 -04:00
parent e3b83f8561
commit 8f85cce298
5 changed files with 121 additions and 11 deletions
@@ -31,8 +31,11 @@ public sealed class SchemaLibraryQueryService : ISchemaLibraryQueryService
var repo = scope.ServiceProvider.GetRequiredService<ISharedSchemaRepository>();
var all = await repo.ListAsync(cancellationToken);
// Ordinal-keyed to match the lib:Name resolver's exact-name lookup. Last-wins on
// the (DB-unique) name guards against a transient duplicate read.
// Ordinal-keyed to match the lib:Name resolver's exact-name lookup. Name is
// DB-unique, so a list yields at most one row per name and no real collision
// occurs; the indexer assignment is defensive only — should two rows ever share
// a name (e.g. a mid-write transient read), the later one in enumeration order
// overwrites the earlier rather than throwing.
var map = new Dictionary<string, string>(StringComparer.Ordinal);
foreach (var schema in all)
{