From b663149977e581191a9385cd33aaae111437a61d Mon Sep 17 00:00:00 2001 From: qhd <1766646056@qq.com> Date: Tue, 1 Sep 2026 10:16:52 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=AE=A1=E5=88=92Task2=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=BF=AE=E6=AD=A3(=E8=AF=B7=E6=B1=82ID=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E4=B8=80=E8=87=B4)+spec=C2=A73=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=AF=B9=E9=BD=90=E7=8B=AC=E7=AB=8B15s=20cli?= =?UTF-8?q?ent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plans/2026-09-01-llm-error-retry-memory.md | 10 +++++----- .../specs/2026-09-01-llm-error-retry-memory-design.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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 {