Comments: trim to the established cadence

The MCP code came in with 5–8 line file headers, JSDoc on every
one-line wrapper, and inline explanations that referenced the PR
itself ("so the MCP server can reuse it") — none of which matches
api/server.js or frontend/src/lib/, where comments are one-line,
fact-shaped and never mention the change that introduced them.

Trimmed across mcp/src/*.js, i18n-core.js, i18n.js, exercises.js,
format.js, mcp/test/tools.test.js, mcp/vitest.config.js and
mcp/README.md. Tool prefaces lost their numbers; duplicate fs.watch
rationale folded into one; the ASCII import diagram in the README
replaced with a paragraph; the cross-references and self-references
removed. Also fixed two real defects: a corrupted Cyrillic word in a
state.js comment and a missing space in a tools.test.js comment.

No code changes; 92 frontend + 32 MCP tests still pass.
This commit is contained in:
Pengboi committed 2026-07-26 19:47:52 +01:00
1 parent 4143ab8676
commit 6aaf2a3eea
11 files changed
+93 -245

No files matched your search

-9
View File
@@ -1,20 +1,11 @@
// Vitest config for the MCP server tool tests. Mirrors the conventions of frontend/vite.config.js
// (no global config, no auto-watch, run once and exit) — kept in mcp/ rather than hoisted to the
// repo root so this package is self-contained and re-usable for any Node-side helper we add later.
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
include: ['test/**/*.test.js'],
// The tests import from ../src and ../../frontend/src/lib, both already ESM — no transform
// needed beyond what Vite does natively. Fake timers are used in tests that pin "today"
// (see tools.test.js header comment); they only mock Date, not setTimeout, so the file
// watcher in state.js (real setTimeout/setInterval via fs.watch) keeps working.
globals: false,
environment: 'node',
pool: 'forks',
// Stryker spawns vitest per-mutant; isolating each test file in its own process keeps a
// crashing mutant from taking siblings down with it. Costs ~50ms/test, trade worth it.
isolate: true,
reporters: ['default']
}