fix(agent-actions): apply account-age throttle on issue contributor-cap path - #3367
fix(agent-actions): apply account-age throttle on issue contributor-cap path#3367RealDiligent wants to merge 2 commits 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.
…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 - fixes requiredReview updated: 2026-07-05 05:13:38 UTC
🛑 Suggested Action - Fix Blockers Review summary Nits — 5 non-blocking
CI checks failing
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 (CI is failing (validate, validate-code)). 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. |
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.Supersedes closed #3179 (codecov patch on first push).
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.types.ts: update doc comment — setting now applies to both PR and issue cap paths.Testing performed
npm run typecheckreview_state_labelnot auto: no label, cap still enforcedCompatibility
accountAgeThresholdDays: null).Why this approach
Mirrors the existing, tested PR-path contract. Closes a documented enforcement gap with minimal diff and low regression risk.
Candidate comparison
Also evaluated: secret-scan gate/enrichment parity (active competing PRs #3172, #3041); cross-line secrets (#2454 branch exists); transient locks (merged #3050/#3164). Selected for unique scope and documented intent.