fix(collector): 修好 #60 的編譯——測試用的 sortedKeys 與 convert_table.go 撞名
上一批把修法寫完了但沒編譯過:vault_footprint_test.go 自己定義了一支 sortedKeys,而 convert_table.go 早就有同名的(吃 map[string][]byte), 同一個 package 裡不能重名。改名成 sortedFootprintKeys,並順手把本分支 碰過的三個檔 gofmt 過。 驗收(實跑): bash collector/verify-60.sh → ✅ 全部通過(五關) go test -count=1 ./... → ok collector 9.6s / ok supervisor 12.2s Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -271,9 +271,9 @@ func TestMultiAccountInheritsExtractor(t *testing.T) {
|
||||
|
||||
// 機器層有 Extractor+GeminiAPIKey;帳號層 AccountConfig 無這些欄位(正是 t108 場景)
|
||||
cfg := &DirectConfig{
|
||||
Manifest: filepath.Join(t.TempDir(), "m.json"),
|
||||
Library: "kb",
|
||||
Extractor: "gemma", ExtractorExplicit: true,
|
||||
Manifest: filepath.Join(t.TempDir(), "m.json"),
|
||||
Library: "kb",
|
||||
Extractor: "gemma", ExtractorExplicit: true,
|
||||
GeminiAPIKey: "k-test",
|
||||
CardIngestWF: "rag_ingest_card",
|
||||
IngestWF: "rag_ingest_direct",
|
||||
@@ -329,7 +329,7 @@ func TestExtractorEmptyBlocksNonTextDirect(t *testing.T) {
|
||||
// t182:明示「使用者選過、但沒有可用引擎」=真正的無萃取器狀態。
|
||||
// (不能只寫 Extractor:""——那現在會被正規化成 workers-ai,測不到這條防禦閘。)
|
||||
Extractor: "gemma", ExtractorExplicit: true, GeminiAPIKey: "",
|
||||
IngestWF: "rag_ingest_direct",
|
||||
IngestWF: "rag_ingest_direct",
|
||||
RemovedWF: "rag_takedown_direct",
|
||||
MaxRemoved: DefaultMaxRemovedRatio,
|
||||
}
|
||||
@@ -353,9 +353,11 @@ func TestExtractorEmptyBlocksNonTextDirect(t *testing.T) {
|
||||
// ── t181:預設一律走 Workers AI(免金鑰)──────────────────────────────────────
|
||||
//
|
||||
// leo 2026-08-04 特別交代(這是本測存在的理由):
|
||||
// 「default 用 Workers AI,你要用 Gemini 要**特別去選取**,**不管你現在是否有填金鑰**」
|
||||
// 「只要更新版本,就已經 default workers AI 了,除非去一個地方切換你指定的 AI 來源」
|
||||
// 「不然我會有很多質疑,**花在解釋為什麼 Gemini 不管用上**」
|
||||
//
|
||||
// 「default 用 Workers AI,你要用 Gemini 要**特別去選取**,**不管你現在是否有填金鑰**」
|
||||
// 「只要更新版本,就已經 default workers AI 了,除非去一個地方切換你指定的 AI 來源」
|
||||
// 「不然我會有很多質疑,**花在解釋為什麼 Gemini 不管用上**」
|
||||
//
|
||||
// ⇒ 判準是 ExtractorExplicit(使用者主動選過),**不是**「有沒有金鑰」。
|
||||
func TestT181DefaultsToWorkersAI(t *testing.T) {
|
||||
cases := []struct {
|
||||
|
||||
Reference in New Issue
Block a user