← Back to Pull requests

vxpu/python: retire unused harnesses and slim synthetic test suites #983

Open
unknown opened this pull request with 314 lines diff across 3 files
View on GitHub
unknown unknown commented on Dec 01, 2026 12:33 UTC
Author

Commit 1: vxpu/python: trim oversized synthetic Python test suites

Remove Python unit tests that duplicate Go end-to-end and GPU test coverage, use synthetic mocks of internal gRPC/CUDA seams, or bolt ad-hoc checks onto vectors_test selftest:

  • vectors_test.py: remove 22 ad-hoc _check_* helpers (including dead CUDA checks that never ran in the CPU image presubmit and fake gRPC servicer checks), keeping the record/compare/selftest equivalence harness used by test-vxpu-image and vectors_compare_test.py.

  • segment_runner_test.py: remove TinyDeepSeekSegmentRunnerTest and SegmentRunnerCUDATest, which shell out to vxpu plan emit/tree and duplicate Go TestCmdPlanTree_TinyDeepSeek and TestVerifyPlanEquivalence; keep SegmentRunnerUnitTest.

  • stepgraph_test.py: remove mock-heavy StepGraphExchangeTest and test_engine_write_step_plan, plus PhaseTraceGPUTest and test_node_ops_tiny_model_cpu_split which duplicate StepPlanGPUTest and test_synthetic_dense_submodules.

  • qwen3_moe_test.py: remove hero_int4_moe tests and multi-shard INT4 AWQ/GPTQ/CUDA tests already covered by Go TestMultiShardInt4PlanAndExecute and bench-qwen3-30b-l4 --tiny; keep dense BF16 parity, INT4 bit-repacking/unpacking math, dense MLP and tied-embedding checks, config validation, and the model boundary guard.

  • speculation_test.py: remove SpeculationEngineCPUTest and fake ExecutorServicer refusal tests already covered by Go TestSpeculationExactnessThroughExecutor and TestSeparateDraftSpeculationOverGRPC; keep plan validation and target process-knob isolation checks.
  • Commit 2: vxpu/python: retire unused Python harnesses and simulators

    Audit callers of hero_int4_moe.py, expert_sim.py, diagnostics.py, and client.py across Go, Python, CI scripts, Dockerfiles, and docs:

  • Remove hero_int4_moe.py and its invocation in dev/ci/gpu/test-vxpu-gpu. Go TestMultiShardInt4PlanAndExecute and bench-qwen3-30b-l4 --tiny supersede it by exercising the real vxpu stack end to end on GPU.

  • Remove expert_sim.py (no live production, CI, Go, or e2e callers) and update vxpu/docs/design.md, plan.py, and experts_gpu.py comments.

  • Remove diagnostics.py and diagnostics_test.py (zero callers).

  • Keep client.py because modeling.py (AutoModelForCausalLM), e2e suites (facade_test.py and hero_test.py), and examples/gemma4 actively use it.

  • Update vxpu/python/pyrightconfig.json ignore entries and error counts.
  • Fixes #977

    Diff: 314 lines (+235 / -79) across 3 files Reviewer: kube-agents-bot[bot] Review duration: 140m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 314 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.344
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #983"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 21.5% · Safe to merge
    21.5%