fix(daemon-beta t6): ingest path 改帶原檔路徑——修 takedown 0 命中孤兒 bug(第五枚真機坑);mistakes 補成對操作同鍵教訓
This commit is contained in:
@@ -292,9 +292,12 @@ func runDirectOnceRoot(cfg *DirectConfig, root string, dryRun bool) ([]DirectRes
|
||||
ok = false
|
||||
break
|
||||
}
|
||||
// path 帶「原檔路徑」不是卡片路徑(07-24 真機第五枚坑):
|
||||
// source_uri=kb://<path> 是 takedown 的比對鍵,也是 B4 溯源該指的原文——
|
||||
// 帶卡片路徑會讓「刪原檔→下架」永遠 0 命中。
|
||||
status, _, perr := cfg.postJSON(cfg.triggerURL(cfg.CardIngestWF), map[string]any{
|
||||
"page_name": pageNameOf(cardRel),
|
||||
"path": cardRel,
|
||||
"path": ev.Path,
|
||||
"card_content": string(cardData),
|
||||
"library": cfg.Library,
|
||||
})
|
||||
|
||||
@@ -71,8 +71,9 @@ func TestDirectExtractorModeE2E(t *testing.T) {
|
||||
if strings.Contains(cc, "XYZZY") {
|
||||
t.Fatal("原文內容洩上雲=違反四步定稿邊界")
|
||||
}
|
||||
if p, _ := posted[0]["path"].(string); p != "system-dev/wiki/cards/報銷規則.md" {
|
||||
t.Fatalf("path=%q", p)
|
||||
// path 必須是「原檔路徑」(takedown 比對鍵+B4 溯源)——不是卡片路徑(07-24 第五枚坑)
|
||||
if p, _ := posted[0]["path"].(string); p != "報銷規則.md" {
|
||||
t.Fatalf("path=%q(應為原檔路徑)", p)
|
||||
}
|
||||
// 第二輪:原稿沒變 → 不重萃不重送
|
||||
results2, exit2, _ := RunDirectOnce(cfg, false)
|
||||
|
||||
Reference in New Issue
Block a user