[Fix] Doctor reports blank auth credentials as configured - #2300
Merged
Conversation
Contributor
This was referenced Sep 7, 2026
daniel-lxs
marked this pull request as ready for review
September 7, 2026 03:16
daniel-lxs
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
September 7, 2026 03:16
daniel-lxs
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
No linked issue. This is a maintainer-authorized, bounded diagnostic correction.
Why this PR exists
The doctor CLI reported Slack or Microsoft Teams as configured when a required credential contained only whitespace. This gives operators a false-green auth configuration diagnostic.
What changed
Treat whitespace-only auth values as absent when checking Slack client ID/secret and Microsoft client ID/secret/tenant configuration. Operators now see the existing incomplete-configuration warning instead of a pass. Nonempty credentials and runtime-environment precedence are unchanged; this checks presence, not whether credentials are accepted by an OAuth provider.
How it was tested
Base:
d95a5fd045ff82f81d458256a6a871ec9cda611a. Tested head:f3b0d42742d99d73099b6dde873879473c33e2ad.Real CLI stimulus, with synthetic values and an isolated PM2 namespace:
Before:
[PASS] Auth providers: Slack. After:[WARN] Auth providers: incomplete Slack client ID/secret pair.The actual CLI also exercised six input/recovery cases: blank Slack ID warns; corrected Slack ID passes; missing Slack secret warns; no auth warns; blank Microsoft tenant warns; corrected Microsoft tenant passes. All six auth-output assertions passed. Each overall CLI invocation exited 1 because the isolated environment lacks Docker/runtime services and the default web/preview ports; this is not a claim that the deployment is healthy. No provider credentials or OAuth exchanges were used.
pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/dev exec vitest run src/__tests__/doctor.test.ts.pnpm --filter @roomote/dev check-types, packageformat:check, targeted oxlint, andgit diff --checkpassed.check-types:fast(27 packages), and knip. Knip printed a non-failing existingmintignoreBinaries configuration hint.pnpm lintwere not run.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changesetThe exact full lint/type commands above were not both run; package TypeScript plus full pre-push static gates passed as detailed above. No changeset was added for this development diagnostic correction.