Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

host tests: the reliability and tuning-route tests use the hardware seam and a Python stub engine

Niko1221874b8850e868
diff --git a/apps/host/tests/reliability.test.mjs b/apps/host/tests/reliability.test.mjs
index 11559f2ee..d6c71df37 100644
--- a/apps/host/tests/reliability.test.mjs
+++ b/apps/host/tests/reliability.test.mjs
@@ -1,3 +1,4 @@
+import { ROOMY_HOST } from './helpers/hardware.mjs';
/** Host regressions use a disposable demo home. No browser automation or model downloads. */
import assert from 'node:assert/strict';
import { test } from 'node:test';
@@ -37,7 +38,7 @@ test('setup, config and lifecycle preserve truthful outcomes in the demo host',
const home = await mkdtemp(join(tmpdir(), 'strata-reliability-'));
const socket = createServer(); await new Promise(r => socket.listen(0, '127.0.0.1', r));
const port = socket.address().port; await new Promise(r => socket.close(r));
- const host = spawn(process.execPath, ['server/index.mjs'], { cwd: root, env: { ...process.env, STRATA_HOME:home,STRATA_MODELS_DIR:join(home,'models'), STRATA_PORT: String(port), STRATA_REAL_ENGINE: '0' }, stdio: ['ignore', 'pipe', 'pipe'] });
+ const host = spawn(process.execPath, ['server/index.mjs'], { cwd: root, env: { ...process.env, STRATA_HOME:home,STRATA_MODELS_DIR:join(home,'models'), STRATA_PORT: String(port), STRATA_REAL_ENGINE: '0', STRATA_TEST_HARDWARE: ROOMY_HOST }, stdio: ['ignore', 'pipe', 'pipe'] });
let logs = ''; host.stdout.on('data', d => logs += d); host.stderr.on('data', d => logs += d);
const base = `http://127.0.0.1:${port}`;
async function call(path, method = 'GET', body) {
diff --git a/apps/host/tests/tune-and-timeskip-routes.test.mjs b/apps/host/tests/tune-and-timeskip-routes.test.mjs
index b239aa4c4..9dbadde1b 100644
--- a/apps/host/tests/tune-and-timeskip-routes.test.mjs
+++ b/apps/host/tests/tune-and-timeskip-routes.test.mjs
@@ -17,7 +17,7 @@ import { fileURLToPath } from 'node:url';
import test from 'node:test';
import assert from 'node:assert/strict';
import { spawn } from 'node:child_process';
-import { mkdtemp, mkdir, writeFile, rm, chmod } from 'node:fs/promises';
+import { mkdtemp, mkdir, writeFile, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
@@ -83,9 +83,9 @@ test('the tuning plan comes from the engine binary and excludes what it cannot a
// A stub engine that accepts exactly two of the flags the static table knows about. The plan must
// offer only those two, and must name each exclusion.
const dir = await mkdtemp(join(tmpdir(), 'strata-tune-stub-'));
- const engine = join(dir, 'strata');
- await writeFile(engine, '#!/bin/sh\necho "usage:" >&2\necho " --kv KV" >&2\necho " --ple-io MODE" >&2\nexit 0\n');
- await chmod(engine, 0o755);
+ // A Python stub, run by Strata Control as [python, stub.py] on every OS (a #! script is WinError 193 on Windows).
+ const engine = join(dir, 'strata-stub.py');
+ await writeFile(engine, 'import sys\nfor line in ("usage:", " --kv KV", " --ple-io MODE"):\n print(line, file=sys.stderr)\n');
const { child, base } = await startHost();
try {