refactor(coding-agent): restored static computer worker start hook
- The pi-utils/mime subpath fix made the computer worker graph lazy-safe, so the dynamic-import dispatch added for laziness is no longer needed; cli.ts and the bundled-host fixture statically import startComputerWorker() per the no-inline-import rule. - worker-entry keeps the selector-guarded direct-source auto-start; the worker-selector test now pins the exported hook contract. Verified --no-addons CLI startup stays addon-free and the bundled/compiled worker-host tests pass.
This commit is contained in:
@@ -38,7 +38,9 @@ describe("worker selector dispatch", () => {
|
||||
});
|
||||
|
||||
describe("computer worker entry", () => {
|
||||
it("is side-effect-free to import outside a worker and has no manual start hook", () => {
|
||||
expect("startComputerWorker" in computerWorkerEntry).toBe(false);
|
||||
it("is side-effect-free to import outside a worker and exposes a named start function", () => {
|
||||
// Importing on the main thread (no parentPort) must not start the worker
|
||||
// core; the CLI host and bundled hosts call the exported hook explicitly.
|
||||
expect(computerWorkerEntry.startComputerWorker).toBeFunction();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user