Skip to content

fix(cli): reach /health and /ready above a named forge's prefix in doctor - #519

Merged
BryanFRD merged 2 commits into
mainfrom
fix/cli-doctor-forge-base
Oct 3, 2026
Merged

BryanFRD merged 2 commits into
mainfrom
fix/cli-doctor-forge-base

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Closes #518

lfsx doctor now asks /health and /ready at the service root: a trailing /-/{forge} is taken off the base URL for those two, and kept for the repository checks. A deployment behind a path prefix (https://example.com/lfs/-/work) keeps its prefix. Unit-tested.

@BryanFRD
BryanFRD enabled auto-merge (squash) October 3, 2026 09:56

@ferrfleet ferrfleet Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks correct. The server mounts /health and /ready at the root and puts forges under /-/{name}/, so stripping one trailing /-/<name> segment matches what the server does.

Nit: Server::new trims trailing slashes, so the .../-/ case in a_base_without_a_forge_is_its_own_root can't come up as a real base (it would be .../-). It doesn't hurt, but it tests a case that never happens.

@ferrfleet ferrfleet Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2666583 is fine: on main, doctor.rs was the only caller of Server::get, so dropping it in favour of get_from_root plus a private fetch doesn't break anything. CI was still running when I reviewed this.

@BryanFRD
BryanFRD merged commit 0917e4b into main Oct 3, 2026
27 checks passed
@BryanFRD
BryanFRD deleted the fix/cli-doctor-forge-base branch October 3, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lfsx doctor fails against a named forge's URL

1 participant