Skip to content

orb(webhook): issues.labeled/unlabeled/assigned never update the local issue row; status/workflow_run never wake a re-review #9059

Description

@JSONbored

Two coverage gaps from the event audit, both real but bounded.

(a) Label/assignment churn never reaches upsertIssueFromGitHub. maybeReReviewOnLinkedIssueChange returns true unconditionally once repo+installation+issue are present (src/queue/processors.ts ~4839-4915), and the caller short-circuits on it (~6998-7001) before handleIssueWebhookEvent (~7008). So issues.labels_json and assignees only advance on opened/edited/closed/reopened, or when the ≤6-hourly backfill reaches the repo — label churn being the single most common issue mutation.

Blast radius is bounded because the linked-issue hard rules fetch live (fetchLinkedIssueFacts, uncached). But resolveLinkedIssueAuthorLogins (~7126-7141) is cache-first and only falls back live on a miss, not on staleness — and issue-side advisories, slop triage, enrichment, and the MCP/API issue surfaces all read the stale rows.

Verifiable: diff issues.labels_json against GitHub for any issue relabelled after creation.

(b) status and workflow_run invalidate the CI cache but never trigger a re-review. maybeInvalidateCiCacheOnLegacyCiEvent (~4783-4824) consumes the delivery and returns true without calling reReviewStoredPullRequest.

That matters here specifically: codecov/patch is a commit status, and it is the gate's hardest required check. A repo whose last green signal is a commit status gets no webhook wake at all — the PR waits for the ~2-minute sweep, which is itself skipped under REST-budget backpressure. Not a wrong merge, but a systematic stall that looks like "the gate hung".

(c) Also noted: pull_request.labeled/unlabeled do a row re-sync but are not in PR_PUBLIC_SURFACE_ACTIONS, so a maintainer adding or removing manual-review is only picked up by the sweep — which, combined with the sticky-label issue, means manually unblocking a PR has up to a 2-minute lag.

Fix

  1. Call upsertIssueFromGitHub inside maybeReReviewOnLinkedIssueChange before the wake fan-out, or reorder so the upsert always runs.
  2. For status with a settled state, resolve PRs by SHA and dispatch a coalesced re-review, exactly as check_run does.
  3. Consider adding labeled/unlabeled to the public-surface actions so a maintainer label change is acted on immediately.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.orbGittensory Orb related - maintainer self-hosting analytics.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions