#1677

Make fx doctor check that fx works, not only what is configured

Draftfazxeswants to merge intofrom

Summary

  • fx doctor exits 1 when any check fails. Warnings alone still exit 0, and a bad flag still exits 2.
  • The credential is checked against the provider's model list for AI Gateway, ChatGPT, and Grok. A refused credential fails, a credential the provider never answers for is a warning, and no model call is made.
  • A model the provider does not list fails.
  • Each approved MCP server is connected in its own fx mcp show process and gets its own line. An unapproved server is never started.
  • All network checks share one 5 second limit. A check that hangs, or that doctor could not start in time, fails with its own line, and no check process outlives doctor.
  • Every problem has a fix: line. --json adds fix to each check and the fx version.
  • A malformed settings file fails with its path. An invalid FX_ value is a warning that names the value fx uses instead.
  • The repository is found from a subfolder, and git that is missing, too old, or refused by fx's git rules is a warning with a fix.
  • Inside a repository, gh sign-in is checked with gh auth status. Outside one, gh is not run.
  • The install line shows the fx version, binary path, and release channel, and warns about another fx on PATH.
  • Skill files that fail to load are listed with their path.
  • Old session side folders are listed with a count. fx doctor --fix removes them; plain fx doctor no longer deletes anything.
  • No config file and no saved sessions are no longer warnings.
  • fx doctor --json leaves the startup latency benchmark, since it now waits on network checks.

Docs

The doctor page on fx.sh needs the new exit codes, the --fix flag, the network checks and their 5 second limit, and the fix: lines.

Activity

0

No activity yet.

This pull request is a draft

Merging is unavailable until it is marked ready for review.