← Back to Pull requests

vxpu: remove fake gRPC server bloat in Go CLI and router tests #980

Closed
unknown closed this pull request without merging on Dec 01, 2026 11:15 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 15:44 UTC
Author

vxpu/cli: remove fake gRPC server tests in favor of real e2e

Hand-rolled mock gRPC servers in vxpu/cmd/vxpu tests duplicated behavior already exercised by real end-to-end tests and added maintenance overhead whenever proto fields or router interfaces changed.

Remove all hand-rolled fake gRPC servers from vxpu/cmd/vxpu tests:

  • Delete cliFakeExecutor, localEndpointAgent, captureEngineServer, and TestCmdAsk_ShipsVerifyGraphAndDraftPlanThroughRouter in speculation_cli_test.go. Keep a direct table-driven TestCmdAsk_Validation test with no gRPC server and run TestRouterSeparateDraftSpeculation_CPU and _GPU against the real agent.NewServer, router.NewServer, and Python vxpu.server.

  • Delete cliVerifyFakeExecutor and the fake-executor TestCmdPlanVerify in plan_verify_test.go, keeping only direct table-driven flag validation in TestCmdPlanVerify_Validation. Real executor equivalence is already covered by vxpu/pkg/planner equivalence tests.

  • Delete mockCompilerService, mockAgentServer, startMockCompilerAgent, TestCmdPlanPackages_BuildWithMTLS, TestCmdPlanPackages_BuildThroughMockAgent, and TestCmdPlanPackages_MissingPackageFileFails in plan_test.go, which duplicate TestCmdPlanPackages_BuildThroughService and ap-e2e-vxpu mTLS suites. Seed compile failures directly via store.RecordCompileFailure in TestCmdPlanPackagesWithFailures.
  • vxpu/router: remove redundant fake gRPC server tests covered by e2e

    Several router tests spun up hand-rolled fake ExecutorServer and AgentServer implementations to check mTLS handshakes, GetVocab forwarding, Generate and Execute streaming, stats recording, basic golden pass/fail checks, and proto field forwarding that real end-to-end tests already verify.

    Remove the redundant fake-server tests while preserving concurrency, reconciliation, fault-injection, and direct no-server validation tests:

  • Delete mtls_test.go (covered by vxpu/tests/e2e/pki_test.go and vxpu/pkg/mtls tests).

  • Delete vocab_test.go (covered by vxpu/tests/e2e/e2e_test.go), keeping the no-server FailedPrecondition check alongside TestNewSession_NoModelLoaded in router_test.go.

  • Remove fakeExecutor streaming tests and describingFakeExecutor from router_test.go.

  • Remove TestStats_RecordsNamedModelRequests from stats_test.go, keeping the no-server buffer and backoff tests.

  • Remove the five basic fake-executor golden match and mismatch tests from golden_test.go, keeping concurrency and model-standing tests.

  • Remove redundant fake-executor proto-forwarding tests from catalog_test.go and replace TestLoadModel_GoalStoredOnInstanceDesired with direct no-server TestGoalValidation_RefusesInvalidAndUnsupported.
  • Fixes #978

    Diff: 345 lines (+258 / -87) across 4 files Reviewer: justinsb Review duration: 1170m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 345 lines diff across 4 files
    0.42
    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%
    60%
    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.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #980"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 16.7% · Safe to merge
    16.7%