fix(FN-2364): harden diagnostics context and plugin reload imports

- Add explicit operation metadata to agent-generation and ai-session-store diagnostics for cleanup, recovery, and scheduled cleanup paths
- Extend dashboard guardrail coverage to explicitly enforce diagnostics protection for agent-generation.ts and ai-session-store.ts
- Stabilize plugin module reload imports by using temporary reload files with deterministic file URLs and cache updates
- Tighten CLI Vitest workspace cleanup to safely skip missing hidden dist directories during restore
This commit is contained in:
Fusion
2026-04-24 01:34:34 -07:00
committed by gsxdsm
parent b48c840e77
commit 94b1180883
7 changed files with 58 additions and 42 deletions

View File

@@ -28,12 +28,15 @@ function hideInternalPackageDistDirs() {
function restoreInternalPackageDistDirs() {
for (let i = movedDistDirs.length - 1; i >= 0; i--) {
const { from, to } = movedDistDirs[i];
if (existsSync(to)) {
if (existsSync(from)) {
rmSync(from, { recursive: true, force: true });
}
renameSync(to, from);
if (!existsSync(to)) {
continue;
}
if (existsSync(from)) {
rmSync(from, { recursive: true, force: true });
}
renameSync(to, from);
}
movedDistDirs.length = 0;
}