feat(gate): first-time-contributor grace softens block to advisory (#552) - #825
Merged
Conversation
) Add an opt-in per-repo firstTimeContributorGrace setting. When on, a would-be hard BLOCK is softened to a neutral/advisory gate for a genuine newcomer (0 merged PRs in this repo) who is NOT a repeat offender (>= 3 closed-unmerged PRs blocks normally). Authors with merge history and the setting-off path are unchanged. The author's per-repo merged / closed-unmerged counts are computed in-memory from the already-loaded repo PRs (no extra DB load), using the same merged/closed semantics as the signals engine, and threaded into evaluateGateCheck via gateCheckPolicy. Setting wired through types / schema / migration 0039 / repositories / openapi / settings-preview, mirroring slopGateMode and mergeReadinessGateMode.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 4496707 | Commit Preview URL Branch Preview URL |
Jun 17 2026, 10:42 AM |
|
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. |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #825 +/- ##
==========================================
- Coverage 96.64% 96.64% -0.01%
==========================================
Files 97 97
Lines 14058 14068 +10
Branches 5121 5126 +5
==========================================
+ Hits 13587 13596 +9
Misses 95 95
- Partials 376 377 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.


Closes #552.
What
Opt-in per-repo
firstTimeContributorGracesetting (default off). When on, a would-be hard BLOCK is softened to a neutral/advisoryGittensory Gatefor a genuine newcomer, while repeat low-quality contributors still gate normally.Grace applies iff:
firstTimeContributorGrace === true && authorMergedPrCount === 0 && authorClosedUnmergedPrCount < 3How
evaluateGateCheck(src/rules/advisory.ts): after the existing confirmed-contributor neutral-return and before the no-blockers check, if grace applies and there are blockers, return a neutral, non-blocking result titled "first-contribution grace". Findings stay visible; the gate applies normally once the author has merge history. Public-safe summary — advisory-vs-block only, no trust/reward internals.mergedAt || state === 'merged';state === 'closed' && !mergedAt), and threaded intogateCheckPolicy→evaluateGateCheck.slopGateModeandmergeReadinessGateMode. Reads from the merge-readiness-adjustedeffectivepolicy, so grace correctly softens regardless of which gate mode produced the block.Tests
4 new cases in
test/unit/gate-check-policy.test.ts: newcomer→neutral, repeat-offender→failure, grace-off→failure, has-merges→failure, plus a threading test throughgateCheckPolicy.Verification