{"record":{"id":"a7950e228ab16b18","repo":"juanfont/headscale","slug":"w-see-details-above","errorCode":null,"errorMessage":"%w - see details above","messagePattern":"%w - see details above","errorType":"exception","errorClass":"ErrSystemChecksFailed","httpStatus":null,"severity":"error","filePath":"cmd/hi/doctor.go","lineNumber":89,"sourceCode":"\t\tresults = append(results, checkK3sImage(ctx))\n\t}\n\n\t// Check 3: Go installation\n\tresults = append(results, checkGoInstallation(ctx))\n\n\t// Check 4: Git repository\n\tresults = append(results, checkGitRepository(ctx))\n\n\t// Check 5: Required files\n\tresults = append(results, checkRequiredFiles(ctx))\n\n\t// Display results\n\tdisplayDoctorResults(results)\n\n\t// Return error if any critical checks failed\n\tfor _, result := range results {\n\t\tif result.Status == statusFail {\n\t\t\treturn fmt.Errorf(\"%w - see details above\", ErrSystemChecksFailed)\n\t\t}\n\t}\n\n\tlog.Printf(\"✅ All system checks passed - ready to run integration tests!\")\n\n\treturn nil\n}\n\n// checkDockerBinary verifies Docker binary is available.\nfunc checkDockerBinary() DoctorResult {\n\t_, err := exec.LookPath(\"docker\")\n\tif err != nil {\n\t\treturn fail(\n\t\t\t\"Docker Binary\",\n\t\t\t\"Docker binary not found in PATH\",\n\t\t\t\"Install Docker: https://docs.docker.com/get-docker/\",\n\t\t\t\"For macOS: consider using colima or Docker Desktop\",\n\t\t\t\"Ensure docker is in your PATH\",","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/hi/doctor.go#L71-L107","documentation":"Sentinel error ErrSystemChecksFailed returned by the `hi doctor` command when at least one critical check has status statusFail. The doctor verifies the environment needed for Docker-based integration tests: Docker binary on PATH (exec.LookPath), Docker daemon reachability, Go toolchain, git repository state, and required repo files. The rendered message ends with '%!w(<nil>)'-free ' - see details above' because it wraps the sentinel; the actionable output is the per-check table printed by displayDoctorResults just before the return.","triggerScenarios":"runDoctorCheck executing the check set and any result landing on statusFail — e.g. `docker` not found via exec.LookPath, daemon socket unreachable, not inside a git checkout, or missing required repo files.","commonSituations":"Fresh machine without Docker installed or not in PATH; Docker daemon not started; running `hi` from outside the headscale repository; nix dev shell not entered so auxiliary files/toolchain are absent.","solutions":["Scroll up and read the doctor table — the row marked FAIL names the exact check; fix that check","Run `go run ./cmd/hi doctor` standalone to iterate on the environment without starting a test","Typical fixes: install/start Docker (`docker info` must succeed), ensure `docker` is on PATH, run from the repo root inside `nix develop`","Re-run `go run ./cmd/hi doctor` until it prints the all-checks-passed message"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"go run ./cmd/hi doctor  # exit 0 means all critical checks pass\n# only then:\ngo run ./cmd/hi run \"TestName\"","typeGuard":null,"tryCatchPattern":"if err := runDoctorCheck(ctx); err != nil {\n    if errors.Is(err, ErrSystemChecksFailed) {\n        // environment problem, not a code problem — fix env and retry, don't debug the test\n        log.Fatalf(\"environment not ready; run 'hi doctor' for details\")\n    }\n    return err\n}","preventionTips":["Run `hi doctor` in CI as a separate gating step before test jobs","Always enter `nix develop` before hi commands so the toolchain is present","Treat ErrSystemChecksFailed as environment-fix-first: read the doctor table before touching test code"],"tags":["hi-runner","pre-flight","docker","environment-checks"],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}