From 7b9511500b952d60d6705d719d763123ad6148e9 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sun, 22 Nov 2026 14:38:50 +1100 Subject: [PATCH] docs(watchpr): describe rate-limit pause and 403 token re-mint accurately --- AGENTS.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ff4fcb1..3436cf9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -305,10 +305,12 @@ GitHub token/host vars stripped), and propagates its exit code (128+signal); `Di carry `PRRef.Forge`; `ParseWatchRef` accepts them, `ParsePRRef` does not, so Gitea-only tools never see one. watchpr builds a client only for the forges its refs name, polls GitHub as the `reviewer` app (anonymous on a failed mint), and - re-mints the installation token within 5m of `expires_at` and on a 401. + re-mints the installation token within 5m of `expires_at` and on a rejected + credential (401, or a 403 naming the token). GitHub's `mergeable` is null while computing (→ unknown), so the Gitea - debounce applies unchanged. A rate-limited 403/429 is a plain transient error, - never an `APIError`, so it cannot end a watch as an auth failure. + debounce applies unchanged. A rate-limited 403/429 pauses until + Retry-After/X-RateLimit-Reset, capped at 15m, never counts towards the failure + limit, and is never an `APIError`, so it cannot end a watch as an auth failure. - CI "combined status" comes from `/commits/{sha}/status`; an empty head SHA yields an empty state without an API call. - Gitea backs every PR with an issue of the same number and serves comments from