// NO TEST REACHES A LIVE EDITOR (lane reads-find, 17 Nov 2026: a unit run's read fell through to the operator's running // editor). Imported FIRST by a test (or a scratch script), before any module that could ask the editor: the editor's // address is set to one that cannot answer (the discard port on loopback) and the token to none -- so no tts, no lane // hold, no job can be asked of a real editor, and editor/.env's token is never read (agentToken takes the empty one // set here). Then it CHECKS what the modules that ask the editor would resolve, and throws when either still points // anywhere real: a test that needs an editor brings a stub of its own (an injected ask), never a port. // // Plain ESM, side effects only. import { editorConfig } from "./fetchWindows.mjs"; import { editorLanes } from "./renderMode.mjs"; export const DEAD_EDITOR = "http://127.0.0.1:9"; process.env.ARCHILYZER_EDITOR_URL = DEAD_EDITOR; process.env.WORKER_TOKEN = ""; process.env.UMTOOL_URL = "http://127.0.0.1:9"; const cfg = editorConfig(process.env); if (cfg.url !== DEAD_EDITOR || cfg.token !== "") throw new Error(`noLiveEditor: the editor resolves to ${cfg.url}${cfg.token ? " with a token" : ""} -- a test must never reach a real editor`); if (editorLanes(cfg) !== null) throw new Error("noLiveEditor: the editor's lanes would be held -- a test must never reach a real editor");