feat(commands): register PR control-surface action verbs in the @gittensory parser - #3826
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3826 +/- ##
=======================================
Coverage 93.41% 93.42%
=======================================
Files 326 327 +1
Lines 32855 32872 +17
Branches 12035 12043 +8
=======================================
+ Hits 30691 30710 +19
Misses 1530 1530
+ Partials 634 632 -2
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-06 14:14:11 UTC
⏸️ Suggested Action - Manual Review
Review summary Blockers
Nits — 6 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
…ensory parser Adds review/pause/resume/resolve/configuration/explain to the action-command registry alongside gate-override (with a re-review alias for review), extracts a shared classifyPrCommandRequest preamble mirroring classifyPlanCommandRequest, and gives the new verbs conservative default command-authorization roles (maintainer/collaborator, with review additionally widenable to confirmed_miner per the existing review-now precedent). This is pure parsing/config plumbing -- no dispatch or side effects yet, so a new verb never renders a stray Q&A help card while its own handler lands in a follow-up change. Part of #1960.
5a99750 to
850cd60
Compare
Summary
Registers the
@gittensoryPR control-surface action verbs (review/re-review,pause,resume,resolve,configuration,explain) as first-class actioncommands, alongside the existing
gate-override. This is the shared foundationissues #2160, #2161, and #2162 (part of #1960) — pure parsing, a shared classifier,
and default authorization roles. No dispatch/side effects land in this PR; each
verb's handler is a separate follow-up bounty.
GITTENSORY_ACTION_COMMANDSandparseGittensoryMentionCommandto recognize the six new verbs, alias
re-review→review, and capture thetrailing free text as
reason(gate-override-shaped verbs) orargument(
explain, a lookup key rather than free-form prose). Unknown verbs and a baremention still resolve to
help, unchanged.classifyPrCommandRequest(src/github/pr-command-request.ts),a pure classifier mirroring
classifyPlanCommandRequestthat extracts the guardpreamble duplicated across
maybeProcessGateOverrideCommandandmaybeProcessPlanCommand(reject a non-createdcomment action, a Bot/[bot]author, or a payload missing the repo/PR/installation/actor) into one
ok/skipunion with a stable
reasonper skip cause. Not wired into any handler yet —pure add + tests only, per the issue's scope.
commandAuthorizationpolicy entries for all six newverbs.
pause/resume/resolve/configuration/explaindefault to[maintainer, collaborator];reviewis additionally widenable toconfirmed_miner, mirroring the existingreview-nowself-rerun precedent(refactor(github-app): extract a shared withAuthorizedPrAction scaffold for action commands #824). All six flow through the existing
MAINTAINER_ONLY_DEFAULT_COMMANDSclamp automatically (it derives from the policy's own keys), so a spoofable
pr_authoroverride is dropped with a warning the same waygate-override's is.Necessary follow-on in this PR: since the new verbs are now recognized by the
parser, the existing Q&A mention-command handler's
command.name === "gate-override"exclusion (which kept action commands from being misrendered as a Q&A "help" card)
had to widen to cover every action command, not just
gate-override. AddedisGittensoryActionCommand(insrc/github/commands.ts) and used it at the onecall site in
src/queue/processors.ts. Until each verb's own dispatch handlerlands, a bare
@gittensory pause(etc.) is now a recognized-but-unhandled command:it is not misrendered as
help, and it is not yet actioned. A regression testlocks this in.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateRan the full
npm run test:cigate locally (all steps green) plusnpm audit --audit-level=moderate(0 vulnerabilities). Targeted coverage checks on the three changedsrc/**files (src/github/commands.ts,src/github/pr-command-request.ts,src/settings/command-authorization.ts) show 100% coverage on every changed line/branch; the two lines the v8 report still flags (commands.tsisAiCostBearingCommand,command-authorization.tscommandAuthorizationNeedsMinerDetection) are pre-existing code this diff does not touch.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.No UI/frontend/docs changes in this PR (backend command-registry plumbing only), so UI Evidence is not applicable.
Notes