← Back to Pull requests

feat: add support for issueShutdownAfterMinutes, auto-pause sandbox #172

Merged
barney-s merged 5 files (91 lines) on Dec 01, 2025 21:23 UTC
View on GitHub
barney-s barney-s commented on Nov 30, 2025 18:17 UTC
Author

No description provided by author.

Diff: 91 lines (+90 / -1) across 5 files Reviewer: seans3 Review duration: 1626m
All Vouch review confidence checks passed
Residual risk 0.09 = Change Risk (0.36) × (1 − Review Confidence (0.76)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 91 lines diff across 5 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.52 · 5 substantive comment(s)
0.52
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
75%
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.271
Real PR Conversation Timeline
9 items
aaron-prindle aaron-prindle commented on Dec 01, 2025 20:30 UTC
Contributor

For the feature here, do we want this to be issueShutdownAfterInactiveMinutes? IIUC currently if someone were to go into the sandbox and attempt to work there the sandbox would shut down on them after 30 minutes. Do we want to check the last access of the endpoint possibly and do the minutes after that? (or is the goal to have less support for that use case)

aaron-prindle aaron-prindle commented on code on Dec 01, 2025 20:31 UTC
Code Review
repo-agent/repowatch/api/v1alpha1/repowatch_types.go:1
@@ -106,6 +106,10 @@ type IssueHandlerSpec struct {
 	// PushEnabled - allow pushing to user origin
 	// +kubebuilder:validation:Optional
 	PushEnabled bool `json:"pushEnabled,omitempty"`
+
+	// The time in seconds after which a issue sandbox will be scaled down to 0 replicas.

The comment says "time in seconds" but the name is IssueShutdownAfterMinutes

seans3 seans3 requested changes on Dec 01, 2025 20:35 UTC
Changes Requested Reviewer

Lets add a repowatch unit test to verify this functionality.

barney-s barney-s commented on code on Dec 01, 2025 21:08 UTC
Code Review
repo-agent/repowatch/api/v1alpha1/repowatch_types.go:1
@@ -106,6 +106,10 @@ type IssueHandlerSpec struct {
 	// PushEnabled - allow pushing to user origin
 	// +kubebuilder:validation:Optional
 	PushEnabled bool `json:"pushEnabled,omitempty"`
+
+	// The time in seconds after which a issue sandbox will be scaled down to 0 replicas.

fixed.

barney-s barney-s commented on Dec 01, 2025 21:08 UTC
Author

Lets add a repowatch unit test to verify this functionality.

added unit test

seans3 seans3 approved these changes on Dec 01, 2025 21:09 UTC
Approved Reviewer

/lgtm
/approve

seans3 seans3 commented on Dec 01, 2025 21:10 UTC
Contributor

...still need to rebase repowatch_types.go

barney-s barney-s commented on Dec 01, 2025 21:23 UTC
Author

For the feature here, do we want this to be issueShutdownAfterInactiveMinutes? IIUC currently if someone were to go into the sandbox and attempt to work there the sandbox would shut down on them after 30 minutes. Do we want to check the last access of the endpoint possibly and do the minutes after that? (or is the goal to have less support for that use case)

Ah great point. We are adding automated shutdown for those sandboxes where we run the agent extract a review or a comment. For dev sandboxes #174 we do not support automated shutdown.

But your point on checking for activity is valid. Not sure how we can do that. Can be a future enhancement.

Reviewers
Assignees
barney-s barney-s
Labels
risk: low confidence: 75.8% 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: 35.9% (MEDIUM) · Higher = larger blast radius
35.9%
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: 75.8% · Lower = rushed or shallow review
75.8%
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: 8.7% · Safe to merge
8.7%