code-auditor-mcp 4.0.3 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  "name": "code-auditor",
11
11
  "source": "./plugin",
12
12
  "description": "Diff-scoped code quality auditing on every edit. Indexes your codebase, enforces invariants, and feeds violations back to the agent so fixes happen inline.",
13
- "version": "4.0.3",
13
+ "version": "4.0.4",
14
14
  "author": {
15
15
  "name": "Ben Hammond"
16
16
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  All notable changes to the Code Auditor MCP project.
4
4
 
5
+ ## [4.0.4] — 2026-09-20
6
+
7
+ ### Go analysis now works everywhere, not just Intel Macs
8
+
9
+ Go analysis silently returned zero findings on every platform but Intel Macs.
10
+ The shipped Go analyzer was a single `darwin/amd64` binary, so Apple Silicon,
11
+ Linux, and Windows (including all Linux/Windows CI) skipped Go entirely and
12
+ reported a clean tree. That silent-skip is fixed:
13
+
14
+ - **Per-platform binaries** — five static `CGO_ENABLED=0` binaries ship in the
15
+ package (`analyzer-darwin-arm64`, `analyzer-darwin-amd64`,
16
+ `analyzer-linux-amd64`, `analyzer-linux-arm64`, `analyzer-windows-amd64.exe`),
17
+ cross-compiled from one machine. The runtime picks the binary from **Node's**
18
+ platform/arch (Node spawns the process), not the Go toolchain's — a subtlety
19
+ that matters under Rosetta, where `go env` reports `amd64` while Node reports
20
+ `arm64`.
21
+ - **Cache-dir rebuild fallback** — when no native binary is present, the
22
+ analyzer now builds into the OS cache dir (`~/Library/Caches/code-auditor`,
23
+ `~/.cache/code-auditor`, `%LOCALAPPDATA%\code-auditor`) instead of writing into
24
+ the read-only shipped tree and overwriting the artifact.
25
+ - **Silent failure now says so** — a missing toolchain, wrong-arch binary, or
26
+ failed build surfaces as a named `Skipped analyzers` diagnostic in the text
27
+ CLI (`go-toolchain-missing`, `go-analyzer-wrong-arch`,
28
+ `go-analyzer-build-failed`) instead of a silent zero.
29
+ - **Guard 8** now asserts all five shipped binaries are present *and* that the
30
+ running platform's binary executes — a build where one cross-compile failed
31
+ can no longer pass on one machine and ship broken for another.
32
+
5
33
  ## [4.0.3] — 2026-09-20
6
34
 
7
35
  ### SQL injection: parameterized-query false positives fixed
package/dist/cli.js CHANGED
@@ -175,6 +175,25 @@ program
175
175
  `${covUnassessed} unassessed · ${covNotApplicable} not-applicable · ` +
176
176
  `${covCannotFire} cannot-fire`));
177
177
  }
178
+ // ── Skipped analyzers (Spec 61) ──────────────────────────────
179
+ // A language present on disk but never analyzed is a stated gap, not a
180
+ // silent zero. The Go path surfaces a named runtime failure (missing
181
+ // toolchain, wrong-arch prebuilt binary, failed rebuild) as a
182
+ // metadata.diagnostics entry; before this section those kinds were
183
+ // invisible outside --json, so a polyglot repo with .go files and no Go
184
+ // toolchain printed zero Go findings and exited clean — the silent-zero
185
+ // failure mode. These lead above coverage gaps: a skipped analyzer is a
186
+ // whole language unmeasured, more severe than a per-file visibility gap.
187
+ const skippedAnalyzers = (result.metadata?.diagnostics ?? []).filter((d) => d.kind === 'go-toolchain-missing' ||
188
+ d.kind === 'go-analyzer-wrong-arch' ||
189
+ d.kind === 'go-analyzer-build-failed');
190
+ if (skippedAnalyzers.length > 0) {
191
+ console.log(chalk.yellow(`── Skipped analyzers ── ${skippedAnalyzers.length}`));
192
+ for (const d of skippedAnalyzers) {
193
+ const name = d.analyzerName || 'go';
194
+ console.log(chalk.yellow(` ${name} [${d.kind}] — ${d.message}`));
195
+ }
196
+ }
178
197
  // ── Coverage gaps (Spec 58 follow-up) ─────────────────────────
179
198
  // Coverage diagnostics are the analyzer saying "my visibility ends here",
180
199
  // not "the code is wrong". They lead with counts, then per-occurrence