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
test: align jailed browser fixture and Windows CI coverage (#11642)
[._.]/6584216d54cc
diff --git a/scripts/ci-test-plan.js b/scripts/ci-test-plan.jsindex a77ec813e0..f11376cc8d 100644--- a/scripts/ci-test-plan.js+++ b/scripts/ci-test-plan.js@@ -163,6 +163,7 @@ export const WINDOWS_RISK_RULES = [/^server\/cos-runner\//,/^server\/services\/(?:shell|pm2|appBuilder)\b/,/^server\/services\/agentTuiSpawning(?:\.test)?\.js$/,+ /^server\/services\/htmlComposition\/ownedBrowser(?:\.test)?\.js$/,/^server\/services\/autonomousJobs\/execution\.shellSpawn/,// The voice fine-tuning service spawns a real Python trainer and settles the// job from its `close`/`error` events, so its assertions are the child-process@@ -182,6 +183,7 @@ export const WINDOWS_RISK_RULES = [// spawn, shell, PowerShell, PTY, and path regressions without rerunning every// platform-independent server assertion. Full CI still runs the entire suite.export const WINDOWS_CONTRACT_TESTS = [+ 'server/services/htmlComposition/ownedBrowser.test.js','scripts/ps1-bom.test.js','server/cos-runner/allowedCommands.parity.test.js','server/cos-runner/allowedCommands.test.js',diff --git a/scripts/ci-test-plan.test.js b/scripts/ci-test-plan.test.jsindex ed7d4de8f6..3321964c06 100644--- a/scripts/ci-test-plan.test.js+++ b/scripts/ci-test-plan.test.js@@ -1166,6 +1166,18 @@ describe('CI test impact planner', () => {expect(winHelper.windows).toBe(true);});+ it.each(['js', 'test.js'])('runs owned-browser Windows contracts when its %s file changes', extension => {+ const source = 'server/services/htmlComposition/ownedBrowser.js';+ const test = 'server/services/htmlComposition/ownedBrowser.test.js';+ const plan = buildCiTestPlan([`server/services/htmlComposition/ownedBrowser.${extension}`], {+ trackedFiles: [...TRACKED, source, test],+ });+ expect(plan.windows).toBe(true);+ expect(plan.windowsFiles).toContain(test);+ expect(plan.windowsMode).toBe(extension === 'js' ? 'related' : 'files');+ expect(plan.windowsSources).toEqual(extension === 'js' ? [source] : []);+ });+it('keeps the complete Windows suite for an explicit full-CI request', () => {const plan = buildCiTestPlan(['server/lib/bufferedSpawn.js'], {trackedFiles: TRACKED,@@ -1408,6 +1420,7 @@ describe('Windows escalation on a full plan (#7440)', () => {'server/cos-runner/index.js','server/services/shell.js','server/services/agentTuiSpawning.js',+ 'server/services/htmlComposition/ownedBrowser.js','server/services/autonomousJobs/execution.shellSpawn.js','server/services/voice/fineTuning.js','server/services/imageGen/codex.js',diff --git a/server/services/htmlComposition/ownedBrowser.test.js b/server/services/htmlComposition/ownedBrowser.test.jsindex 70a2d1ffa9..7ec65e3bce 100644--- a/server/services/htmlComposition/ownedBrowser.test.js+++ b/server/services/htmlComposition/ownedBrowser.test.js@@ -253,27 +253,32 @@ describe('owned composition capture browser lifecycle', () => {});it('launches the jailed pipe browser without a DevTools port or inherited tokens', async () => {- vi.stubEnv('MAC_CHROMIUM_TMPDIR', '/synthetic/test-temp');- answerHandshake();- const owner = await launchCompositionBrowser({- isolation: 'required',- support: { platform: 'linux', seatbeltAvailable: false, bubblewrapAvailable: true },- });- expect(owner.mechanism).toBe('linux-bubblewrap');- const [executable, args, options] = launch.spawn.mock.calls[0];- expect(executable).toBe('/usr/bin/bwrap');- expect(args).toContain('--unshare-net');- expect(args).toContain('--remote-debugging-pipe');- expect(args).toContain('--no-sandbox');- expect(args.some((arg) => String(arg).includes('127.0.0.1:9'))).toBe(true);- expect(args.join('\n')).not.toContain('proxy-bypass');- expect(args).not.toContain('--remote-debugging-port=0');- expect(options.env.USER).toBe('portos-preview');- expect(options.env.MAC_CHROMIUM_TMPDIR).toBe('/synthetic/test-temp');- expect(options.env.PORTOS_API_TOKEN).toBeUndefined();- expect(options.detached).toBe(true);- await owner.close();- expect(process.kill).toHaveBeenCalledWith(-child.pid, 'SIGTERM');+ const restorePlatform = pinPlatform('linux');+ try {+ vi.stubEnv('MAC_CHROMIUM_TMPDIR', '/synthetic/test-temp');+ answerHandshake();+ const owner = await launchCompositionBrowser({+ isolation: 'required',+ support: { platform: 'linux', seatbeltAvailable: false, bubblewrapAvailable: true },+ });+ expect(owner.mechanism).toBe('linux-bubblewrap');+ const [executable, args, options] = launch.spawn.mock.calls[0];+ expect(executable).toBe('/usr/bin/bwrap');+ expect(args).toContain('--unshare-net');+ expect(args).toContain('--remote-debugging-pipe');+ expect(args).toContain('--no-sandbox');+ expect(args.some((arg) => String(arg).includes('127.0.0.1:9'))).toBe(true);+ expect(args.join('\n')).not.toContain('proxy-bypass');+ expect(args).not.toContain('--remote-debugging-port=0');+ expect(options.env.USER).toBe('portos-preview');+ expect(options.env.MAC_CHROMIUM_TMPDIR).toBe('/synthetic/test-temp');+ expect(options.env.PORTOS_API_TOKEN).toBeUndefined();+ expect(options.detached).toBe(true);+ await owner.close();+ expect(process.kill).toHaveBeenCalledWith(-child.pid, 'SIGTERM');+ } finally {+ restorePlatform();+ }});it('keeps the egress negative control on the pipe without a jail or network flags', async () => {