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 天内回复