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: sharing and the tunnel start without a key (owner decision)

Niko12216a55bcb5e954
diff --git a/apps/host/tests/followup-ui.test.mjs b/apps/host/tests/followup-ui.test.mjs
index 77d115ff5..ba006a578 100644
--- a/apps/host/tests/followup-ui.test.mjs
+++ b/apps/host/tests/followup-ui.test.mjs
@@ -41,9 +41,9 @@ test('domain tunnel validates hostnames and keeps the token out of arguments and
await f.connector.stop();
});
test('missing prerequisites and connector failure leave no inference listener running', async () => {
- const noKey = fixture({ hasKey: () => false });
- await assert.rejects(noKey.connector.start({ mode: 'quick' }), /API key/);
- assert.equal(noKey.launched(), undefined);
+ const noKey = fixture({ hasKey: () => false }); // without a key the tunnel starts (owner decision, 0.2.2) and the state carries a warning
+ await noKey.connector.start({ mode: 'quick' });
+ assert.notEqual(noKey.launched(), undefined);
const missing = fixture({ locate: async () => null });
await assert.rejects(missing.connector.start({ mode: 'quick' }), /connector could not be prepared automatically/i);
assert.equal(missing.connector.state().status, 'error');
diff --git a/apps/host/tests/tasks-and-sharing.test.mjs b/apps/host/tests/tasks-and-sharing.test.mjs
index 42747bf8e..0f581b7f1 100644
--- a/apps/host/tests/tasks-and-sharing.test.mjs
+++ b/apps/host/tests/tasks-and-sharing.test.mjs
@@ -24,10 +24,10 @@ test('tasks persist, prevent overlapping runs, pause and resume without catch-up
const restarted=createTaskService({read:()=>saved,write:t=>{saved=structuredClone(t);},now:()=>now,run:async()=>({text:'new',demo:true})});
restarted.put({enabled:true},task.id);assert.ok(Date.parse(saved[0].nextRunAt)>now);restarted.close();service.close();
});
-test('sharing requires a key and never exposes host controls or files', async () => {
+test('sharing never exposes host controls or files, and a key is checked when one is set', async () => {
let key=false;
const share=createLocalShare({host:'127.0.0.1',port:0,hasKey:()=>key,handle:(req,res)=>{res.writeHead(req.headers.authorization==='Bearer test-only-key'?200:401);res.end('API');}});
- await assert.rejects(share.start(),/API key/);key=true;
+ key=true;
try {
const {url}=await share.start();const origin=new URL(url).origin;
assert.equal((await fetch(origin+'/api/tasks')).status,404);