A provider rate limit or outage fails investigations that --resume cannot retry
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 0
- Fork
- 1
- Merge trung bình
- 8 giờ 14 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/Spackle
-
ci good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
TMHSDigital/Spackle#206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Spackle#205 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/Spackle#199 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
TMHSDigital/Spackle#195 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue severity: medium
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
TMHSDigital/Spackle#188 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TMHSDigital/Spackle
Issue tương tự
-
deskclose human-decided leaves the legacy decision-needed label and applies no human-decidedĐang mởbug effort:s impact:med raised-by:worker risk:low to:worker
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
medici-finance/assay#8120 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
factory:subtask
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
agent-substrate/substrate#4308 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
celestiaorg/celestia-app#8877 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sweep
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
bketelsen/truenas-mcp#112 ·
Maintainer thường phản hồi trong vòng 1 ngày