Repository navigation
fix(model,doctor,netutil): guard occupied GPUs and harden HTTP MCP dialing - #656
toasterbook88 wants to merge 7 commits into
Conversation
…/doctor-dial-gpu-guard-20261117
toasterbook88
left a comment
There was a problem hiding this comment.
AXIS Grok gate
Verdict: PASS-WITH-RISK
PR #656: fix(model,doctor,netutil): guard occupied GPUs and harden HTTP MCP dialing
Head: b5b53e8
Files touched (10): cmd/axis/doctor.go, cmd/axis/doctor_http_dns_test.go (new), cmd/axis/doctor_http_fallback_linux_test.go (new), cmd/axis/model.go, cmd/axis/model_start_gpu_guard_test.go (new), cmd/axis/model_start_test.go, internal/netutil/dial.go, internal/netutil/dial_fallback_linux_test.go, internal/netutil/dial_test.go, and related test updates.
Invariant hits: none.
- GPU guard now refuses any observed ResidentModels GPU occupancy before llama-server launch.
--main-gpuis correctly treated as non-isolating. Missing index observations do not invent occupancy. Receipts carry snapshot provenance (daemon-cache). Aligns with observed-state truth boundary. - HTTP MCP probes now resolve once under the endpoint context (5s budget), dial only checked literal addresses via NewOutboundDialer (snapshot resolver, no rebinding, no proxy bypass), preserve Host/TLS identity, same-origin redirects, and ten-redirect bound. Interleave + raced fallback preserves alternate-family reachability without a second hostname resolve. Direct connect is documented; proxy-only endpoints produce advisory failure.
- No HITL/dispatch lock changes, no cache silent fallback, no secret_read / ssh_bypass / fleet_exec / spawn_subagent / self-authorize / unattended config write. Agent self-model untouched.
CI status (at review): Test & Build in_progress, govulncheck in_progress, Analyze (actions) in_progress, auto-merge skipped, Devin Review pending. mergeable_state: blocked. PR body reports local make ci-preflight green at prior SHA 997b568; full suite + race claimed green after fixes. Live GPU workloads and operator endpoints remain unverified (explicit in body).
Recommended operator action: Wait for CI green on this head. Confirm GPU-overlap rejection and MCP dial behavior on a live node with occupied GPU + dual-stack DNS if possible. No APPROVE. Do not merge until CI succeeds and residual live verification is acceptable.
Advisory only. Charter and invariants unchanged.
|
Re-reviewed commit 📋 Walkthrough (10 files)
Was this review useful? React with 👍 or 👎 to help TestDriver improve. Want help from the team that built TestDriver? Explore TestDriver for Business |
|
⏸️ Skipped this review: 3/3 PR reviews used this hour for this organization. Push a new commit after Wed, 18 Nov 2026 00:50:25 GMT and I'll review it. |
Explicit model starts could overlap an occupied GPU because
--main-gpuwas treated as device isolation. Doctor's HTTP MCP probes could also resolve a hostname once for validation and again for dialing, bypassing the checked address policy and the endpoint's DNS deadline.The four bugfix commits resolve those findings and preserve address fallback:
43daf820: reject any observed resident GPU occupancy before a llama-server launch. A different--main-gpucannot bypass the refusal. Missing GPU-index observations do not establish occupancy; CPU models on distinct ports remain permitted.8e7253e8: resolve and validate the exact addresses dialed under the endpoint context and five-second budget. Preserve explicit internal-host allowlists, Host/TLS identity, configured headers, same-origin redirects, and the ten-redirect bound.321945f7: snapshot the resolver before asynchronous transport work and race checked literal addresses when the preferred address stalls. Cancel losing attempts and close unused connections without another hostname resolution.997b568a: interleave address families so an alternate family starts after one fallback delay even when many preferred-family records precede it. Cover IPv4-first and IPv6-first answers.Validation at
997b568a44281c4f8703a7c90be06976ba5648e0: fullmake ci-preflightpassed, including hermetic tests, race tests, install tests, lint, build, coverage, public boundary, repository truth, documentation facts, workflow checks, and lifecycle checks. Regression probes reproduced the earlier GPU-overlap, DNS-deadline, rebinding, stalled-address, and alternate-family starvation failures; focused and race runs pass after the fixes. A separate review-only TLS probe also confirmed that endpoint cancellation closes a stalled handshake connection. The final fresh-context diff review approved with no findings or open questions.Ripwire was assessed separately from executable test results. Quality-delta exited 2 with four gating heuristics: three test-duplication pairs involving renamed tests and the HTTP probe growing from 56 to 71 lines. Declined: the test pairs share setup while asserting distinct behavior, and the added probe lines keep its context, transport, TLS, and proxy policy together. Its other 14 rows concern test entry points marked as dead code and complexity in two regression tests; Go executes those entry points and the tests pass. Test-gate exited 4 with 69 test-file obligations and 13 untested symbols or documentation sections; the full test suite passed, while the latter are unchanged transitive graph results. No new regression-test gap was established, and coverage of every graph-reported symbol is not claimed. No heuristic acknowledgements were added.
HTTP MCP probes connect directly and ignore environment proxies so a proxy cannot resolve a different destination. An endpoint reachable only through a proxy can therefore produce an advisory probe failure. These probes establish listener reachability, not MCP protocol readiness. Validation used hermetic tests and local fixtures; live GPU workloads, operator-configured endpoints, and deployed behavior remain unverified.