maybeProcessGateOverrideCommand (src/queue/processors.ts:5977) and maybeProcessPlanCommand (:6204) each hand-roll the SAME guard preamble: reject payload.action !== "created", reject Bot/[bot] authors, reject missing repo/PR/installation/actor, and record a skip audit event for each. The #1960 command surface will add 6+ more handlers that need the identical preamble. Extract a PURE classifier (mirroring classifyPlanCommandRequest at src/review/planner.ts:39) that takes the webhook payload + installationId and returns either {ok:true, repoFullName, installationId, actor, pr-or-issue} or {ok:false, reason, ...targetKey} so every new command handler carries a single ok branch. Contributor scope = the pure classifier + its exhaustive tests; wiring it into the (maintainer-owned) handlers is a follow-up.
Deliverables
References
src/queue/processors.ts:5977 (maybeProcessGateOverrideCommand preamble)
src/queue/processors.ts:6204 (maybeProcessPlanCommand)
src/review/planner.ts:39 (classifyPlanCommandRequest — the pattern to mirror)
#1960
Part of #1960.
size: S · held for later release (gittensor:feature once activated)
maybeProcessGateOverrideCommand (src/queue/processors.ts:5977) and maybeProcessPlanCommand (:6204) each hand-roll the SAME guard preamble: reject payload.action !== "created", reject Bot/[bot] authors, reject missing repo/PR/installation/actor, and record a skip audit event for each. The #1960 command surface will add 6+ more handlers that need the identical preamble. Extract a PURE classifier (mirroring classifyPlanCommandRequest at src/review/planner.ts:39) that takes the webhook payload + installationId and returns either {ok:true, repoFullName, installationId, actor, pr-or-issue} or {ok:false, reason, ...targetKey} so every new command handler carries a single ok branch. Contributor scope = the pure classifier + its exhaustive tests; wiring it into the (maintainer-owned) handlers is a follow-up.
Deliverables
reasonstring per skip causeReferences
src/queue/processors.ts:5977 (maybeProcessGateOverrideCommand preamble)src/queue/processors.ts:6204 (maybeProcessPlanCommand)src/review/planner.ts:39 (classifyPlanCommandRequest — the pattern to mirror)#1960Part of #1960.
size: S · held for later release (gittensor:feature once activated)