From 8773c153c89fd3495e4570de460a2bd833902e2e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 13 Sep 2026 14:18:49 +0200 Subject: [PATCH] Remove unused readFile import and dead backend-status.json initializer REC-120: - Removed the unused `readFile` import (`readFile(` had zero call sites in the file). - Removed the never-read `backend-status.json` initializer block; the `backendStatus` in-memory object it snapshotted is still very much alive (read at lines 287, 378, 489, 504, 509, 515, 768) and untouched here. - Also removed the `existsSync` import, which the initializer block was its only caller for; left in place it would have become a second dead import introduced by this same cut. Kill attempts that failed: none. - `rg -n "readFile\(" scripts/vili-daemon.mjs` -> no matches (repeated the census command against current HEAD). - `rg -n -F --glob '!scripts/vili-daemon.mjs' 'backend-status.json' .` -> no matches in this repo; cross-repo `rg -n 'backend-status\.json'` over F:/Projects only turns up Odin's docs/transport-shortcut-inventory.md, which documents the shortcut rather than reading the file. Checks run: `node --check scripts/vili-daemon.mjs` -> syntax OK. No package.json/test suite exists in this repo to run beyond that. Co-Authored-By: Claude Sonnet 5 --- scripts/vili-daemon.mjs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/vili-daemon.mjs b/scripts/vili-daemon.mjs index 5fa2b3f..a38f1a0 100644 --- a/scripts/vili-daemon.mjs +++ b/scripts/vili-daemon.mjs @@ -1,7 +1,6 @@ #!/usr/bin/env node import http from "node:http"; -import { mkdir, readFile, writeFile } from "node:fs/promises"; -import { existsSync } from "node:fs"; +import { mkdir, writeFile } from "node:fs/promises"; import path from "node:path"; import { fileURLToPath } from "node:url"; import { createRequire } from "node:module"; @@ -795,9 +794,6 @@ if (args.health) { } else { await mkdir(path.join(args.stateRoot, "jobs"), { recursive: true }); await persistSurfaces(); - if (!existsSync(path.join(args.stateRoot, "backend-status.json"))) { - await writeFile(path.join(args.stateRoot, "backend-status.json"), JSON.stringify(backendStatus, null, 2)); - } const server = http.createServer((request, response) => { handleRequest(request, response).catch((error) => {