Repository navigation
Conversation
e98dd64 to
9f9c226
Compare
1cc2925 to
ab35928
Compare
The core and CLI entry no longer know MCP: --mcp-url/--mcp-header come from the builtin source's options, the rerun command and the no-project subject come from Evidence Source runs, and DoctorRunOptions.mcp becomes sources.mcp.
9f9c226 to
d4d1728
Compare
ab35928 to
087bcec
Compare
There was a problem hiding this comment.
Important
An extension-only MCP report can now send an agent rerun to the wrong directory, and the unchanged Vite plugin option mcp: [] can fail a build that previously passed.
Approach: Moving the fetch, CLI options, and redaction into an Evidence Source is the right boundary, but the migration needs to preserve how Doctor composes and reports MCP evidence from extensions.
Reviewed changes
- Evidence collection: Traced validation, collection order, contributor collisions, and Vite Surface input mapping.
- CLI and reports: Checked repeatable flags, redaction, no-project subjects, and generated rerun commands.
- Verification: The build and 269 focused tests passed with
NO_COLOR=1. A report budget test failed with color enabled on both the base and head. Separate probes checked the regressions below against the base.
gpt-6.2-sol(high) | 𝕏
commit: |
There was a problem hiding this comment.
✅ No new issues found; no P0 or P1 findings remain.
Reviewed changes
- Moved built-in flag validation before config loading. Extension flags are still discovered after config loads; verified that both kinds of flags work in the same invocation.
- Restored access to fetched MCP tools for Runtime Evidence contributors. The MCP Evidence Source runs before those contributors, and an empty Vite
mcplist no longer reserves the evidence key. - Restored live subjects for contributed MCP targets. Reports deduplicate fetched and contributed targets; agent reruns keep the original directory without adding network flags for contributed targets.
- Verified the fixes.
pnpm buildand 394 tests across 16 focused suites passed withNO_COLOR=1.
gpt-6.2-sol(high) | 𝕏
Keeps this PR's version over base changes: - src/core/internal/scan-session.ts: The merge retains the base's awaited validation before any contributor or collector but deliberately replaces the collection call with one that runs early sources before Runtime Evidence contributors and other sources afterward. Keeps the base version over this PR's changes: - src/cli-main.ts: The base's exact-string parser supersedes the PR's CAC flag plumbing while retaining generated help, declaration-based repeatability, and built-in validation before config loading. - src/core/internal/evidence-sources.ts: The base's awaited validation pass replaces the PR's synchronous input normalization while collection still preserves the PR's early and late phases. - src/core/internal/scan-session.ts: The base supplies validated source requests in place of raw registry options while the updated call still runs Runtime Evidence contributors between the PR's collection phases.
There was a problem hiding this comment.
✅ No new issues found; no P0 or P1 findings remain.
Reviewed changes
- Moved built-in Evidence Source flags to the shared string-preserving parser. Confirmed that MCP and extension flags work in the same invocation and that malformed MCP inputs are still rejected before executable config loads.
- Integrated async validation with the existing collection order. Confirmed that a rejected extension input prevents the MCP request, and that on valid runs, Runtime Evidence contributors still see the fetched MCP tools.
- Verified the merge.
pnpm buildand 247 tests across 11 focused suites passed withNO_COLOR=1.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
✅ No new issues found; no P0 or P1 findings remain.
Reviewed changes
- Reused resolved Doctor Extensions. Verified that the prepared run keeps both built-in MCP and extension inputs without invoking the config loader twice.
- Preserved config reloads in watch mode. Verified that the initial run calls the loader once and a config change triggers a fresh load on the next run.
pnpm build and 81 focused tests passed.
gpt-6.2-sol(high) | 𝕏

Stacked on #445. This makes the live MCP check the first Evidence Source, so the core and the CLI entry no longer know MCP exists.
What changes
vite-doctor/builtin-mcpdeclaresmcpEvidenceSource(src/mcp/evidence.ts). Itsurlandheaderoptions produce--mcp-urland--mcp-header. Header parsing, URL validation and redaction moved there fromcore/internal/cli.ts,cli-main.tsandcore/reports.ts.DoctorRunOptions.mcpis gone. Programmatic callers passsources: { mcp: [{ url, headers }] }. The Vite plugin'smcpoption stays and maps tosources.mcp.The CLI declares builtin source flags from
src/builtin-sources.ts, so--helpstill lists them and repeatable flags come from each option'srepeatable. Inputs are validated before the run starts, as--mcp-urlwas before.Reports are generic:
args.subject.mcpServers: ["<origin>"]subject.live: [{ source: "mcp", target: "<origin>" }]Checked: MCP server <origin>Checked: MCP server <origin>(from the source'slabel)subject.livemirrorsorigin.liveon Diagnostics.A source only clashes with a Runtime Evidence contributor of the same name when the run reads that source. Extensions that contribute
{ mcpServers }undermcpkeep working without--mcp-url.New test: nothing under
src/core/**or insrc/cli-main.tsimports@loadsheet/mcporsrc/mcp/, or contains a--mcp-literal.Where MCP still lives outside
src/mcprunViteDoctorinsrc/doctor.tsstill does the post-run MCP bookkeeping: checked servers,evidenceUsed, and gaps for unread servers. It applies to MCP evidence from any contributor, not just this source, so it stays there for now.src/plugin.tskeeps themcpoption and resolves relative paths such as/mcpagainst the dev server.Breaking
subject.mcpServersis nowsubject.live.runViteDoctor({ mcp })is nowrunViteDoctor({ sources: { mcp } }).Doctor is pre-1.0, and no compatibility path is kept.
Checks
vp test runpasses: 311 files, 12,120 tests, after rebasing onto the bot's fixes to fix(mcp): say where a live MCP finding came from #443 and feat(reports): show where each Diagnostic came from #444.tsc --noEmitis clean forsrcandtests, and lint is clean on the changed files. The one warning intests/mcp/evidence.test.tswas already on the base branch.🤖 Generated with Claude Code