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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Keep closure analysis out of memo-off runs and pin the watchdog fixture's plan
[._.]/ Adam Eivya5ae5c1a94c8
diff --git a/scripts/lib/testMemoRunner.js b/scripts/lib/testMemoRunner.jsindex 5244267265..2301ec04a2 100644--- a/scripts/lib/testMemoRunner.js+++ b/scripts/lib/testMemoRunner.js@@ -69,8 +69,14 @@ export function planTestMemo({ scope, mode, repoFiles, repoSources, memoDir, repreturn fresh.analyzer.analyzeTest(test, { baseClosure: fresh.baseClosure, recorded });};+ // Closures are needed to look up memo entries and to resolve a related+ // plan. With the memo off, a full or files plan is just its list — the+ // analysis of a whole workspace (~10s) must not sit in front of Vitest,+ // least of all for a launcher the browser supervisor holds to a deadline.const verdicts = new Map();- for (const test of candidates) verdicts.set(test, analyze(test, memoDir ? readRecord(memoDir, scope, test) : null));+ if (memoDir || mode === 'related') {+ for (const test of candidates) verdicts.set(test, analyze(test, memoDir ? readRecord(memoDir, scope, test) : null));+ }const selected = mode === 'related'? uniqueSorted([...relatedTests(verdicts, repoSources), ...repoFiles])@@ -82,13 +88,13 @@ export function planTestMemo({ scope, mode, repoFiles, repoSources, memoDir, repconst run = [];for (const test of slice) {const info = verdicts.get(test);- const via = !memoDir ? null+ const via = !memoDir || !info ? null: info.recorded?.memoizable && readEntry(memoDir, info.recorded.key, { test, workspace: scope }) ? 'recorded': info.floor.memoizable && readEntry(memoDir, info.floor.key, { test, workspace: scope }) ? 'floor': null;if (via) { skipped.push({ test, via }); continue; }run.push(test);- if (!info.floor.memoizable) reasons.set(test, info.recorded?.memoizable ? 'no green entry yet (recorded key)' : info.recorded?.reason ?? info.floor.reason);+ if (info && !info.floor.memoizable) reasons.set(test, info.recorded?.memoizable ? 'no green entry yet (recorded key)' : info.recorded?.reason ?? info.floor.reason);}return { selected, slice, run, skipped, reasons, analyze, freshAnalyze, verdicts };}diff --git a/scripts/lib/testMemoRunner.test.js b/scripts/lib/testMemoRunner.test.jsindex 448e79729e..f1b3aaecfe 100644--- a/scripts/lib/testMemoRunner.test.js+++ b/scripts/lib/testMemoRunner.test.js@@ -137,7 +137,12 @@ describe('planTestMemo and recordTestMemo', () => {// The memo off: nothing is read, nothing is skipped.writeMemoEntry(memoDir, plan().verdicts.get('server/lib/c.test.js').floor.key, { test: 'server/lib/c.test.js', workspace: 'server', source: 'local' });expect(plan().skipped).toEqual([{ test: 'server/lib/c.test.js', via: 'floor' }]);- expect(plan({ memoDir: null }).skipped).toEqual([]);+ const off = plan({ memoDir: null });+ expect(off.skipped).toEqual([]);+ expect(off.run).toEqual(off.selected);+ // Nothing is analyzed for a files plan with the memo off: the list is the plan.+ expect(off.verdicts.size).toBe(0);+ expect(plan({ memoDir: null, mode: 'related', repoFiles: [], repoSources: ['server/lib/a.js'] }).selected).toEqual(['server/lib/a.test.js']);});it('hashes the forward-slashed root-relative path on every platform, like Vitest', () => {diff --git a/scripts/watch-ci-tests.test.js b/scripts/watch-ci-tests.test.jsindex bcfb9ba4e4..bed7723a6d 100644--- a/scripts/watch-ci-tests.test.js+++ b/scripts/watch-ci-tests.test.js@@ -51,6 +51,10 @@ describe.skipIf(process.platform === 'win32')('independent browser test watchdogcatch (error) { console.error('Synthetic supervisor failed closed: ' + error.message); process.exitCode = 1; }`], { encoding: 'utf8', timeout: 10_000, env: { ...process.env,PATH: `${root}${delimiter}${process.env.PATH}`, PORTOS_CI_DIAGNOSTICS_DIR: reports,+ // The supervised launcher is the real run-ci-tests.js: pin its plan so the+ // job's own CI_TEST_MODE/CI_SHARD/memo settings cannot put planning work+ // in front of the fake npm the deadlines below are sized for.+ CI_TEST_MODE: 'full', CI_TEST_FILES: '[]', CI_TEST_SOURCES: '[]', CI_SHARD: '', PORTOS_TEST_MEMO: 'off',GITHUB_STEP_SUMMARY: '', GITHUB_ENV: '', NODE_DISABLE_COMPILE_CACHE: '1' } });expect(result.error).toBeUndefined();expect(result.status, result.stderr).toBe(denied || orphan ? 1 : stalled ? 124 : status);