Parent: #1936
Problem
Recent live behavior shows the queue can become intentionally parked by GitHub rate-limit admission. That is safer than retry storms, but beta-stable requires knowing exactly which actor, job type, and endpoint class is consuming budget.
Requirements
- Every GitHub REST and GraphQL call path should have stable budget attribution where possible.
- Persisted observations should distinguish installation, brokered/global, repo fallback, and unknown/public buckets.
- Admission decisions should not be confused by legacy/null observations once keyed observations exist.
- Metrics and logs must make the root cause visible without SSHing into SQLite.
Deliverables
- Audit all GitHub API call paths for admission key/rate observation coverage.
- Add missing labels/structured fields for job type, trigger kind, endpoint class, token scope, and installation/broker scope without high-cardinality labels.
- Add dashboard panels or alert text that explains parked queue states.
- Add tests for attribution invariants and legacy observation fallback behavior.
Acceptance criteria
- A dashboard can answer: which queue job type is blocked, which budget bucket is low, and when it should resume.
- Unknown/global observations do not incorrectly mask or override newer exact-key observations.
- Repo-scoped jobs still honor relevant token-wide exhaustion.
- No new high-cardinality Prometheus labels are introduced.
Expected outcome
Rate-limit incidents become diagnosable from metrics and logs, and admission behavior stays correct across migrations and multi-repo installations.
Parent: #1936
Problem
Recent live behavior shows the queue can become intentionally parked by GitHub rate-limit admission. That is safer than retry storms, but beta-stable requires knowing exactly which actor, job type, and endpoint class is consuming budget.
Requirements
Deliverables
Acceptance criteria
Expected outcome
Rate-limit incidents become diagnosable from metrics and logs, and admission behavior stays correct across migrations and multi-repo installations.