Skip to content

[Fix] Doctor reports blank auth credentials as configured - #2300

Merged
roomote-roomote[bot] merged 1 commit into
developfrom
fix/doctor-blank-auth-2zq6caqicgljt
Sep 7, 2026
Merged

[Fix] Doctor reports blank auth credentials as configured#2300
roomote-roomote[bot] merged 1 commit into
developfrom
fix/doctor-blank-auth-2zq6caqicgljt

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. View the task or mention @roomote-roomote for follow-up asks.

Related issue

No linked issue. This is a maintainer-authorized, bounded diagnostic correction.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

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:

env -i PATH="$PATH" HOME="$HOME" PM2_HOME=/tmp/opencode/doctor-pm2 \
  R_SLACK_CLIENT_ID='   ' R_SLACK_CLIENT_SECRET=synthetic-not-a-real-secret \
  pnpm --filter @roomote/dev exec tsx src/doctor.ts

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.

  • Five added parameterized cases failed before the fix; all 23 doctor tests passed afterward with 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, package format:check, targeted oxlint, and git diff --check passed.
  • The unchanged pre-push hooks passed repository-wide oxlint, residual ESLint, check-types:fast (27 packages), and knip. Knip printed a non-failing existing mint ignoreBinaries configuration hint.
  • Browser, visual, deployment and external-provider proof are not applicable to this CLI presence-only correction. No production sign-in, credential validity, or Compose startup claim is made. Full repository tests and formatting-inclusive pnpm lint were not run.

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

The 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.

@roomote-community

Copy link
Copy Markdown
Contributor

Reviewing the PR now. Follow

Reviewing f3b0d42

@roomote-roomote
roomote-roomote Bot merged commit 4b64ce0 into develop Sep 7, 2026
16 of 17 checks passed
@roomote-roomote
roomote-roomote Bot deleted the fix/doctor-blank-auth-2zq6caqicgljt branch September 7, 2026 03:25
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