fix(gate): gate non-confirmed contributors normally (eliminate the manual-review backlog) - #1140
Merged
Conversation
…nual-review backlog) Remove the blanket "non-confirmed contributor never blocks" rule across every surface. Non-confirmed contributors are now gated identically to confirmed authors: a real blocker fails the gate (one-shot close), a clean PR passes (auto-merge). Confirmed-Gittensor status now affects only on-chain scoring, never the merge/close verdict. - predicted-gate.ts: docstrings (PREDICTED_GATE_NOTE + the confirmedContributor field) updated to describe the new rule; the predictor already delegated the verdict to evaluateGateCheck, so it mirrors the real gate exactly. - app.ts: the pending Gate check-run text no longer claims the gate "only blocks confirmed Gittensor contributors". - processors.ts / agent-actions.ts / types.ts / mcp/server.ts: comment + JSDoc consistency for the new policy; the agent acts purely off the gate verdict, so the auto-merge/close behavior follows automatically. - Tests: gate-check-policy, predicted-gate, mcp-predict-gate, parity-wire, queue, github-app, rules, safety updated to assert the new gate-normally behavior (failure on a blocker, success when clean) instead of the old forced-neutral; the first-time-contributor grace assertions are unchanged. First-time-newcomer grace and the eval-not-ready neutral remain intact.
Contributor
|
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 #1140 +/- ##
==========================================
- Coverage 94.77% 94.77% -0.01%
==========================================
Files 156 156
Lines 18864 18862 -2
Branches 6829 6828 -1
==========================================
- Hits 17878 17876 -2
Misses 404 404
Partials 582 582 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closed
12 tasks
This was referenced Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE — consequential policy change for human review
This removes a blanket gate rule. Please review the policy implications before merging.
What changed
Previously the gate had a blanket special-case: any non-confirmed-Gittensor contributor whose PR tripped a real blocker was forced to a
neutral(non-blocking) conclusion — neverfailure. In the converged autonomy model aneutralgate flows to a held + labeled state, so every non-confirmed PR with a blocker landed in the maintainer's manual-review queue. That blanket rule is the source of the manual-review flood.This PR removes that rule everywhere. Non-confirmed contributors are now gated identically to confirmed authors:
failure→ one-shot auto-close (taopedia model)success→ auto-mergeConfirmed-Gittensor status now affects only on-chain scoring, never the merge/close verdict. The review + CI + guardrail still vet every PR.
The opt-in first-time-contributor grace is unchanged — a genuine newcomer (0 merged PRs, not a repeat offender) still gets a non-blocking advisory gate when the maintainer opts in, so real first contributions stay protected. The eval-not-ready neutral (repo/PR still syncing) is also unchanged.
Surfaces updated for consistency
src/rules/advisory.ts—evaluateGateCheck: the blanketconfirmedContributor === false → neutralbranch removed (the gate decision);confirmedContributorJSDoc updated.src/rules/predicted-gate.ts— the pre-submission predictor delegates its verdict toevaluateGateCheck, so it now mirrors the real gate automatically; thePREDICTED_GATE_NOTEand theconfirmedContributordoc updated to the new rule.src/github/app.ts— the pending Gate check-run text no longer claims the gate "only blocks confirmed Gittensor contributors".src/queue/processors.ts,src/settings/agent-actions.ts,src/types.ts,src/mcp/server.ts— comment + JSDoc consistency. The agent maintenance planner already keys off the gate verdict (not confirmation), so a non-confirmed PR now auto-merges/closes through the existing path with no logic change.Tests
Updated every test that asserted the old non-confirmed → neutral behavior to assert the new gate-normally behavior precisely (failure with the exact blocker code when a blocker fired, success when clean):
gate-check-policy,predicted-gate,mcp-predict-gate,parity-wire,queue,github-app,rules,safety. First-time-grace and eval-not-ready assertions left intact.Notable behavior shifts now covered:
holdrow for a failing non-confirmed PR (previously a non-comparable neutral → no row).gittensory_predict_gate"API down → can't confirm" case now still predictsfailureon a blocker — an API outage can neither falsely block nor falsely un-block.Verification
npx tsc --noEmitclean (exactOptionalPropertyTypes+noUncheckedIndexedAccess).npx vitest rungreen: 3593 passed, 1 skipped, 0 failed.