Skip to content

fix(cli): carry status/doctor live proxy onto dig2-go (#642) - #679

Merged
Wibias merged 1 commit into
lidge-jun:dev2-gofrom
Wibias:maintainer-carry/642-status-live-proxy
Jul 29, 2026
Merged

fix(cli): carry status/doctor live proxy onto dig2-go (#642)#679
Wibias merged 1 commit into
lidge-jun:dev2-gofrom
Wibias:maintainer-carry/642-status-live-proxy

Conversation

@Wibias

@Wibias Wibias commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Go port

Deferred: #678

Go already has FindLiveProxy / status callers; needs parity for read-only configFn, authoritative null PID, and listen source.

Test plan

  • Cherry-pick clean

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.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 811c5182-dcae-419e-963f-73ce7c5d1d2e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@Wibias
Wibias merged commit 2f2c83c into lidge-jun:dev2-go Jul 29, 2026
7 of 10 checks passed
@github-actions github-actions Bot added the bug Something isn't working label Jul 29, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/cli/status.ts
Comment on lines +166 to +167
message: `ok (pid ${live.pid ?? "unknown"})`,
label: `${listen.healthUrl} ok (live)`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread src/cli/doctor.ts
Comment on lines +734 to +735
const runningProxyEnv = collectRunningProxyEnv({
readPidFn: () => (live ? live.pid : readPid()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant