Repository navigation
fix: make doctor diagnostics actionable - #569
Merged
Merged
Conversation
Collaborator
|
The direction is right: exit 1 on failed checks, do not assume TGit before init, and keep hook checks aligned with inject. It cannot merge as-is — it conflicts with While rebasing:
No must-block bug in the core logic. After the conflict is resolved and the notes above, this can merge. |
yuzhang-zhong
force-pushed
the
fix/doctor-diagnostics
branch
from
September 16, 2026 08:18
ec40873 to
7dc7675
Compare
Contributor
Author
|
Rebased onto the current
Verified with build, typecheck, 29 focused unit tests, and all 3 doctor CLI E2E cases. The Linux unit suite reports 3259 passing and 8 failures; the same 8 |
This was referenced Sep 16, 2026
jeff-r2026
pushed a commit
that referenced
this pull request
Sep 17, 2026
The checks that catch "reported success, nothing on disk" lived inside doctor() as a local array, so nothing else could run them, and the only machine-readable result was the exit code #569 added. Extract resolveDoctorContext() and buildChecks(), which render nothing, and add --json: one object on stdout, every log line on stderr, exit code unchanged. Human output is byte-for-byte what it was.
Walternater
pushed a commit
to Walternater/teamai-cli
that referenced
this pull request
Nov 2, 2026
Walternater
pushed a commit
to Walternater/teamai-cli
that referenced
this pull request
Nov 2, 2026
The checks that catch "reported success, nothing on disk" lived inside doctor() as a local array, so nothing else could run them, and the only machine-readable result was the exit code Tencent#569 added. Extract resolveDoctorContext() and buildChecks(), which render nothing, and add --json: one object on stdout, every log line on stderr, exit code unchanged. Human output is byte-for-byte what it was.
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.
What changed
This is the
doctorpart of #545, resubmitted on its own after the review there. It contains nomembers --invitechanges and does not change #517.Why
teamai doctorcould 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 typechecknpm run buildnpx vitest run src/__tests__/doctor.test.ts src/__tests__/pkg-commands.test.ts(29 passed)npm run test:e2ein Ubuntu (139 passed, 26 skipped, 0 failed)npm testin Ubuntu (3133 passed, 8 failed)The remaining 8 failures are all in
local-agent.test.ts. Running that file against the currentorigin/mainproduces the same 8 failures.