Skip to content

fix: stop doctor from implying authentication - #48

Closed
zongqichen wants to merge 2 commits into
mainfrom
fix/doctor-auth-status
Closed

zongqichen wants to merge 2 commits into
mainfrom
fix/doctor-auth-status

Conversation

@zongqichen

Copy link
Copy Markdown
Owner

A configured CF target does not prove that its access or refresh token is valid. Change the workspace-target doctor result from ready to configured; authentication not checked, add regression coverage, and document the fix. Validation: make check and make release-check.

zongqichen added a commit that referenced this pull request Nov 2, 2026
## Why
Doctor reported `ready` or `authenticated` for saved expired tokens
because `cf target` can succeed without contacting Cloud Foundry. Its
output now describes local configuration and states that authentication
was not verified.

## What changed
- Correct both complete-target and missing-org/space messages.
- Add CLI regressions for text and JSON output and document the local
diagnostic scope.

## Scope
- Covers doctor output only.
- Retains existing statuses, exit codes, and offline behavior.

## Blast Radius
Users and JSON consumers receive more precise messages. Shared import
checks and login behavior are unchanged.

## Verification
- CLI regressions fail before the fix and pass afterward.
- Official CF CLI tests with expired synthetic tokens confirm the
corrected messages, unchanged no-token behavior, and zero API requests.
- `make check`, `make release-check`, `make security`, and `make smoke`
pass.

Closes #56. Supersedes #48.
@zongqichen

Copy link
Copy Markdown
Owner Author

Superseded by #57, which is now merged. The replacement corrects both doctor authentication claims on current main and preserves the Go security and test-isolation fixes. Independent official-CF verification and all PR checks passed.

@zongqichen zongqichen closed this Nov 2, 2026
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.

1 participant