← Back to Pull requests

Block group applications using the stored reapplication timeframe. #4628

Closed
unknown closed this pull request without merging on Oct 10, 2026 02:16 UTC
View on GitHub
unknown unknown commented on Oct 06, 2026 16:35 UTC
Author

Changes

  • Rejecting an approved partner's application to another group still leaves the enrollment approved, and now stores the chosen reapplicationTimeframe on that enrollment.

  • Bulk reject does the same for every selected approved partner, and always stores standard.

  • The block applies to every group in the program. A missing rejection date does not block.

  • throwIfApplicationBlocked now owns both the enrollment-status checks and the group reapplication window, and returns a specific error per enrollment status instead of the generic "You have already applied to this program" message:"
  • How to test

  • Approve a partner, have them apply to a different group, and reject that application with instant. They can apply to any group immediately, and the enrollment stays approved.

  • Reject another group application with standard. Applying to any group within 30 days of that rejection fails with the 30-day message. After 30 days from reviewedAt, it succeeds.

  • Reject with never. Further group applications fail with "You cannot reapply to this program."
  • Notes

  • The 30 days are measured from the latest rejected application for that partner and program, including rejections from before the current enrollment.

  • One timeframe is stored per enrollment. A later group rejection replaces it, so a later instant clears an earlier never.
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Application Updates
    When an application to an additional group is rejected, the approved enrollment remains approved, and the selected reapplication timeframe is saved.
    Reapplication eligibility follows the saved timeframe: applicants may reapply immediately, be blocked from reapplying, or wait until the standard cooldown has passed since their latest reviewed rejection.
    Approved applicants cannot apply again to the same group.
    * Applications are blocked for pending, invited, and declined enrollments.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 261 lines (+195 / -66) across 3 files Reviewer: Joker666 Review duration: 4900m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 261 lines diff across 3 files
    0.44
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.333
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #4628"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.2% (MEDIUM) · Higher = larger blast radius
    44.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.5% · Safe to merge
    17.5%
    Repository