Files
vendoo/tools/verify-flux-loop-hotfix-1.41.0.mjs
Masterluke77andGitHub 6f48827f4d Vendoo 1.41.2 – Git Ignore Boundary & Module Tracking Hotfix (#18)
* docs: prepare Vendoo 1.41.2 git-ignore boundary hotfix

* fix: track native source modules with root-anchored runtime ignores
2026-07-09 17:09:00 +02:00

37 lines
2.1 KiB
JavaScript

import { readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
const root = dirname(dirname(fileURLToPath(import.meta.url)));
const read = rel => readFileSync(join(root, rel), 'utf8');
const failures = [];
const expect = (text, marker, label = marker) => { if (!text.includes(marker)) failures.push(`Fehlt: ${label}`); };
const pkg = JSON.parse(read('package.json'));
const server = read('server.mjs');
const fluxJobs = read('lib/ai-flux-prompt-jobs.mjs');
const fluxModule = read('app/modules/flux-studio/index.mjs');
const ci = read('.github/workflows/ci.yml');
const release = read('.github/workflows/release.yml');
if (pkg.version !== '1.41.0') failures.push(`package.json-Version ist ${pkg.version}`);
expect(server, 'startFluxPromptJobLoop, stopFluxPromptJobLoop', 'Server importiert Start- und Stop-Funktion');
expect(server, 'configureFluxStudioModule({ start: startFluxPromptJobLoop, stop: stopFluxPromptJobLoop })', 'FLUX-Lifecycle ist vollständig verdrahtet');
expect(fluxJobs, 'export function stopFluxPromptJobLoop()', 'fehlender Stop-Export');
expect(fluxJobs, 'if (loopTimer) clearInterval(loopTimer);', 'Intervall wird beim Stoppen beendet');
expect(fluxJobs, 'loopTimer = null;', 'Loop-Zustand wird zurückgesetzt');
expect(fluxJobs, 'export function startFluxPromptJobLoop()', 'Start-Export bleibt vorhanden');
expect(fluxJobs, 'if (loopTimer) return;', 'Start bleibt idempotent');
expect(fluxModule, 'async stop() { runtime?.stop(); started = false; }', 'Modul-Lifecycle ruft Stop auf');
expect(ci, 'npm run verify:esm-exports', 'CI prüft ESM-Exportverträge');
expect(ci, 'npm run verify:flux-loop', 'CI prüft FLUX-Hotfix');
expect(release, 'npm run verify:esm-exports', 'Release prüft ESM-Exportverträge');
expect(release, 'npm run verify:flux-loop', 'Release prüft FLUX-Hotfix');
if (failures.length) {
console.error(`FLUX-Loop-Hotfix-Gate 1.41.0 fehlgeschlagen (${failures.length}):`);
failures.forEach(item => console.error(`- ${item}`));
process.exit(1);
}
console.log('FLUX-Loop-Hotfix-Gate 1.41.0 erfolgreich: Stop-Export, Lifecycle-Verdrahtung und CI-Verträge geprüft.');