⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
src/queue/processors.ts:12174 (explain command) and :12987-12993 (generate-tests command)
call recordGithubProductUsage(...) for a denial without including allowedRoles in the metadata,
even though the matching recordAuditEvent calls for both do include it. Every sibling command's
denial telemetry — gate-override (:11774), resolve (:11953), pause (:12064), resume
(:12107) — includes allowedRoles in both the audit event and the product-usage event
consistently.
Separately, maybeProcessConfigurationCommand/recordConfigurationSkip (lines 12452-12512) never
call recordGithubProductUsage at all, unlike every other command handler in this file — so
@loopover configuration usage is entirely invisible in product-usage reporting/dashboards.
Consequence: analytics/dashboards lose allowedRoles context specifically for explain/
generate-tests denials, and the configuration command's usage is completely unmeasured. This is
an instrumentation gap with no functional/authorization impact.
Requirements
- Add
allowedRoles to the recordGithubProductUsage metadata for both explain and
generate-tests denials, matching the pattern already used by gate-override/resolve/pause/resume.
- Add a
recordGithubProductUsage call to maybeProcessConfigurationCommand/
recordConfigurationSkip, matching how every other command handler records product usage.
Deliverables
All five Deliverables are required in the same PR.
Test Coverage Requirements
src/** is measured by codecov/patch (99%+ target, branch-counted). The new tests must exercise
each previously-uncovered telemetry call directly.
Expected Outcome
Product-usage telemetry for explain/generate-tests denials and for @loopover configuration
invocations matches the consistency already established by every other command in this file.
Links & Resources
src/queue/processors.ts:12174,12987-12993 (explain/generate-tests denial telemetry)
src/queue/processors.ts:12452-12512 (maybeProcessConfigurationCommand,
recordConfigurationSkip)
- Already-correct siblings:
:11774,11953,12064,12107 (gate-override/resolve/pause/resume)
Context
src/queue/processors.ts:12174(explaincommand) and:12987-12993(generate-testscommand)call
recordGithubProductUsage(...)for a denial without includingallowedRolesin the metadata,even though the matching
recordAuditEventcalls for both do include it. Every sibling command'sdenial telemetry — gate-override (
:11774), resolve (:11953), pause (:12064), resume(
:12107) — includesallowedRolesin both the audit event and the product-usage eventconsistently.
Separately,
maybeProcessConfigurationCommand/recordConfigurationSkip(lines 12452-12512) nevercall
recordGithubProductUsageat all, unlike every other command handler in this file — so@loopover configurationusage is entirely invisible in product-usage reporting/dashboards.Consequence: analytics/dashboards lose
allowedRolescontext specifically forexplain/generate-testsdenials, and theconfigurationcommand's usage is completely unmeasured. This isan instrumentation gap with no functional/authorization impact.
Requirements
allowedRolesto therecordGithubProductUsagemetadata for bothexplainandgenerate-testsdenials, matching the pattern already used by gate-override/resolve/pause/resume.recordGithubProductUsagecall tomaybeProcessConfigurationCommand/recordConfigurationSkip, matching how every other command handler records product usage.Deliverables
explain's denial telemetry includesallowedRolesin itsrecordGithubProductUsagecall.generate-tests's denial telemetry has the same fix.@loopover configurationinvocations are recorded viarecordGithubProductUsage, matchingevery other command handler.
recordGithubProductUsagemetadata includesallowedRolesfor bothexplain and generate-tests denials.
@loopover configuration.All five Deliverables are required in the same PR.
Test Coverage Requirements
src/**is measured bycodecov/patch(99%+ target, branch-counted). The new tests must exerciseeach previously-uncovered telemetry call directly.
Expected Outcome
Product-usage telemetry for
explain/generate-testsdenials and for@loopover configurationinvocations matches the consistency already established by every other command in this file.
Links & Resources
src/queue/processors.ts:12174,12987-12993(explain/generate-testsdenial telemetry)src/queue/processors.ts:12452-12512(maybeProcessConfigurationCommand,recordConfigurationSkip):11774,11953,12064,12107(gate-override/resolve/pause/resume)