{"record":{"id":"ee4d5fb8f2605a29","repo":"gastownhall/beads","slug":"dbproxy-unverified-process-inspection-is-not-impl","errorCode":null,"errorMessage":"dbproxy: unverified-process inspection is not implemented on %s","messagePattern":"dbproxy: unverified-process inspection is not implemented on (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/dbproxy/proxy/unverified_process_unsupported.go","lineNumber":13,"sourceCode":"//go:build !linux && !darwin && !windows\n\npackage proxy\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n)\n\n// errUnverifiedUnsupported mirrors procid.ErrUnsupported for the force-stop\n// path: on platforms with no process-inspection implementation the proxy\n// machinery refuses cleanly rather than guessing at a PID's identity.\nvar errUnverifiedUnsupported = fmt.Errorf(\n\t\"dbproxy: unverified-process inspection is not implemented on %s\", runtime.GOOS)\n\ntype unverifiedProcess struct{}\n\nfunc openUnverifiedProcess(pid int) (proc *unverifiedProcess, gone bool, err error) {\n\treturn nil, false, errUnverifiedUnsupported\n}\n\nfunc (p *unverifiedProcess) executableBasename() (basename string, gone bool, err error) {\n\treturn \"\", false, errUnverifiedUnsupported\n}\n\nfunc (p *unverifiedProcess) commandLineContains(needle string) (matched bool, gone bool, err error) {\n\treturn false, false, errUnverifiedUnsupported\n}\n\nfunc (p *unverifiedProcess) kill() (gone bool, err error) {\n\treturn false, errUnverifiedUnsupported","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/dbproxy/proxy/unverified_process_unsupported.go#L1-L31","documentation":"errUnverifiedUnsupported is a sentinel returned by every unverified-process operation on platforms with no implementation (only darwin, linux, windows are implemented). It mirrors procid.ErrUnsupported: instead of guessing a PID's identity on an unknown GOOS, the force-stop machinery fails cleanly. Callers can detect it with errors.Is.","triggerScenarios":"openUnverifiedProcess / executableBasename / commandLineContains / kill / exited are invoked on a GOOS without a build-tagged implementation, e.g. building the proxy force-stop path for freebsd, openbsd, or plan9.","commonSituations":"Cross-compiling bd for a niche platform and then triggering daemon stop/cleanup; running in an environment where an unsupported GOOS was assumed to work; CI matrices testing unimplemented platforms.","solutions":["Run bd on a supported platform (darwin, linux, or windows) for daemon stop operations.","Manually kill the daemon PID and remove the pidfile when on an unsupported platform.","File/await an upstream port of unverified_process_<goos>.go for your platform.","Guard automation to skip dbproxy force-stop on unsupported GOOS values (runtime.GOOS check)."],"exampleFix":"// before: force-stop on freebsd\nif runtime.GOOS == \"freebsd\" { proxy.Stop() }\n// after\ngoos := runtime.GOOS\nif goos == \"darwin\" || goos == \"linux\" || goos == \"windows\" {\n    proxy.Stop()\n} else {\n    // manual cleanup: kill recorded pid, remove pidfile\n}","handlingStrategy":"fallback","validationCode":"switch runtime.GOOS {\ncase \"darwin\", \"linux\", \"windows\":\n    // unverified-process force-stop supported\ndefault:\n    // unsupported: plan manual pidfile cleanup instead\n}","typeGuard":null,"tryCatchPattern":"proc, gone, err := openUnverifiedProcess(pid)\nif err != nil {\n    if errors.Is(err, errUnverifiedUnsupported) {\n        // fall back to manual cleanup: read pidfile, verify PID, kill by hand\n        return manualCleanup(pidfilePath)\n    }\n    return err\n}","preventionTips":["Run bd daemon workflows only on darwin, linux, or windows.","In cross-platform automation, feature-detect support via runtime.GOOS before invoking force-stop.","On unsupported platforms, document and script the manual cleanup path (kill PID + remove pidfile).","Keep CI matrices aligned with supported GOOS values."],"tags":["go","platform-support","unsupported-os","build-tags"],"backgroundTag":"platform-not-supported","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}