feat(awooop): classify callback trace gaps
All checks were successful
CD Pipeline / tests (push) Successful in 1m33s
Code Review / ai-code-review (push) Successful in 12s
CD Pipeline / build-and-deploy (push) Successful in 3m32s
CD Pipeline / post-deploy-checks (push) Successful in 1m33s

This commit is contained in:
Your Name
2026-05-25 21:32:37 +08:00
parent f52fdebe0a
commit 32e172ed8b
7 changed files with 159 additions and 7 deletions

View File

@@ -160,6 +160,8 @@ interface CallbackReplyAuditSummary {
outbound_reply_markup_missing_trace_ref_recent_1h_total?: number;
outbound_reply_markup_missing_trace_ref_recent_24h_total?: number;
outbound_reply_markup_missing_trace_ref_latest_sent_at?: string | null;
outbound_reply_markup_trace_ref_gap_status?: string | null;
outbound_reply_markup_trace_ref_gap_next_action?: string | null;
outbound_reply_markup_missing_incident_ref_top_prefixes?: Array<{
prefix?: string | null;
total?: number | null;
@@ -2527,6 +2529,22 @@ function CallbackReplyAuditSummaryPanel({
const latestMissingIncidentRef = formatShortDateTime(
summary.outbound_reply_markup_missing_incident_ref_latest_sent_at
);
const traceGapStatusRaw =
summary.outbound_reply_markup_trace_ref_gap_status ?? "observed";
const traceGapStatusKey = (
traceGapStatusRaw === "clean" ||
traceGapStatusRaw === "active_gap" ||
traceGapStatusRaw === "recent_backlog" ||
traceGapStatusRaw === "legacy_backlog"
) ? traceGapStatusRaw : "observed";
const traceGapNextActionRaw =
summary.outbound_reply_markup_trace_ref_gap_next_action ?? "observed";
const traceGapNextActionKey = (
traceGapNextActionRaw === "none" ||
traceGapNextActionRaw === "inspect_recent_outbound_source_refs" ||
traceGapNextActionRaw === "watch_24h_decay" ||
traceGapNextActionRaw === "backfill_or_archive_legacy_callbacks"
) ? traceGapNextActionRaw : "observed";
const snapshotClass = {
captured: "border-[#9bc7a4] bg-[#f0faf2] text-[#17602a]",
partial: "border-[#d9b36f] bg-[#fff7e8] text-[#8a5a08]",
@@ -2573,6 +2591,12 @@ function CallbackReplyAuditSummaryPanel({
latest: latestMissingTraceRef,
})}
</p>
<p className="mt-1 text-xs font-semibold leading-5 text-[#141413]">
{t("outboundReplyMarkupTraceDecision", {
status: t(`traceGapStatuses.${traceGapStatusKey}` as never),
action: t(`traceGapNextActions.${traceGapNextActionKey}` as never),
})}
</p>
<p className="mt-1 text-xs leading-5 text-[#5f5b52]">
{t("outboundReplyMarkupIncidentFreshness", {
recent1h: