diff --git a/docs/superpowers/plans/2026-09-01-llm-error-retry-memory.md b/docs/superpowers/plans/2026-09-01-llm-error-retry-memory.md index 085f25a..193ed89 100644 --- a/docs/superpowers/plans/2026-09-01-llm-error-retry-memory.md +++ b/docs/superpowers/plans/2026-09-01-llm-error-retry-memory.md @@ -158,16 +158,16 @@ func TestNormalizeErrorMsg(t *testing.T) { } func TestBuildMemoryKey(t *testing.T) { - k1 := buildMemoryKey("https://a.com", "429", "rate limit for req-1") - k2 := buildMemoryKey("https://a.com", "429", "rate limit for req-999") // 同因不同请求ID + k1 := buildMemoryKey("https://a.com", "429", "rate limit for req-a1b2c3") + k2 := buildMemoryKey("https://a.com", "429", "rate limit for req-d4e5f6") // 同因不同请求ID if k1 != k2 { t.Fatalf("同因不同请求ID应同键: %s != %s", k1, k2) } - k3 := buildMemoryKey("https://b.com", "429", "rate limit for req-1") // 不同上游 + k3 := buildMemoryKey("https://b.com", "429", "rate limit for req-a1b2c3") // 不同上游 if k1 == k3 { t.Fatalf("不同上游应不同键") } - k4 := buildMemoryKey("https://a.com", "500", "rate limit for req-1") // 不同错误码 + k4 := buildMemoryKey("https://a.com", "500", "rate limit for req-a1b2c3") // 不同错误码 if k1 == k4 { t.Fatalf("不同错误码应不同键") } @@ -177,7 +177,7 @@ func TestBuildMemoryKey(t *testing.T) { } func TestMsgFingerprint(t *testing.T) { - if msgFingerprint("a req-1") != msgFingerprint("a req-999") { + if msgFingerprint("a req-a1b2c3") != msgFingerprint("a req-d4e5f6") { t.Fatalf("同因指纹应一致") } } diff --git a/docs/superpowers/specs/2026-09-01-llm-error-retry-memory-design.md b/docs/superpowers/specs/2026-09-01-llm-error-retry-memory-design.md index 72ecb9b..d256e67 100644 --- a/docs/superpowers/specs/2026-09-01-llm-error-retry-memory-design.md +++ b/docs/superpowers/specs/2026-09-01-llm-error-retry-memory-design.md @@ -87,7 +87,7 @@ ### 调用方式 -`httpclient.ModelHttpNormalRequest` 对分析模型发 OpenAI messages 格式: +**用独立短超时 `http.Client{Timeout: 15s}`** 对分析模型发 OpenAI messages 格式(技术修正:`httpclient.ModelHttpNormalRequest` 底层 `modelDoRaw` 响应头超时 30min 且不区分 HTTP 状态码,用作重试判定会拖死调用,故不复用它): ```json {