c41e5063b7
Removed entire kbx-foundation-v36 directory as it's been replaced by the new KBX Foundation v4 patterns implemented in this session: - Registry-driven screen definitions - Density-aware UI adapter components - Feature module templates (ShadowRun, Models) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
12 lines
617 B
C#
12 lines
617 B
C#
namespace Kbx.Shared.Experiments;
|
|
// Schedule hourly at most. This is an operational safety net, not a statistical significance engine.
|
|
public sealed class KbxExperimentGuardrailJob(KbxExperimentOverviewQuery query,KbxExperimentRuntimeStore store)
|
|
{
|
|
public async Task ExecuteAsync(Guid tenantId,CancellationToken ct)
|
|
{
|
|
var overview=await query.ExecuteAsync(tenantId,ct);
|
|
foreach(var item in overview.Items.Where(x=>x.State=="running"&&x.Decision=="guardrail-breach"))
|
|
await store.RollbackAsync(tenantId,Guid.Empty,item.ExperimentId,"automatic guardrail rollback",null,ct);
|
|
}
|
|
}
|