diff --git a/changelog.d/fixed-secondary-403-short-caution.md b/changelog.d/fixed-secondary-403-short-caution.md new file mode 100644 index 0000000000..537d5b04c2 --- /dev/null +++ b/changelog.d/fixed-secondary-403-short-caution.md @@ -0,0 +1 @@ +- One GitHub secondary-limit 403 no longer stalls merges for over an hour. A secondary 403 with no `Retry-After` used to assume a full hour, then add the 10-minute slow-start window. For those 70 minutes every low-priority call that would queue more than 5s was shed, including the automerge sweep's commit-status read. On the projectbluefin hive (2026-10-28) one search refusal after a restart meant no PR merged for over an hour, even an approved PR with 19/19 checks green, while the primary quota stood at 87%. Such a 403 now backs off for `Retry-After` when GitHub sends it, or until `X-RateLimit-Reset` when `X-RateLimit-Remaining` is `0`. Otherwise it waits one minute, GitHub's documented rule, and doubles on each repeat up to 15 minutes. Separately, once an automerge lane reaches a candidate PR, the PR's evaluation and merge run at normal pacing priority, so its status and check-run reads are never shed as housekeeping. diff --git a/src/docs/design/github-mention-triggers.md b/src/docs/design/github-mention-triggers.md index bb95356f1b..647fd246fb 100644 --- a/src/docs/design/github-mention-triggers.md +++ b/src/docs/design/github-mention-triggers.md @@ -136,7 +136,7 @@ comment (or issue) node id, so a mention seen twice is handled once. A mention is a comment or issue body containing `@` where `` is the installation's bot login, the value the hive already knows -as `appBotLogin` (`isHiveAppReviewAuthor`, `src/pkg/github/automerge/automerge_sweep.go:1221`). +as `appBotLogin` (`isHiveAppReviewAuthor`, `src/pkg/github/automerge/automerge_sweep.go:1242`). The text after the mention is the request. Two optional forms route it: ``` diff --git a/src/docs/labels-and-control-signals.md b/src/docs/labels-and-control-signals.md index 73d596a71e..e77234e7dd 100644 --- a/src/docs/labels-and-control-signals.md +++ b/src/docs/labels-and-control-signals.md @@ -8,9 +8,9 @@ Most hard gates run before an agent sees work. GitHub issue enumeration reads la Some sweeps bypass that enumeration and list items themselves, but every one of them gates on the same hold predicate as enumeration (`Client.IsHeldLabels` / `Client.isHeld`, `src/pkg/github/client.go:1969-1977`, `src/pkg/github/client.go:2679-2681`), so the generic hold substrings and the exact dashboard `hive-pause/` label hold everywhere: -- Auto-merge sweeps reach it through the `Transport.IsHeldLabels` seam; both the queued (`lgtm`) and the self-authored sweep skip a held PR before fetching it (`src/pkg/github/automerge/automerge_sweep.go:23-38`, `src/pkg/github/automerge/automerge_sweep.go:959-964`, `src/pkg/github/automerge/automerge_sweep.go:966-1004`, `src/pkg/github/automerge/automerge_sweep.go:1029-1046`). +- Auto-merge sweeps reach it through the `Transport.IsHeldLabels` seam; both the queued (`lgtm`) and the self-authored sweep skip a held PR before fetching it (`src/pkg/github/automerge/automerge_sweep.go:23-38`, `src/pkg/github/automerge/automerge_sweep.go:980-985`, `src/pkg/github/automerge/automerge_sweep.go:987-1025`, `src/pkg/github/automerge/automerge_sweep.go:1050-1067`). - The task-list sweep skips a held issue before its exempt / issue `needs-human` gate, so a held issue is never commented on, relabelled, or closed by it (`src/pkg/github/task_list_sweep.go:797-815`, `src/cmd/hive/claimescalation.go`). -- Auto-merge sweeps reach it through the `Transport.IsHeldLabels` seam; the queued (`lgtm`) sweep skips a held PR before fetching it, and the self-authored sweep skips held PRs plus `needs-human` before merging (`src/pkg/github/automerge/automerge_sweep.go:23-38`, `src/pkg/github/automerge/automerge_sweep.go:959-964`, `src/pkg/github/automerge/automerge_sweep.go:966-1004`, `src/pkg/github/automerge/automerge_sweep.go:1029-1046`). +- Auto-merge sweeps reach it through the `Transport.IsHeldLabels` seam; the queued (`lgtm`) sweep skips a held PR before fetching it, and the self-authored sweep skips held PRs plus `needs-human` before merging (`src/pkg/github/automerge/automerge_sweep.go:23-38`, `src/pkg/github/automerge/automerge_sweep.go:980-985`, `src/pkg/github/automerge/automerge_sweep.go:987-1025`, `src/pkg/github/automerge/automerge_sweep.go:1050-1067`). - The task-list sweep skips a held issue before its exempt / issue `needs-human` gate, so a held issue is never commented on, relabelled, or closed by it (`src/pkg/github/task_list_sweep.go:848-854`). - The SHA-hold sweep lists primary-repo `kind/bug` issues itself, adds literal `hold` plus a marker notice when no SHA is present (for reporters in `issue_filter.reporter_trust` trusted associations it adds the soft `issues.sha_hold_trusted_label`, default `needs-sha`, instead, #12002), and removes `hold` only when the current hold is its own: the newest `hold` label event is a `labeled` by the App bot and an App-authored SHA-hold notice was posted at or after it (`EnforceSHAHold` / `shaHoldIsOwn` in `src/pkg/github/client.go`). - PR-request watching applies server-side PR holds after a PR is opened; the agent's `--label hold` flag is deliberately discarded by the wrapper (`src/pkg/github/pr_request_watcher.go:452-524`, `bin/hive-open-pr.sh:142-150`). @@ -101,7 +101,7 @@ Some hive-authored labels look like provenance but are read as signals, so they | `tracker`, `meta-tracker`, `tracking`, `epic` (last segment) | Issues | Tracker detector, PR claim rewrite, contributor queue | Marks coordination-only/tracker issues; agents see tracker tags, contributors do not get them. | Soft for agents; hard for contributors | Human/Hive | Enumeration/contributor admission | Remove label or close tracker | Tracker detector (`src/pkg/github/client.go:2095-2161`) | | `epic` (any case; `governor.claims.never_claim_labels`) | Issues | Issue-claim admission, issue stage derivation | Umbrella issue is never a unit of agent work: every automated claim producer (relay `claim`, start signal, contributor lane) is refused with `never-claim label: