mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
fix(workers): complete autonomous cloud desktop startup (#126705)
* fix(gateway): admit recovering workers during startup * fix(gateway): admit recovering nodes during startup * fix(crabbox): bind worker desktop to XFCE session * fix(workers): reuse Git base during workspace transfer large clean/stale worktrees were downloading every tracked file after the verified base pack, crossing transfer authority; selectively checkout desired base-index paths, preserving deletions and symlink confinement. * fix(workers): clone reachable stale workspace commits tip-only origin detection forced published ancestor commits through heavyweight Gateway transfer; the existing exact checkout and manifest verification safely own reachability/fallback. * perf(workers): use blobless origin clones * fix(workers): bundle undici in worker deploy artifact
This commit is contained in:
committed by
GitHub
parent
8d2d8377a7
commit
3801331d22
@@ -35,6 +35,36 @@ describe("worker deploy build plugin", () => {
|
||||
expect(transformed).not.toContain("was not composed by the build");
|
||||
});
|
||||
|
||||
it("bundles the undici dispatcher dependency without a worker runtime require", () => {
|
||||
const dispatcherPath = path.resolve("src/infra/net/undici-dispatcher-options.ts");
|
||||
const source = fs.readFileSync(dispatcherPath, "utf8");
|
||||
const plugin = createWorkerDeployBuildPlugin();
|
||||
|
||||
const transformed = plugin.transform.call({ error: fail }, source, dispatcherPath);
|
||||
|
||||
expect(transformed).toContain('import * as bundledUndici from "undici";');
|
||||
expect(transformed).toContain("return bundledUndici;");
|
||||
expect(transformed).toContain('return override as typeof import("undici");');
|
||||
expect(transformed).not.toContain('import { createRequire } from "node:module";');
|
||||
expect(transformed).not.toContain("const requireUndici = createRequire(import.meta.url);");
|
||||
expect(transformed).not.toContain('requireUndici("undici")');
|
||||
expect(plugin.transform.call({ error: fail }, transformed!, dispatcherPath)).toBe(transformed);
|
||||
});
|
||||
|
||||
it("fails closed when the undici dispatcher bootstrap shape changes", () => {
|
||||
const dispatcherPath = path.resolve("src/infra/net/undici-dispatcher-options.ts");
|
||||
const source = fs.readFileSync(dispatcherPath, "utf8");
|
||||
const plugin = createWorkerDeployBuildPlugin();
|
||||
|
||||
expect(() =>
|
||||
plugin.transform.call(
|
||||
{ error: fail },
|
||||
source.replace('return requireUndici("undici")', 'return changedUndici("undici")'),
|
||||
dispatcherPath,
|
||||
),
|
||||
).toThrow("undici dispatcher bootstrap changed");
|
||||
});
|
||||
|
||||
it("inlines Playwright package identity without a runtime manifest read", () => {
|
||||
const coreBundlePath = path.resolve("node_modules/playwright-core/lib/coreBundle.js");
|
||||
const source = fs.readFileSync(coreBundlePath, "utf8");
|
||||
|
||||
Reference in New Issue
Block a user