feat(governance): show callback owner review triage
This commit is contained in:
@@ -307,11 +307,25 @@ interface KmStaleCallbackOwnerReviewWorkItem {
|
||||
target_surface?: string | null;
|
||||
target_href?: string | null;
|
||||
work_item_href?: string | null;
|
||||
triage?: KmStaleCallbackOwnerReviewTriage | null;
|
||||
writes_on_read?: boolean | null;
|
||||
manual_review_required?: boolean | null;
|
||||
batch_writes_allowed?: boolean | null;
|
||||
}
|
||||
|
||||
interface KmStaleCallbackOwnerReviewTriage {
|
||||
schema_version?: string;
|
||||
flow_stage?: string | null;
|
||||
ai_lead_agent?: string | null;
|
||||
supporting_agents?: string[];
|
||||
automation_state?: string | null;
|
||||
safe_to_auto_repair?: boolean | null;
|
||||
blocking_reason?: string | null;
|
||||
matching_strategy?: string | null;
|
||||
already_done?: string[];
|
||||
next_actions?: string[];
|
||||
}
|
||||
|
||||
interface KmStaleCompletionSummary {
|
||||
schema_version?: string;
|
||||
project_id?: string | null;
|
||||
@@ -1488,6 +1502,7 @@ function CallbackKmCompletionSummary({
|
||||
? summary.related_items[0]
|
||||
: null;
|
||||
const workItem = summary.work_item?.status === "open" ? summary.work_item : null;
|
||||
const triage = workItem?.triage ?? null;
|
||||
|
||||
return (
|
||||
<div className="mt-3 border-t border-[#e0ddd4] pt-3">
|
||||
@@ -1540,6 +1555,33 @@ function CallbackKmCompletionSummary({
|
||||
{t("openWorkItem")}
|
||||
</Link>
|
||||
) : null}
|
||||
{triage ? (
|
||||
<div className="mt-2 grid gap-1 text-xs text-[#5f5b52]">
|
||||
<p>
|
||||
{t("triageFlow", {
|
||||
stage: triage.flow_stage ?? "--",
|
||||
strategy: triage.matching_strategy ?? "--",
|
||||
})}
|
||||
</p>
|
||||
<p>
|
||||
{t("triageAgents", {
|
||||
lead: triage.ai_lead_agent ?? "--",
|
||||
support: triage.supporting_agents?.join(" / ") || "--",
|
||||
})}
|
||||
</p>
|
||||
<p>
|
||||
{t("triageAutomation", {
|
||||
state: triage.automation_state ?? "--",
|
||||
safe: String(triage.safe_to_auto_repair ?? false),
|
||||
})}
|
||||
</p>
|
||||
<p>
|
||||
{t("triageBlocker", {
|
||||
reason: triage.blocking_reason ?? "--",
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -784,11 +784,25 @@ type KmStaleCallbackOwnerReviewWorkItem = {
|
||||
target_surface?: string | null;
|
||||
target_href?: string | null;
|
||||
work_item_href?: string | null;
|
||||
triage?: KmStaleCallbackOwnerReviewTriage | null;
|
||||
writes_on_read?: boolean | null;
|
||||
manual_review_required?: boolean | null;
|
||||
batch_writes_allowed?: boolean | null;
|
||||
};
|
||||
|
||||
type KmStaleCallbackOwnerReviewTriage = {
|
||||
schema_version?: string;
|
||||
flow_stage?: string | null;
|
||||
ai_lead_agent?: string | null;
|
||||
supporting_agents?: string[];
|
||||
automation_state?: string | null;
|
||||
safe_to_auto_repair?: boolean | null;
|
||||
blocking_reason?: string | null;
|
||||
matching_strategy?: string | null;
|
||||
already_done?: string[];
|
||||
next_actions?: string[];
|
||||
};
|
||||
|
||||
type KmStaleCallbackCompletionSummary = {
|
||||
schema_version?: string;
|
||||
status?: string | null;
|
||||
@@ -1584,6 +1598,7 @@ function buildWorkItems(
|
||||
const latestCallbackSummary =
|
||||
latestCallbackOwnerReview?.km_stale_completion_summary ?? null;
|
||||
const latestCallbackWorkItem = latestCallbackSummary?.work_item ?? null;
|
||||
const latestCallbackTriage = latestCallbackWorkItem?.triage ?? null;
|
||||
const remediationQueue = telemetry.slo?.adr100?.verification_coverage?.remediation_queue;
|
||||
const remediationTotal = remediationQueue?.total ?? 0;
|
||||
const remediationReadyForAi = remediationQueue?.ready_for_ai ?? 0;
|
||||
@@ -1803,6 +1818,21 @@ function buildWorkItems(
|
||||
t("evidence.callbackOwnerReviewNext", {
|
||||
next: latestCallbackWorkItem?.next_step ?? "--",
|
||||
}),
|
||||
t("evidence.callbackOwnerReviewFlow", {
|
||||
stage: latestCallbackTriage?.flow_stage ?? "--",
|
||||
strategy: latestCallbackTriage?.matching_strategy ?? "--",
|
||||
}),
|
||||
t("evidence.callbackOwnerReviewAgents", {
|
||||
lead: latestCallbackTriage?.ai_lead_agent ?? "--",
|
||||
support: latestCallbackTriage?.supporting_agents?.join(" / ") || "--",
|
||||
}),
|
||||
t("evidence.callbackOwnerReviewAutomation", {
|
||||
state: latestCallbackTriage?.automation_state ?? "--",
|
||||
safe: String(latestCallbackTriage?.safe_to_auto_repair ?? false),
|
||||
}),
|
||||
t("evidence.callbackOwnerReviewBlocker", {
|
||||
reason: latestCallbackTriage?.blocking_reason ?? "--",
|
||||
}),
|
||||
]
|
||||
: [t("evidence.callbackOwnerReviewEmpty")],
|
||||
href: latestCallbackWorkItem?.target_href ?? "/awooop/runs",
|
||||
|
||||
Reference in New Issue
Block a user