Follow-up to #9737 / #9862.
maybeHandlePriorityLabelEligibility (src/queue/processors.ts) wraps every I/O call it makes in a .catch that degrades rather than failing the webhook delivery — the settings resolve, the collaborator-permission read, the label removal, the policy comment, the audit row, and the webhook-event row.
Those handlers are the entire reason a label-mutating rule is safe to run on a webhook path: a throw that escapes would fail the whole delivery, taking every handler after it on the same event with it. None of the six was exercised. The existing "fails open when the permission cannot be read" case asserts a 404 response, which takes the ordinary return path, not the catch.
codecov/patch on #9862 measured 93.18% against the 99% target for exactly these six arrow bodies.
Scope
Add cases that make each call actually throw and assert the degraded outcome:
- settings resolver rejects → falls back to the built-in
gittensor:priority and still enforces
- permission read throws (not 404) → fails open, no strip
- label removal and comment both throw → delivery still resolves, enforcement still recorded
- audit and webhook-event writes throw → delivery still resolves, label still removed
Acceptance
Every changed line and branch of the #9737 enforcement path is covered, branch-counted, with the degraded outcome asserted rather than merely the absence of a throw.
Follow-up to #9737 / #9862.
maybeHandlePriorityLabelEligibility(src/queue/processors.ts) wraps every I/O call it makes in a.catchthat degrades rather than failing the webhook delivery — the settings resolve, the collaborator-permission read, the label removal, the policy comment, the audit row, and the webhook-event row.Those handlers are the entire reason a label-mutating rule is safe to run on a webhook path: a throw that escapes would fail the whole delivery, taking every handler after it on the same event with it. None of the six was exercised. The existing "fails open when the permission cannot be read" case asserts a 404 response, which takes the ordinary return path, not the catch.
codecov/patchon #9862 measured 93.18% against the 99% target for exactly these six arrow bodies.Scope
Add cases that make each call actually throw and assert the degraded outcome:
gittensor:priorityand still enforcesAcceptance
Every changed line and branch of the #9737 enforcement path is covered, branch-counted, with the degraded outcome asserted rather than merely the absence of a throw.