feat(worker): expose maxParallelExecutions in get_app_settings

The list-handler prompt (MergeHelperDefault) tells the handler to read
maxParallelExecutions via get_app_settings, but the DTO never carried
the field. Handler had to fall back to reading app_settings directly
from the DB on the 2026-07-29 E2E run.
This commit is contained in:
mika kuns
2026-07-29 12:06:52 +02:00
parent db447f36da
commit e653677487
3 changed files with 35 additions and 2 deletions
@@ -0,0 +1,31 @@
using ClaudeDo.Data.Models;
using ClaudeDo.Worker.External;
using ClaudeDo.Worker.Tests.Infrastructure;
using Microsoft.EntityFrameworkCore;
namespace ClaudeDo.Worker.Tests.External;
public sealed class AppSettingsMcpToolsTests : IDisposable
{
private readonly DbFixture _db = new();
public void Dispose() => _db.Dispose();
[Fact]
public async Task GetAppSettings_ReturnsMaxParallelExecutionsFromDb()
{
using (var ctx = _db.CreateContext())
{
var row = await ctx.AppSettings.FirstOrDefaultAsync(s => s.Id == AppSettingsEntity.SingletonId)
?? throw new InvalidOperationException("Expected seeded app_settings row.");
row.MaxParallelExecutions = 3;
await ctx.SaveChangesAsync();
}
var sut = new AppSettingsMcpTools(_db.CreateFactory());
var result = await sut.GetAppSettings(CancellationToken.None);
Assert.Equal(3, result.MaxParallelExecutions);
}
}