← Back to Pull requests

vxpu/router: emit plan for the executor's machine on load by artifact #875

Closed
unknown closed this pull request without merging on Nov 24, 2026 16:26 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 04:07 UTC
Author

When a LoadModel request arrives by artifact with no plan, leave PlanFile unset in InstanceDesired without mutating desired state. Two such loads are equal desired state by construction, requiring no PlanEmitted flag and no special comparison in desiredEqual. A client-supplied PlanFile stays in InstanceDesired as given, and any change to desired state reloads on the executor.

In ModelReconciler.Reconcile, derive the plan once when loading the instance, after background manifest weight caching completes, so poll ticks during weight downloads never invoke the planner. Derive the executor's machine kind from its matched catalog machine through kernelplan.MachineKind (the same function vxpu plan emit calls) or from its hardware probe through kernelplan.MachineKindFromProbe when the host is not in the catalog, and call kernelplan.PlanArtifact with the original unrewritten manifest bytes. Trim whitespace on GPU names in kernelplan.MachineKind and kernelplan.MachineKindFromProbe so a probe with a whitespace-only GPU field and a valid CPU plans as CPU.

Record the loaded plan's identity in InstanceStatus.PlanHash across Loading, Checking, and Passed phases so callers and operators can read which plan an instance is serving.

When the executor's machine is not known (Describe unimplemented, empty or unreadable hardware probe, or probe with neither GPU nor CPU), record a FailedPrecondition refusal in InstanceStatus and never load on the executor. Planner errors (corrupt decode graph or malformed binding) record an InvalidArgument refusal in InstanceStatus with the planner's error message.

Update vxpu/docs/design.md for InstanceStatus.PlanHash and artifact plan emission in the reconcile loop.

Hero journey table from ap-e2e-vxpu run 45333700970 (job 138240809754, commit ccc8d6c, tree be15f6bb0376, identical tree to this head):

===========================================================================================================================
                                             The Hero Journey (End-to-End Test)
===========================================================================================================================
Step             Result            What is missing                                                                     Time
---------------------------------------------------------------------------------------------------------------------------
1. Upload        passed            -                                                                                  0.23s
2. Pass-through  not yet possible  a load does not carry the plan yet                                                 0.11s
3. Optimized     not yet possible  a load does not carry the plan yet; packages built through the compile service     0.02s
4. Comparison    not yet possible  requires tokens and timings from steps 2 and 3                                     0.00s
===========================================================================================================================

Failure details:
  2. Pass-through: engine did not report loaded plan identity (expected f489af65158b, got None)
  3. Optimized: the planner chose nothing different
  4. Comparison: requires tokens and timings from steps 2 and 3

Fixes #874

Diff: 419 lines (+314 / -105) across 5 files Reviewer: codebot-robot Review duration: 738m
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 419 lines diff across 5 files
0.45
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%
56%
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.361
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #875"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.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: 45.0% (MEDIUM) · Higher = larger blast radius
45.0%
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: 56.8% · Lower = rushed or shallow review
56.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: 19.5% · Safe to merge
19.5%