Skip to content

fix: make doctor diagnostics actionable - #569

Open
yuzhang-zhong wants to merge 1 commit into
Tencent:mainfrom
yuzhang-zhong:fix/doctor-diagnostics
Open

yuzhang-zhong wants to merge 1 commit into
Tencent:mainfrom
yuzhang-zhong:fix/doctor-diagnostics

Conversation

@yuzhang-zhong

Copy link
Copy Markdown

What changed

This is the doctor part of #545, resubmitted on its own after the review there. It contains no members --invite changes and does not change #517.

  • return exit code 1 when any diagnostic fails
  • avoid provider checks until a valid team config identifies the provider
  • resolve hook paths for the active scope and skip agents excluded by local config
  • document exit-code behavior in English and Chinese
  • cover both CLI exit paths with a built-binary E2E test

Why

teamai doctor could report failed checks and still exit 0. On a fresh install it could also ask for TGit tooling before TeamAI knew which provider the team used. That made the result confusing for people setting up TeamAI and unreliable in scripts.

Testing

  • npm run typecheck
  • npm run build
  • npx vitest run src/__tests__/doctor.test.ts src/__tests__/pkg-commands.test.ts (29 passed)
  • npm run test:e2e in Ubuntu (139 passed, 26 skipped, 0 failed)
  • npm test in Ubuntu (3133 passed, 8 failed)

The remaining 8 failures are all in local-agent.test.ts. Running that file against the current origin/main produces the same 8 failures.

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