fix(agent-actions): apply account-age throttle on issue contributor-cap path - #3179
fix(agent-actions): apply account-age throttle on issue contributor-cap path#3179RealDiligent wants to merge 1 commit into
Conversation
…ap path Wire accountAgeThresholdDays into maybeCloseIssueOverContributorCap and label newly opened issues from below-threshold accounts, completing the Co-authored-by: Cursor <cursoragent@cursor.com> JSONbored#2561 issue-path gap documented in RepositorySettings.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-04 19:15:01 UTC
🛑 Suggested Action - Reject/Close
Review summary Nits — 4 non-blocking
Why this is blocked
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.
|
|
Gittensory is closing this pull request on the maintainer's behalf (Possible leaked secret in the diff (generic_secret_assignment)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (81.48%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3179 +/- ##
==========================================
- Coverage 94.72% 94.70% -0.02%
==========================================
Files 269 269
Lines 29609 29635 +26
Branches 10803 10814 +11
==========================================
+ Hits 28046 28067 +21
- Misses 917 918 +1
- Partials 646 650 +4
🚀 New features to boost your workflow:
|
Summary
Completes the issue-path half of the account-age throttle (#2561): repos that configure
accountAgeThresholdDaysnow get the same anti-ban-evasion friction on issues as they already do on PRs.Problem
#2561 shipped account-age throttling on the PR maintenance path (tighter
contributorOpenPrCap+newAccountLabel), butRepositorySettingsexplicitly documented that the issue-path enforcement did not readaccountAgeThresholdDays. A contributor with a fresh account could bypass the tightened cap by opening issues instead of PRs.Root cause
maybeCloseIssueOverContributorCapused the rawcontributorOpenIssueCapwithout the half-cap adjustment applied on the PR path, and newly opened issues never received thenewAccountLabel.Implementation
maybeCloseIssueOverContributorCap: resolve account age viagetGithubUserCreatedAt; tighten per-repo issue cap tomax(1, ceil(cap/2))for below-threshold authors (fail-open when lookup fails).openedwebhook: applynewAccountLabelwhenreview_state_labelautonomy isauto, mirroring PR-path exemptions (owner/admin/automation-bot skipped).types.ts: update doc comment — setting now applies to both PR and issue cap paths.Install-wide cap (#2562) unchanged — same as PR path.
Testing performed
npm run typecheckaccount-age throttle (#2561 issue path): tighter cap + labelregressionaccount-age throttle (#2561 issue path): off by default — no user lookupCompatibility
accountAgeThresholdDays: null).Why this approach
Mirrors the existing, tested PR-path contract line-for-line rather than introducing new policy. Closes a documented enforcement gap with minimal diff and low regression risk.
Candidate comparison (investigation notes)
Also evaluated but deferred:
This issue was selected for unique scope, documented intent, and clear production anti-abuse value with a reviewable diff size.