feat(dqo): deploy tip-dqo self-heal orchestrator
- escalation-sink: add NTFY_TOKEN Bearer auth header support - self-heal-guards: pass max_load from GuardConfig to isLoadAcceptable - control-loop: include MAX_LOAD in guardConfig so DQO_MAX_LOAD env is respected
This commit is contained in:
parent
201f5d3a47
commit
3e0750eb3c
@ -83,6 +83,7 @@ function guardConfig(t: Target): GuardConfig {
|
||||
budget_per_day: t.budget_per_day,
|
||||
max_backoff_hours: t.max_backoff_hours,
|
||||
circuit_breaker_strikes: t.circuit_breaker_strikes,
|
||||
max_load: MAX_LOAD,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ export async function notify(
|
||||
Title: title,
|
||||
Priority: level === "page" ? "high" : "default",
|
||||
Tags: level === "page" ? "rotating_light" : "warning",
|
||||
...(process.env.NTFY_TOKEN ? { Authorization: `Bearer ${process.env.NTFY_TOKEN}` } : {}),
|
||||
},
|
||||
body,
|
||||
signal: AbortSignal.timeout(10_000),
|
||||
|
||||
@ -22,6 +22,7 @@ export interface GuardConfig {
|
||||
budget_per_day: number;
|
||||
max_backoff_hours: number;
|
||||
circuit_breaker_strikes: number;
|
||||
max_load?: number;
|
||||
}
|
||||
|
||||
/** Facts read from the self_heal_dispatch ledger for one source. */
|
||||
@ -118,7 +119,7 @@ export function canDispatch(
|
||||
budgetOk(facts, cfg),
|
||||
minIntervalOk(facts, cfg, now),
|
||||
backoffElapsed(facts, cfg, now),
|
||||
isLoadAcceptable(load1),
|
||||
isLoadAcceptable(load1, cfg.max_load),
|
||||
];
|
||||
const failed = checks.find((c) => !c.allow);
|
||||
return failed ?? { allow: true, reason: "all guardrails passed" };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user