The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed scripts/__tests__/stage-modules.test.mjs,scripts/release/stage-modules.mjs
Steven Enamakelfab59787edc9
diff --git a/scripts/__tests__/stage-modules.test.mjs b/scripts/__tests__/stage-modules.test.mjsindex d61d239097..18fb6ad26c 100644--- a/scripts/__tests__/stage-modules.test.mjs+++ b/scripts/__tests__/stage-modules.test.mjs@@ -7,6 +7,7 @@ import {mkdirSync,readdirSync,readFileSync,+ symlinkSync,writeFileSync,} from "node:fs";import { createHash } from "node:crypto";@@ -26,6 +27,7 @@ import {hostKeyForTarget,extractWindowsZip,keepsArchive,+ normalizeStagedPermissions,replaceArchiveWithMarker,stageModules,} from "../release/stage-modules.mjs";@@ -270,3 +272,20 @@ test("staged modules carry no group or other write bits, whatever the umask andassert.equal(mode, dir ? 0o755 : 0o644, `${path} is ${mode.toString(8)}`);}});++test("normalising staged permissions never follows a symlink out of the tree", {+ skip: process.platform === "win32",+}, () => {+ const root = mkdtempSync(join(tmpdir(), "openhuman-stage-symlink-"));+ const outside = join(root, "outside");+ writeFileSync(outside, "not staged");+ chmodSync(outside, 0o600);+ const staged = join(root, "staged");+ mkdirSync(staged);+ symlinkSync(outside, join(staged, "link"));++ normalizeStagedPermissions(staged);++ assert.equal(lstatSync(outside).mode & 0o7777, 0o600);+ assert.equal(lstatSync(staged).mode & 0o7777, 0o755);+});diff --git a/scripts/release/stage-modules.mjs b/scripts/release/stage-modules.mjsindex a61496b563..d7bb88456e 100644--- a/scripts/release/stage-modules.mjs+++ b/scripts/release/stage-modules.mjs@@ -171,7 +171,6 @@ export function extractArchive(archive, dir) {*/export function normalizeStagedPermissions(root) {const stat = lstatSync(root);- if (stat.isSymbolicLink()) return;if (stat.isDirectory()) {chmodSync(root, 0o755);for (const name of readdirSync(root)) normalizeStagedPermissions(join(root, name));