feat(status): 全文索引降级上报到控制台 —— 让静默降级看得见

上一个提交修的是"卷没挂"这个实例,这个提交修的是"它坏了几周没人发现"这个
类别问题:全文路退内存兜底后,混合检索只表现为召回变差,不报错、无告警。

- mcp-go: bleveStore 记录 persistent;health 工具多报一个 fulltext_disk。
  仍是 map[string]bool,gateway 现有反序列化不受影响(加非 bool 字段会让
  整个 health 解析失败,连带 Milvus/Neo4j 健康灯一起黑)。
- gateway: 基建灯新增「全文索引」一项,退内存时给出后果与排查方向,
  而不只是一盏灰灯。
- admin: 基建列表此前只渲染 name/up,detail 字段一直没露出——而降级原因
  恰恰只存在于 detail 里。补上渲染(离线态用琥珀色),并给「全文索引」
  补 INFRA_META(它不是独立服务,没有端口,落在容器卷上)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-20 13:44:48 +08:00
parent c1420b5665
commit bfd0d74c34
4 changed files with 34 additions and 2 deletions
+9 -1
View File
@@ -17,6 +17,8 @@ const INFRA_META: Record<string, { role: string; port: string; icon: IconName }>
milvus: { role: "向量检索库", port: "19530", icon: "db" },
neo4j: { role: "图关系库", port: "7687", icon: "bus" },
minio: { role: "对象存储 (OSS)", port: "9000", icon: "db" },
// 全文索引不是独立服务,是 mcp-go 进程内的本地 bleve —— 没有端口,落在容器卷上。
: { role: "全文检索 (bleve)", port: "本地卷", icon: "db" },
};
function toolCategory(t: string): string {
@@ -313,9 +315,15 @@ export function StatusPage() {
const meta = INFRA_META[item.name];
return (
<div key={item.name} className="flex items-center justify-between text-xs pb-3 border-b border-slate-100 last:border-0 last:pb-0">
<div className="flex items-center gap-2">
<div className="flex min-w-0 items-center gap-2">
<span className="font-bold text-slate-800">{item.name}</span>
<span className="text-[10px] text-slate-400">{meta?.role || "后端组件"}</span>
{/* detail 是降级原因/后果的唯一载体(如"内存兜底·重启即清零"),必须露出来 */}
{item.detail && (
<span className={`truncate text-[10px] ${item.up ? "text-slate-400" : "text-amber-600"}`} title={item.detail}>
· {item.detail}
</span>
)}
</div>
<div className="flex items-center gap-3">
<code className="text-[10px] text-slate-400 font-mono bg-slate-100 px-1.5 py-0.5 rounded">