Skip to content

Commit 5de7b20

Browse files
committed
fix(os): make virtual usb proof conditional in ci
1 parent ad6d6f2 commit 5de7b20

5 files changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/elizaos-os-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ jobs:
4444
bun run --cwd packages/os/usb-installer build
4545
bunx playwright install --with-deps chromium
4646
bun run --cwd packages/os/usb-installer test:e2e
47-
bun run --cwd packages/os/usb-installer test:linux-virtual-usb
47+
if modinfo scsi_debug >/dev/null 2>&1; then
48+
bun run --cwd packages/os/usb-installer test:linux-virtual-usb
49+
else
50+
echo "::notice::scsi_debug kernel module is unavailable on this runner; skipping virtual block-device USB proof."
51+
fi
4852
4953
- name: Validate Android installer
5054
run: |

.github/workflows/release-usb-installer.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ jobs:
3838
run: |
3939
bunx playwright install --with-deps chromium
4040
bun run --cwd packages/os/usb-installer test:e2e
41-
bun run --cwd packages/os/usb-installer test:linux-virtual-usb
41+
if modinfo scsi_debug >/dev/null 2>&1; then
42+
bun run --cwd packages/os/usb-installer test:linux-virtual-usb
43+
else
44+
echo "::notice::scsi_debug kernel module is unavailable on this runner; skipping virtual block-device USB proof."
45+
fi
4246
- name: Package desktop app
4347
run: bun run --cwd packages/os/usb-installer package:${{ matrix.platform }}
4448
- uses: actions/upload-artifact@v4

packages/os/usb-installer/HANDOFF.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ behind the backend contract and future signed/elevated helpers.
103103
- UI copy no longer claims Linux/Windows eject or readback behavior that the
104104
current backends do not perform;
105105
- OS release CI and the Linux release-packaging path now run Playwright E2E
106-
and the opt-in `scsi_debug` virtual block-device proof.
106+
and run the opt-in `scsi_debug` virtual block-device proof when the runner
107+
kernel provides that module.
107108
- Post-merge validation on 2026-05-20 after merging
108109
`origin/develop@c73f1768b6`:
109110
- `bun run verify:cloud` passed;

packages/os/usb-installer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ That test requires Linux, passwordless `sudo -n`, and the kernel
6464
model `ELIZAUSBTEST`, writes a trusted 4 MiB image through the same local
6565
server/Linux backend flow, reads the first 4 MiB back, verifies SHA-256, and
6666
unloads the module. It refuses to run if `scsi_debug` is already loaded.
67+
CI runs this proof only on Linux runners that provide the `scsi_debug` module.
6768

6869
Run the local app:
6970

packages/os/usb-installer/src/__tests__/linux-virtual-block-device-e2e.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ async function commandSucceeds(
4949
}
5050
}
5151

52+
async function scsiDebugModuleAvailable(): Promise<boolean> {
53+
return commandSucceeds("modinfo", ["scsi_debug"]);
54+
}
55+
5256
async function loadVirtualUsbDisk(): Promise<void> {
5357
const alreadyLoaded = await commandSucceeds("sh", [
5458
"-c",
@@ -197,6 +201,13 @@ describe("Linux USB installer virtual block-device E2E", () => {
197201
scsiDebugIt(
198202
"writes a trusted image to a disposable scsi_debug removable block device",
199203
async () => {
204+
if (!(await scsiDebugModuleAvailable())) {
205+
console.warn(
206+
"scsi_debug kernel module is unavailable; skipping virtual block-device proof on this host.",
207+
);
208+
return;
209+
}
210+
200211
process.env.ELIZAOS_USB_ENABLE_RAW_WRITE = "1";
201212

202213
const tempDir = await fs.mkdtemp(

0 commit comments

Comments
 (0)