fix(reconciliation): 修复僵死回收 SQL 并补齐验收缺口
build / build (push) Has been cancelled

- 回收 SQL 占位符改为 $1/$2,消除 pgx 扩展协议 42P18(手动/定时对账 500)
- 直接写入 finding 时归一空 confirmation_state,避免 23514
- 修正 R6/overview 同谓词用例夹具,两条台账各自持有 source version
- 页面顶部统一服务与队列单行状态条,删除 Embedding/LLM 常量卡
- 平台阶段筛选合并为「WeKnora 处理中」,后端支持 stage=weknora
- weknora_url 由测试 WeKnora 源构造,详情与 503 提供跳转链接
- 补 1000/页线上查询、R8 合法收养、weknora 阶段筛选用例
This commit is contained in:
Zhero & Rin
2026-12-01 14:22:06 +08:00
committed by 姚章浩
parent 629694546c
commit e855261b4d
19 changed files with 211 additions and 143 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func listMonitorTasks(w http.ResponseWriter, r *http.Request, config Config) {
writeJSON(w, 400, map[string]string{"error": "invalid filter"})
return
}
for _, pair := range [][2]string{{f.Scope, "|internal|external"}, {f.Action, "|add|update|remove"}, {f.Status, "|active|waiting|running|retrying|attention|completed|cancelled"}, {f.Stage, "|waiting|fetch|upload|parsing|indexing|removal|finished"}} {
for _, pair := range [][2]string{{f.Scope, "|internal|external"}, {f.Action, "|add|update|remove"}, {f.Status, "|active|waiting|running|retrying|attention|completed|cancelled"}, {f.Stage, "|waiting|fetch|upload|parsing|indexing|removal|finished|weknora"}} {
if !strings.Contains("|"+pair[1]+"|", "|"+pair[0]+"|") {
writeJSON(w, 400, map[string]string{"error": "invalid filter"})
return
+7
View File
@@ -33,6 +33,13 @@ func TestMonitorTasksRoute(t *testing.T) {
if s.filter.Status != "active" || s.filter.Offset != 40 {
t.Fatalf("filter %#v", s.filter)
}
// §8 merges 解析/索引增强 into one "WeKnora 处理中" facet.
merged := httptest.NewRequest("GET", "/api/v1/monitor/tasks?stage=weknora", nil).WithContext(req.Context())
wm := httptest.NewRecorder()
h.ServeHTTP(wm, merged)
if wm.Code != 200 || s.filter.Stage != "weknora" {
t.Fatalf("weknora stage: %d filter %#v", wm.Code, s.filter)
}
for _, query := range []string{"status=garbage", "stage=internal&scope=internal", "limit=101", "offset=-1", "since=bad"} {
r := httptest.NewRequest("GET", "/api/v1/monitor/tasks?"+query, nil).WithContext(req.Context())
rr := httptest.NewRecorder()