fix(cli): carry status/doctor live proxy onto dig2-go (#642) - #679
Conversation
Fixes lidge-jun#618. Prefer findLiveProxy over ocx.pid alone; keep status/doctor read-only on malformed config; preserve authoritative null live pids and runtime vs config listen source.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9324b6e1a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| message: `ok (pid ${live.pid ?? "unknown"})`, | ||
| label: `${listen.healthUrl} ok (live)`, |
There was a problem hiding this comment.
Preserve version and uptime in live health reports
When a proxy is running, this branch now bypasses checkProxyHealth and replaces its ok v<version>, uptime <seconds> result with only ok (pid ...). Consequently both the human-readable ocx status output and proxy.health.message in status --json lose existing diagnostic information on every successful live check. Preserve the version and uptime returned by the first identity probe—such as by carrying them through proxyIdentityAt/findLiveProxy—and add focused live-status coverage.
AGENTS.md reference: src/AGENTS.md:L24-L25
Useful? React with 👍 / 👎.
| const runningProxyEnv = collectRunningProxyEnv({ | ||
| readPidFn: () => (live ? live.pid : readPid()), |
There was a problem hiding this comment.
Distinguish a live proxy whose PID is unavailable
When findLiveProxy discovers an orphaned legacy proxy, it intentionally returns a live result with pid: null; passing that null into collectRunningProxyEnv makes the doctor print no running ocx proxy process found, even though the following memory section and restart hints treat the proxy as running. In this scenario the process environment is merely unavailable because its PID is unknown, so pass the live-state information through and render an unavailable/unknown-PID diagnostic instead of not_running, with focused coverage for this live-null-PID path.
AGENTS.md reference: src/AGENTS.md:L24-L25
Useful? React with 👍 / 👎.
Summary
e6169b0eontodev2-go(TS oracle + tests).Go port
Deferred: #678
Go already has
FindLiveProxy/ status callers; needs parity for read-only configFn, authoritative null PID, and listensource.Test plan