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

test: clean browser component download scratch without hiding fixture leaks (#10565)

[._.]/ Adam Eivya3fc30462a5e
diff --git a/scripts/vitestTempRootSetup.js b/scripts/vitestTempRootSetup.js
index 269fd758ff..09dd10b81e 100644
--- a/scripts/vitestTempRootSetup.js
+++ b/scripts/vitestTempRootSetup.js
@@ -27,6 +27,9 @@ const TOOLCHAIN_CACHE_PREFIXES = new Set([
'com.google.Chrome.',
// Chrome's component updater stages unpacked downloads in this exact prefix.
'com.google.Chrome.chrome_chrome_Unpacker_BeginUnzipping.',
+ // Component download scratch uses this exact prefix (the underscore precedes
+ // the random-name separator; keep it when comparing grouped leak prefixes).
+ 'com.google.Chrome.chrome_chrome_url_fetcher_.',
'.com.google.Chrome.',
'org.chromium.Chromium.',
'.org.chromium.Chromium.',
diff --git a/scripts/vitestTempRootSetup.test.js b/scripts/vitestTempRootSetup.test.js
index d907024faa..338eb7c546 100644
--- a/scripts/vitestTempRootSetup.test.js
+++ b/scripts/vitestTempRootSetup.test.js
@@ -28,7 +28,7 @@ describe('vitestTempRootSetup teardown', () => {
it('ignores browser-owned Chrome scratch directories but still fails on a leaked fixture beside them', () => {
const browserOnly = runTeardown((root) => {
- for (const name of ['com.google.Chrome.aB3dE9', '.com.google.Chrome.xY7zQ2', '.org.chromium.Chromium.k9L2mN', 'com.google.Chrome.chrome_chrome_Unpacker_BeginUnzipping.AbC123']) {
+ for (const name of ['com.google.Chrome.aB3dE9', '.com.google.Chrome.xY7zQ2', '.org.chromium.Chromium.k9L2mN', 'com.google.Chrome.chrome_chrome_Unpacker_BeginUnzipping.AbC123', 'com.google.Chrome.chrome_chrome_url_fetcher_.AbC123']) {
mkdirSync(join(root, name));
writeFileSync(join(root, name, 'sock'), 'x');
}
@@ -40,10 +40,17 @@ describe('vitestTempRootSetup teardown', () => {
const withFixture = runTeardown((root) => {
mkdirSync(join(root, 'com.google.Chrome.aB3dE9'));
writeFileSync(join(root, 'com.google.Chrome.aB3dE9', 'sock'), 'x');
+ mkdirSync(join(root, 'com.google.Chrome.chrome_chrome_url_fetcher_.AbC123'));
+ writeFileSync(join(root, 'com.google.Chrome.chrome_chrome_url_fetcher_.AbC123', 'download.crx'), 'x');
+ mkdirSync(join(root, 'com.google.Chrome.chrome_chrome_url_fetcher_fixture.AbC123'));
+ writeFileSync(join(root, 'com.google.Chrome.chrome_chrome_url_fetcher_fixture.AbC123', 'data.json'), '{}');
mkdirSync(join(root, 'mv-review-browser-Abc123'));
writeFileSync(join(root, 'mv-review-browser-Abc123', 'data.json'), '{}');
});
- expect(withFixture.warnings).toEqual(['⚠️ test temp leak: mv-review-browser- ×1']);
+ expect(withFixture.warnings.sort()).toEqual([
+ '⚠️ test temp leak: com.google.Chrome.chrome_chrome_url_fetcher_fixture. ×1',
+ '⚠️ test temp leak: mv-review-browser- ×1',
+ ]);
expect(withFixture.exitCode).toBe(1);
});