fix(doctor): stop requests-proxy readiness false-green — honest neutral until the egress probe (cli#351)#369
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 57b4632. Configure here.
57b4632 to
be3b41d
Compare
|
One design call worth surfacing: the honest downgrade only shows up under So we've killed the false green on the per-check line (that's the acceptance bar), but the default UX still reads as full confidence. Intentional per the PR description ( |
…es-to-assert) Asad's review on #369: the StatusUnknown doc only covered the 'prerequisite unavailable' case, but the requests-proxy egress check now uses it for a different reason — the check ran fine and just declines to assert an egress green it can't back. Documents both meanings on the sentinel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rebased onto develop after the doctor redesign (#365), which kept the readiness-based StatusOK. checkRequestsProxy no longer greens off ReadyReplicas alone — a present + Ready relay returns a neutral StatusUnknown ("running, egress not actively verified"), never a checkmark; down / missing still fail. worstStatus ignores StatusUnknown, so a healthy environment's overall verdict is unchanged. The real green arrives once the requests-proxy health probe (backend#1143) ships and doctor consumes it. Refs #351 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…es-to-assert) Asad's review on #369: the StatusUnknown doc only covered the 'prerequisite unavailable' case, but the requests-proxy egress check now uses it for a different reason — the check ran fine and just declines to assert an egress green it can't back. Documents both meanings on the sentinel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0d9e554 to
002841a
Compare
|
Agreed it's a conscious call — and for now I'm keeping the healthy-cluster headline green. Reasoning:
If we want the rolled-up view to carry an "egress not actively verified" note before #1143 lands, that's a small verdict-rollup tweak — I'd rather scope it with the doctor-redesign owner than bolt it onto this PR. Leaving that sub-call to Lukas. |
|
/fr-pass — verified live on dev: with requests-proxy Ready, |

What
Part 2 of #351.
checkRequestsProxy(the "Service Bus egress (requests-proxy)" check) treated the requests-proxy Deployment'sReadyReplicas > 0as proof that "Service Bus egress works" — a false green. Readiness is not the same as the proxy being able to relay egress to Service Bus. This PR removes that false green.When the relay is present and Ready, the check now returns a neutral, honest
StatusUnknown— rendered as a dim·line, not a green check — with the detail:The genuine, locally-detectable failure signals are unchanged and still fail:
Why the honest downgrade, not an active probe
An active in-cluster egress probe is not cleanly feasible today, so per the ticket's fallback this PR does the honest downgrade instead:
doctorruns off-cluster and is a read-only sweep. Reaching the in-cluster relay would need a port-forward/exec, i.e. newpods/portforwardpermissions the doctor does not hold — out of scope for this fix. And with no health endpoint to hit, it would only re-confirm "container listening" = readiness again.So the correct move now is to stop asserting a green we cannot back up.
StatusUnknowncarries no signal (Worst()ignores it), so a healthy environment's overall verdict stays "All checks passed" while this one line honestly reads neutral. The real green check arrives once backend#1143 ships the health probe and doctor consumes it (tracked in epic backend#1142).This meets the acceptance bar: doctor no longer reports a green "egress works" purely from readiness.
Files
internal/doctor/doctor.go—checkRequestsProxy: Ready branch now returnsStatusUnknown+ honest detail; doc comment rewritten to explain the readiness-vs-egress gap.internal/cli/doctor.go—doctor --helpblurb: "...is Ready" → "...is running (egress not directly verified)".internal/doctor/doctor_test.go— tests updated to lock the downgrade (table case, wording test, nil-release + bare-name "found" cases), plus a healthy-cluster assertion that the egress line reads neutral end-to-end.Test plan
make cigreen end-to-end:go build ./...,go vet ./...— cleangofmt -s -l internal//goimports -local— no driftgo test -race -cover ./...— all 17 packages pass (doctor 93.0%)make lint(errcheck, ineffassign, misspell, staticcheck) — cleanschema-check,vulncheck(no vulnerabilities),file-budget,deadcode— all passRefs #351 — fixes the readiness false-green here; the active egress probe (a real ✓) stays open, blocked on backend#1143.
🤖 Generated with Claude Code
Note
Low Risk
Behavior change is limited to doctor messaging and one check’s status when the proxy is healthy; failures for missing/down proxy are unchanged and unknown statuses do not affect exit codes.
Overview
Service Bus egress (requests-proxy) no longer shows a green check when the deployment is merely Ready. That path now returns
StatusUnknownwith copy that the relay is running but egress to Service Bus is not actively verified—readiness only means the container started, not that relay works (cli#351; real probe blocked on backend#1143).StatusUnknownis documented for a second case: checks that ran but refuse to assert OK when they cannot back it up, not only when prerequisites (e.g. unreachable API) blocked the check. Verdict rollup still ignores unknown, so missing or not-ready requests-proxy stays fail and a healthy cluster can still roll up to all passed.Tests lock the ready → unknown behavior, updated detail wording (
not actively verified), and nil-release / bare-name “found” cases.Reviewed by Cursor Bugbot for commit 002841a. Bugbot is set up for automated code reviews on this repo. Configure here.