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(tests): make TUI launch-line assertions dialect-agnostic

Adam Eivyde7215bca3ec
diff --git a/server/lib/tuiShellLaunch.test.js b/server/lib/tuiShellLaunch.test.js
index 347a1dd122..cdd2b942c7 100644
--- a/server/lib/tuiShellLaunch.test.js
+++ b/server/lib/tuiShellLaunch.test.js
@@ -35,7 +35,9 @@ describe('buildTuiShellLaunch', () => {
it('falls back to the id-inferred command when the provider stores none', () => {
const launch = buildTuiShellLaunch({ id: 'codex', type: 'tui', command: '', args: [] });
- expect(launch.commandLine.startsWith('codex')).toBe(true);
+ // Dialect-agnostic: CI runs this suite on Windows too, where PowerShell
+ // renders a quoted command token as `& 'codex'`.
+ expect(launch.commandLine).toMatch(/^(?:& )?(['"])?codex\1?(?:\s|$)/);
});
it('applies the vendor posture flag a naive command+args join would drop', () => {
diff --git a/server/routes/providers.tuiLaunch.test.js b/server/routes/providers.tuiLaunch.test.js
index 33386622e2..41fc9a3c19 100644
--- a/server/routes/providers.tuiLaunch.test.js
+++ b/server/routes/providers.tuiLaunch.test.js
@@ -62,7 +62,10 @@ describe('tuiCommandLine decoration', () => {
const res = await request(app).get('/api/providers/codex');
expect(res.status).toBe(200);
- expect(res.body.tuiCommandLine).toContain("'/tmp/my apps'");
+ // Assert the SHAPE, not one dialect's rendering: the quote character is the
+ // shell's, and CI runs this suite on Windows too (PowerShell/cmd) as well as
+ // POSIX. What must hold everywhere is that the path stayed one quoted token.
+ expect(res.body.tuiCommandLine).toMatch(/(['"])\/tmp\/my apps\1/);
});
it('falls back to the id-inferred command when the provider stores none', async () => {
@@ -72,7 +75,10 @@ describe('tuiCommandLine decoration', () => {
const res = await request(app).get('/api/providers/codex');
expect(res.status).toBe(200);
- expect(res.body.tuiCommandLine.startsWith('codex ')).toBe(true);
+ // Same dialect-agnostic rule — PowerShell renders a quoted command token as
+ // `& 'codex'`, so a bare startsWith('codex ') passes on POSIX and fails on
+ // the Windows runner.
+ expect(res.body.tuiCommandLine).toMatch(/^(?:& )?(['"])?codex\1? /);
});
it('derives the line BEFORE redaction, so a secret Bedrock marker is read at its real value', async () => {