feat: local runner health probe - #93
Merged
Merged
Conversation
- return sentinel error instead of os.Exit(1) in Cobra RunE so the
MCP server isn't killed if probe-local is ever invoked as a tool;
SilenceUsage/SilenceErrors suppress Cobra's default post-error output
- swap http.DefaultClient for a scoped &http.Client{Timeout} to match
runners/local.go and close the post-connect hang gap that
context.WithTimeout alone doesn't cover
- add TestRunProbe_ServerError for the previously-uncovered 5xx
default-hint branch
5uck1ess
force-pushed
the
feat/local-runner-health-probe
branch
from
April 17, 2026 20:59
b9c71b2 to
cf1791a
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
devkit-engine probe-localsubcommand that verifies any OpenAI-compatible local inference endpoint (llama-server, llama-swap, Ollama, vLLM, SGLang, LM Studio, LocalAI). Reports reachability, latency, and whether the configuredDEVKIT_LOCAL_MODELis present in the server's/v1/modelsresponse. Exit 0 on healthy, 1 otherwise.--jsonflag emits structured output.Hooked into
/devkit:healthso the probe runs automatically whenDEVKIT_LOCAL_ENABLED=1. README now documents the fullDEVKIT_LOCAL_*env-var surface with default ports for 7 inference stacks and copy-paste examples.Zero behavior change for existing cloud-tier workflows.
Changes
src/cmd/probe_local.go+probe_local_test.go(~450 lines):ProbeConfig/ProbeResulttypes, purerunProbe(ctx, cfg)function,formatHuman/formatJSONformatters, Cobra command with--jsonflag andPersistentPreRunEoverride (probe doesn't need git repo / DB).runners.LocalEnabled/Endpoint/Model/APIKey/Timeouthelpers (previously package-private) for reuse.skills/health/SKILL.mdgains a "Local Runner" block.Test plan
make test— 369/369 pass across 6 packagesmake check—go vetclean,gofmt -lemptyDEVKIT_LOCAL_ENABLEDunset → "disabled" message, exit 0--jsonflag → valid JSON with correct fields, exit 0Limits (documented in README)
/v1/chat/completions).