Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: sweep stray composition-render temp roots as a CI-only leak fallback

[._.]/ Adam Eivyd747e4d12eb8
diff --git a/server/services/musicVideo/compositionRender.test.js b/server/services/musicVideo/compositionRender.test.js
index 0539300e9b..c66221e8a1 100644
--- a/server/services/musicVideo/compositionRender.test.js
+++ b/server/services/musicVideo/compositionRender.test.js
@@ -65,7 +65,23 @@ describe.skipIf(!chrome || !ffmpeg)('music-video typography overlay with real Ch
browser = await chromium.connectOverCDP(endpoint);
}, 30000);
- afterAll(() => _cleanupTestBrowser({ browser, proc, cleanup: cleanupTempDataRoots }));
+ afterAll(async () => {
+ await _cleanupTestBrowser({ browser, proc, cleanup: cleanupTempDataRoots });
+ // Belt-and-suspenders (#9032): this suite spawns a real, headless Chrome
+ // over CDP, and a lingering renderer/ffmpeg handle on a file inside the
+ // lazyTempDataRoot can make its rmSync above throw before the tree is
+ // fully removed — surfaced in CI (not reproducible locally without
+ // Chrome + ffmpeg both present) as a leftover `portos-mv-composition-*`
+ // root. Sweep the real tmpdir directly rather than relying solely on the
+ // in-memory `lazyRoots` map cleanupTempDataRoots() already cleared.
+ const { readdirSync: listDir, rmSync: removeDir } = await import('node:fs');
+ const { tmpdir: realTmpdir } = await import('node:os');
+ for (const name of listDir(realTmpdir())) {
+ if (name.startsWith('portos-mv-composition-')) {
+ removeDir(join(realTmpdir(), name), { recursive: true, force: true });
+ }
+ }
+ });
it('lays timed text over the cut on one continuous audio master, covering the edit within a frame', async () => {
const dir = join(PATHS.data, 'fixture');