From 23c1127bd36ab2280813dbc8e8a2b3929224a04c Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Wed, 7 Oct 2026 12:27:44 +0000 Subject: [PATCH] fake worker: the OpenCL listing carries the real worker's header line, so the engine reads an answered enumeration and removes a card that left Co-Authored-By: Claude Fable 5.1 (cherry picked from commit ecd798747a26d339ff514da04773be858780636c) --- tools/reliability/fake-worker.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/reliability/fake-worker.mjs b/tools/reliability/fake-worker.mjs index c6527a851..5f6b41ea8 100755 --- a/tools/reliability/fake-worker.mjs +++ b/tools/reliability/fake-worker.mjs @@ -29,6 +29,9 @@ import { createInterface } from 'node:readline'; if (process.argv.includes('--list')) { const m = (() => { try { return require('node:fs').readFileSync(process.env.FAKE_WORKER_CTL, 'utf8').trim().split(/\s+/)[0]; } catch { return 'ok'; } })(); const n = m === 'absent' ? 0 : (() => { try { const l = require('node:fs').readFileSync(process.env.FAKE_WORKER_CTL, 'utf8').split('\n').map(x => x.trim().split(/\s+/)).find(f => f[0] === 'devices'); return l ? Number(l[1]) : 1; } catch { return 1; } })(); + // the real worker's header line: the engine reads a listing without it as "the tool did not answer" and removes + // no card on it (src/detect.rs parse_opencl_list), which is right for a crashed driver and wrong for a stand-in + process.stdout.write(`OpenCL devices (${n}):\n`); for (let i = 0; i < n; i++) { process.stdout.write(`[${i}] Fake GPU ${i + 1} | Fake Platform (OpenCL 1.2)\n GPU, vendor Fake Silicon, driver 1.0.0, OpenCL C 1.2, 8 compute units, 8192 MB\n`); }