← Back to Pull requests

fix: issue-sandbox crash-looping #122

Merged
barney-s merged 1 files (103 lines) on Nov 14, 2025 08:02 UTC
View on GitHub
barney-s barney-s commented on Nov 14, 2025 03:25 UTC
Author

issue-sandbox was crashlooping due to a couple of logical errors:
1. If gemini commits the changes it made , sub-sequent commit would fail.
2. On restart, branch creation fails since the branch already exists. we fail again.
3. On restart, agent-prompt exists, thereby gemini is not run again and there is no commit change , at which point we fail again.

Overall the logic is brittle and we need ironing out some flows.

commiting change failing:

2025/11/14 03:41:47 starting code-server
2025/11/14 03:41:47 Running code-server in subprocess 40
2025/11/14 03:41:47 Running command: git [rev-parse HEAD]
2025/11/14 03:41:47 Running command: git [remote remove origin]
2025/11/14 03:41:47 Running command: git [config --global user.email barni@google.com]
2025/11/14 03:41:47 Running command: git [config --global user.name Barni Seetharaman]
2025/11/14 03:41:47 Running command: git [branch --list issue-105-fixes-SnTh]
2025/11/14 03:41:47 Issue branch issue-105-fixes-SnTh already exists, checking it out
2025/11/14 03:41:47 Running command: git [checkout issue-105-fixes-SnTh]
2025/11/14 03:41:47 Starting issue solver
2025/11/14 03:41:47 .gemini directory does not exist in /workspaces
2025/11/14 03:41:47 agent-prompt.txt exists, skipping gemini generation
2025/11/14 03:41:47 Running command: git [add .]
2025/11/14 03:41:47 Running command: git [commit -m fix for issue # 105]
2025/11/14 03:41:48 failed to process git changes: failed to git commit: command git [commit -m fix for issue # 105] failed with output On branch issue-105-fixes-SnTh
nothing to commit, working tree clean
: exit status 1

Diff: 103 lines (+64 / -39) across 1 files Reviewer: seans3 Review duration: 277m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.36) × (1 − Review Confidence (0.90)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 103 lines diff across 1 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.91 · 1 substantive comment(s)
0.91
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
89%
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.278
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
3 items
seans3 seans3 approved these changes on Nov 14, 2025 08:01 UTC
Approved Reviewer

/lgtm

It would be nice to get tests for the logic to verify the fix. I think going forward, we should move most of the logic for these binaries into libraries (in pkg dir), and add unit tests to the functions in these libraries. Also, we should put some effort into integration tests. Let me know what you think.

barney-s barney-s commented on Nov 14, 2025 17:23 UTC
Author

/lgtm

> It would be nice to get tests for the logic to verify the fix. I think going forward, we should move most of the logic for these binaries into libraries (in pkg dir), and add unit tests to the functions in these libraries. Also, we should put some effort into integration tests. Let me know what you think.

Sounds reasonable. We definitely need unit tests for all packages as a start.

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