Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

perf(workflows): keep runtime artifacts out of build tracing

Rahman0dc0678f91dc
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index e1c3cc6e..546f116f 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -23,6 +23,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.
**Faster**
+- `workflows` keep runtime artifacts out of build tracing
- `shell` defer optional surfaces and bound cold-load bundles
**Changed**
diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md
index 3e286409..cd1f1603 100644
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@ -20,6 +20,12 @@ The audit records every observed branch, worktree and PR with a disposition. Nor
cleanup removes only clean, dormant worktrees whose HEAD is already reachable from main;
active/dirty/unmerged trees, local environments and referenced dependencies remain protected.
A verified private Git bundle and ignored-note backups precede cleanup.
+The resumed build exposed a broad Turbopack filesystem trace from the artifact reader.
+Owner-selected files are runtime data, so the three guarded open/lstat path arguments now
+use the established runtime-only tracing annotation. No files are excluded globally and
+read-root, no-follow, size and identity checks remain intact. An isolated production build
+now passes without warnings; the existing targeted artifact/PTY/connection tests also pass.
+
Full-suite verification caught a compatibility issue in the preserved OAuth candidate:
UI ordering must not change the existing API default for an omitted connection source.
The API retains its original direct default; the UI explicitly submits the selected OAuth
diff --git a/lib/agent/session-artifact-read.ts b/lib/agent/session-artifact-read.ts
index 55d37b99..1f24f79c 100644
--- a/lib/agent/session-artifact-read.ts
+++ b/lib/agent/session-artifact-read.ts
@@ -28,12 +28,14 @@ export async function readArtifactFile(file: string): Promise<{ bytes: Buffer; s
if (!real) return null;
let handle;
try {
- handle = await fs.open(real, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
+ // Owner-selected host files are runtime data, not deploy-time source assets.
+ // Ignore only this guarded dynamic path; never weaken the filesystem policy.
+ handle = await fs.open(/* turbopackIgnore: true */ real, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
const before = await handle.stat();
// Re-resolve after opening to reject a parent symlink changed between guard and open.
const authorized = await authorizeArtifactPath(file);
if (authorized !== real) return null;
- const named = await fs.lstat(real);
+ const named = await fs.lstat(/* turbopackIgnore: true */ real);
if (named.dev !== before.dev || named.ino !== before.ino) return null;
if (!before.isFile() || before.size > ARTIFACT_FILE_LIMIT) return null;
const buffer = Buffer.alloc(before.size + 1);
@@ -46,7 +48,7 @@ export async function readArtifactFile(file: string): Promise<{ bytes: Buffer; s
const after = await handle.stat();
if (length !== before.size || after.size !== before.size || after.mtimeMs !== before.mtimeMs) return null;
if (await authorizeArtifactPath(file) !== real) return null;
- const finalPath = await fs.lstat(real);
+ const finalPath = await fs.lstat(/* turbopackIgnore: true */ real);
if (finalPath.dev !== before.dev || finalPath.ino !== before.ino) return null;
const bytes = buffer.subarray(0, length);
return { bytes, sha256: createHash("sha256").update(bytes).digest("hex"), size: bytes.length };