perf(test): replace module resets with direct spies and runtime seams

This commit is contained in:
Peter Steinberger
2026-02-13 16:04:43 +00:00
parent 59733a02c8
commit c2f7b66d22
11 changed files with 80 additions and 195 deletions

View File

@@ -10,7 +10,7 @@ import {
resolvePackedRootDir,
} from "../infra/archive.js";
import { runCommandWithTimeout } from "../process/exec.js";
import { scanDirectoryWithSummary } from "../security/skill-scanner.js";
import * as skillScanner from "../security/skill-scanner.js";
import { CONFIG_DIR, resolveUserPath } from "../utils.js";
type PluginInstallLogger = {
@@ -196,7 +196,7 @@ async function installPluginFromPackageDir(params: {
// Scan plugin source for dangerous code patterns (warn-only; never blocks install)
try {
const scanSummary = await scanDirectoryWithSummary(params.packageDir, {
const scanSummary = await skillScanner.scanDirectoryWithSummary(params.packageDir, {
includeFiles: forcedScanEntries,
});
if (scanSummary.critical > 0) {