feat(doctor): actionable, Fedora-safe doctor + install-time run (bd openlock-lvc.3)#52
Merged
Conversation
…tion runDoctorChecks now accepts null to skip interactive runtime detection (safe for curl-pipe installs), emitting a "container runtime (podman/docker)" failure with install hint. Each check carries a fix string printed under failed items. credentialsPath respects XDG_CONFIG_HOME for test isolation.
a81440d to
35fa0b2
Compare
…ialsPath HOME fallback (??)
vessux
added a commit
that referenced
this pull request
May 30, 2026
…p race (bd openlock-eh8) (#55) post-create-exec-proxy.test.ts was the one echo-mode integration test still on bare `curl -sf`, missing the `--retry 5 --retry-all-errors` hardening its siblings (harness-cred-inject, openrouter-opencode-cred-inject) received in #38. That gap is why it became the recurring exit-56 flake locus on #52/#53/#54. exit 56 = curl CURLE_RECV_ERROR from the in-container echo proxy on first egress, relayed faithfully through ssh (ssh's own transport failures are 255, never 56) — NOT an ssh transport drop as previously suspected. `curl -s` was muting curl's error, which presented as "empty stdout/stderr". - add `--retry 5 --retry-all-errors --retry-delay 1` to the post-create exec test - switch all three flaking tests `-sf` -> `-sSf` so a retries-exhausted failure surfaces curl's real error instead of being silently muted bd openlock-eh8
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
First slice of the onboarding golden-path epic (bd openlock-lvc): make
openlock doctoractually help cold installs.Bun.which(direct PATH search) instead of shelling out towhich, which Fedora 43 doesn't ship. Extracted one sharedcommandExists, replacing four duplicated buggy copies — doctor, the runtime probe, the fzf picker, and the openshell cred-refresh lookup. The runtime-probe copy was the worst: on Fedora it made auto-detection fail and launched the interactive picker even when podman worked.fix:command (e.g.podman machine start,systemctl --user enable --now podman.socket,openlock login). Platform-aware install hints (brewon Mac /apton Linux; docker → official docs URL, sinceapt install dockerinstalls the wrong package).curl | sh); emits acontainer runtime (podman/docker)failure with an install hint when neither is found. NewresolveRuntimeNonInteractive()inruntime.ts.install.shrunsopenlock doctorat the end (full path,|| truesoset -euo pipefailcan't abort the install).credentialsPath()now honorsXDG_CONFIG_HOME, matchingglobalConfigPath().Out of scope (deferred per design):
doctor --fixauto-remediation,--json, severity tiers,/etc/os-releaseparsing.credentialsPath()now respectsXDG_CONFIG_HOME(previously always~/.config). Users with a customXDG_CONFIG_HOMEmay appear logged out after upgrade and need to re-runopenlock login(or move~/.config/openlock/credentials.json→$XDG_CONFIG_HOME/openlock/). No effect whenXDG_CONFIG_HOMEis unset (the common case) — and it aligns credentials with where the global config already lived.Test plan
lint,typecheck,knipall green.openlock doctor→ all checks pass, exit 0. Forced-failure run (XDG_CONFIG_HOME=<empty> OPENLOCK_RUNTIME=docker) →fix:lines render under the failing docker-daemon and credentials checks, exit 1 preserved.install.shruntime behavior — covered only bybash -nhere; needs a Mac/Lima install smoke before/after release.Closes bd openlock-lvc.3.