feat(esg): TimeoutSeconds travels the artifact pipeline (additive contract) into site SQLite so site-side calls honor it

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-10 04:07:11 -04:00
parent 86d1a5cbf2
commit e3ef320359
7 changed files with 40 additions and 10 deletions
@@ -54,6 +54,26 @@ public class SiteRepositoryTests : IDisposable
Assert.Equal("https://api.example.com", all[0].EndpointUrl);
}
/// <summary>
/// ExternalSystemGateway (Timeout): the per-system <c>TimeoutSeconds</c> stored via
/// <see cref="SiteStorageService.StoreExternalSystemAsync"/> must round-trip through the
/// site SQLite store and back out via the repository, so site-side calls honor it.
/// </summary>
[Fact]
public async Task SiteStorage_ExternalSystem_TimeoutSeconds_RoundTrips()
{
var storage = NewStorage();
await storage.InitializeAsync();
await storage.StoreExternalSystemAsync(
"WeatherApi", "https://api.example.com", "ApiKey", "{\"key\":\"x\"}", null, 7);
var repo = new SiteExternalSystemRepository(storage);
var found = await repo.GetExternalSystemByNameAsync("WeatherApi");
Assert.NotNull(found);
Assert.Equal(7, found!.TimeoutSeconds);
}
/// <summary>
/// SiteRuntime-007: the synthetic ID for an external system must be identical when
/// the storage service and repository are re-created (simulating a process restart).