A provider rate limit or outage fails investigations that --resume cannot retry
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Read internal/llm/httpx.go first to trace how response errors and retry waits work, then follow investigation handling in internal/engine/agentic.go and resume state in internal/engine/resume.go. Run the relevant tests and make test-short as described in the issue. Done means Retry-After is honored within the cap and context, repeated provider failures produce a resumable outcome, and scan --resume retries those investigations.
由索引模型根據 Issue 內容生成。
描述
Summary
A provider 429 or outage fails each remaining investigation after 6 seconds, the run still ends as completed, and --resume cannot pick those investigations up. Proposal: honor Retry-After, stop early on repeated provider failures, and let --resume retry them.
Where
internal/llm/httpx.go:24-26,:47-56(3 attempts, fixed 2 s and 4 s waits)internal/llm/httpx.go:114-115(doOncenever reads response headers)internal/engine/agentic.go:377-384,:489(failed investigation settles leads as incomplete and goes on)internal/engine/resume.go:114-117,:169-171(--resumecontinues budget skips only)internal/cli/scan.go:31
Details
doOnce turns a non-2xx response into an API error and ignores Retry-After and the rate-limit reset headers. After 6 seconds the call fails. investigateOne records a reject, settles the leads as incomplete and continues, so during a rate-limit window every remaining investigation fails the same way. The leads come out as unconfirmed with "did not produce a usable result" and the run outcome stays completed. loadResume continues only the intents named in a budget skip, and Resumable requires the budget-exhausted outcome, so the only way to investigate those leads is a full new scan that plans and pays again.
Impact
Anyone running the agentic pipeline on a rate-limited key (low usage tiers, shared organization keys, parallel CI jobs) or during a provider incident. The run looks finished, the report is mostly unconfirmed leads, and the money already spent on the planner and the earlier investigations is not reusable.
Suggested fix
Three parts, each useful alone. (1) Parse Retry-After (seconds or HTTP date) in doOnce, carry it on the API error, and have doJSON wait for it, bounded by a cap (for example 60 s) and by the context. (2) After N consecutive investigations that fail with a retryable API error or a transport error, stop the loop the way a budget stop does, with a note that names the provider failure, so the rest of the plan is recorded as not reached. (3) Include in the resume state the intents whose reject has stage investigator and a failure reason (a distinct ledger field, not a text match), and make Resumable and the "To continue" hint cover that outcome.
Acceptance criteria
- A 429 with
Retry-After: 5is retried after about 5 s, within the cap and the deadline - Consecutive provider failures end the run with a distinct, resumable outcome
-
scan --resumeretries investigations that failed on a provider error
Related: #35, #66, #79
Getting started
- Relevant files: internal/cli/scan.go, internal/engine/agentic.go, internal/engine/resume.go, internal/llm/httpx.go
- How to run tests:
make test-short(Unix) or.\make.ps1 test-short(Windows PowerShell);make lintbefore you call it done - Related docs: CONTRIBUTING.md, docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 50e92ec. Severity: medium. Effort: M. audit-key: enhancement|internal/llm/httpx.go|doJSON-retry-after
- 主要語言
- Go
- 星號
- 0
- 分支
- 1
- 平均合併
- 8 小時 14 分鐘
- 30 天內合併 PR
- 3
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/Spackle 的其他 Issue
-
ci good first issue severity: low
難度 2/5 1-3 小時 新手友好度 77/100
TMHSDigital/Spackle#206 ·
維護者通常 1 天內回覆
-
ci severity: low
難度 2/5 1-3 小時 新手友好度 78/100
TMHSDigital/Spackle#205 ·
維護者通常 1 天內回覆
-
bug good first issue severity: low
難度 2/5 1-3 小時 新手友好度 82/100
TMHSDigital/Spackle#199 ·
維護者通常 1 天內回覆
-
bug good first issue severity: low
難度 2/5 1-3 小時 新手友好度 87/100
TMHSDigital/Spackle#195 ·
維護者通常 1 天內回覆
-
documentation good first issue severity: medium
難度 1/5 1 小時以內 新手友好度 90/100
TMHSDigital/Spackle#188 ·
維護者通常 1 天內回覆
查看 TMHSDigital/Spackle 的全部 Issue
相似的 Issue
-
bug effort:s impact:med raised-by:worker risk:low to:worker
難度 2/5 1-3 小時 新手友好度 78/100
medici-finance/assay#8120 · 1 則留言 ·
維護者通常 1 天內回覆
-
factory:subtask
難度 1/5 1 小時以內 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
agent-substrate/substrate#4308 ·
維護者通常 2 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
celestiaorg/celestia-app#8877 ·
維護者通常 1 天內回覆
-
sweep
難度 1/5 1 小時以內 新手友好度 84/100
bketelsen/truenas-mcp#112 ·
維護者通常 1 天內回覆