scheduler: fix Kubernetes diagnostics and submission context #1669
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 310 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.343
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #1669"
general
weight: 0.35
bhcopeland
Follow-up to #1666, covering the staging failure and the remaining review notes.
Staging detected
BackoffLimitExceededforkbuild-gcc-14-powerpcand uploaded diagnostics, but the API rejecteddata.error_code="k8s_job_failed"with HTTP 400, leaving the node running. Use the existingInfrastructurecode and retain the specifick8s_*outcome in the error message and diagnostic artifacts. Monitor tests now validate outgoing data against the realKbuildDataschema.Also address the remaining review concerns:
Replace the existing worker test's parenthesized multi-context
withwithExitStackto satisfy the configured Ruff Python 3.7 target, and document the resulting behavior.Validation: 76 scheduler/monitor tests and two concurrency subtests pass. Upload tests cover transient timeouts, connection errors, HTTP 5xx retries, HTTP 4xx rejection, file cleanup/reopening, and recovery on a later poll after either diagnostic upload exhausts its retries. Watchdog tests verify that a permanently stalled monitor still terminates the process. The CI hook's Ruff 0.11.5 lint and formatting checks pass across all 38 Python files;
git diff --checkpasses. These are local checks; staging deployment is separate.