Add chart freshness diagnostics

This commit is contained in:
2569718930@qq.com
2026-06-10 15:34:34 +08:00
parent ba012736c9
commit 5a7d302d11
14 changed files with 833 additions and 42 deletions
@@ -71,6 +71,26 @@ export function runTests() {
/partial:\s*true/,
"city detail batch proxy timeout fallback should preserve partial response semantics",
);
assert.match(
detailBatchProxy,
/diagnostics:\s*{/,
"city detail batch proxy timeout fallback should include structured diagnostics",
);
assert.match(
detailBatchProxy,
/response_source:\s*"next_proxy_timeout"/,
"city detail batch proxy timeout diagnostics should identify the proxy timeout layer",
);
assert.match(
detailBatchProxy,
/partial_reason:\s*"proxy_timeout"/,
"city detail batch proxy timeout diagnostics should distinguish proxy timeout from backend partial timeout",
);
assert.match(
detailBatchProxy,
/city_status/,
"city detail batch proxy timeout diagnostics should include per-city status",
);
assert.match(
detailBatchProxy,
/status:\s*200/,
@@ -39,4 +39,15 @@ export function runTests() {
source.includes("1500"),
"ops feedback page must document fixed reward point guidelines",
);
assert(
source.includes("feedbackFreshnessBadges") &&
source.includes("freshness?.live_path") &&
source.includes("freshness?.live_age_sec") &&
source.includes("sse_server_to_client_latency_sec") &&
source.includes("sse_collector_to_client_latency_sec") &&
source.includes("sse_source_to_collector_latency_sec") &&
source.includes("detail_batch_diagnostics") &&
source.includes("partial_reason"),
"ops feedback page must summarize live freshness, SSE latency and detail-batch diagnostics",
);
}