feat(github-app): @gittensory gate-override command (#538) - #823
Conversation
The first action command (existing @gittensory commands are read-only Q&A). An authorized maintainer comments `@gittensory gate-override <reason>` and gittensory finalizes the live Gittensory Gate check to NEUTRAL for the current commit only — a new push re-evaluates, so it's a relief valve, not a permanent bypass. - Authorization uses REAL repo permission (getRepositoryCollaboratorPermission via resolveRealRepoPermissionAssociation), never the spoofable author_association — closing the #788 hazard on this privileged path. Default gateOverridePolicy = maintainer + collaborator (admin/maintain/write); no pr_author/confirmed_miner. - New createOrUpdateOverriddenGateCheckRun finalizer (neutral, names actor+reason); resolves the current Gate run by headSha. No override state persisted anywhere. - Reason is public-safe-sanitized; both allow and deny are audited (github_app.gate_overridden / github_app.gate_override_denied). - Bonus (the #538 settings half): surface badgeEnabled in settings-preview. Renamed resolvePrPanelRetriggerActorAssociation -> resolveRealRepoPermissionAssociation (now shared by the panel-retrigger and override action commands). 1901 unit tests pass; typecheck clean; all changed lines covered; no openapi drift. Closes #538
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 8 changed file(s) — two independent AI reviewers. Changed files: Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #823 +/- ##
==========================================
- Coverage 96.77% 96.64% -0.14%
==========================================
Files 97 97
Lines 14006 14058 +52
Branches 5102 5121 +19
==========================================
+ Hits 13555 13587 +32
- Misses 86 95 +9
- Partials 365 376 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The first action command (every existing @gittensory command is read-only Q&A). The maintainer relief valve for gate false-positives — and a Phase-1 prerequisite (the human escape hatch before any autonomous gate action).
Behavior
An authorized maintainer comments
@gittensory gate-override <reason>and gittensory finalizes the liveGittensory Gatecheck to neutral for the current commit only. A new push re-evaluates — it's a relief valve, not a permanent bypass (no override state persisted anywhere).Security (this flips a gate — reviewed carefully)
getRepositoryCollaboratorPermissionviaresolveRealRepoPermissionAssociation), never the spoofablepayload.comment.author_association— closing the [Bug/write-safety]: command authority conflates org MEMBER with repo maintainer (P1, agent-layer prereq) #788 hazard on this privileged path. Default policy = maintainer + collaborator (admin/maintain/write); no pr_author/confirmed_miner.github_app.gate_overridden/github_app.gate_override_denied).Changes
createOrUpdateOverriddenGateCheckRunfinalizer (neutral, names actor+reason, resolves the current Gate run byheadSha).maybeProcessGateOverrideCommandmirrors the existingmaybeProcessPrPanelRetriggeraction pattern; dispatched before the Q&A handler.resolveRealRepoPermissionAssociation(now shared by both action commands).badgeEnabledin settings-preview (the only genuinely-missing one — slopGateMode already shipped; checkRunAnnotations/issueTriageMode/reviewerRoutingMode are separate wave items).Verification
1901 unit tests pass (incl. allow/deny auth + neutral-PATCH + audit + no-persist tests); typecheck clean; all changed lines covered; no openapi drift; migration guard OK.
Closes #538