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.

fix(build): separate runtime inputs and clarify mobile MCP guides

Rahman1b966d36ddde
diff --git a/app/api/v1/camoufox/session/route.ts b/app/api/v1/camoufox/session/route.ts
index 189c8f06..473fae24 100644
--- a/app/api/v1/camoufox/session/route.ts
+++ b/app/api/v1/camoufox/session/route.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
import { promises as fs } from "fs";
import os from "os";
import path from "path";
@@ -28,7 +29,7 @@ export async function GET() {
if (IS_DEMO) return NextResponse.json({ error: "unavailable" }, { status: 404 });
if (!(await requireSession("operator"))) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
- const password = (await fs.readFile(PASSWD_FILE, "utf8").catch(() => "")).trim();
+ const password = (await fs.readFile(/* turbopackIgnore: true */ PASSWD_FILE, "utf8").catch(() => "")).trim();
// Absent file = the operator has not set one. Say so plainly rather than 500 — the
// browser window falls back to letting noVNC prompt.
if (!password) return NextResponse.json({ password: null, reason: "no_password_file" });
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 8733215d..58e2380a 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -8,6 +8,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.
**Fixed**
+- `build` separate runtime inputs and clarify mobile MCP guides
- `a11y` label settings controls and expose selected options
- `settings` clarify MCP navigation and enforce zero-warning tests
- persist the ready tunnel process identity after launcher exec
diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md
index dd4e9796..ebf2a5c3 100644
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@ -1,3 +1,7 @@
+## 2026-09-09 — Runtime build boundaries and mobile setup follow-up
+
+Deployment log inspection caught sixteen additional Turbopack warnings. Instrumentation now places Node-only imports inside explicit positive runtime branches, following the Next instrumentation contract (https://nextjs.org/docs/app/guides/instrumentation). Host state, credentials, external Git metadata and installed executables are explicitly runtime-only filesystem inputs rather than traced application assets; existing authorization, containment, size and symlink checks remain intact. The release build now rejects warning output instead of discarding it on successful compilation. MCP setup leads with numbered actions and puts optional display metadata below them; copy text wraps at word boundaries on narrow screens.
+
## 2026-09-09 — Zero-warning quality gate and layered MCP settings
User review found MCP confusing despite the earlier release. Live public inspection reproduced an endless MCP loading placeholder after unauthorized access. Owner setup mixed client guides, transport details, access tokens, catalog signatures and audit activity in one scroll. MCP now starts with a task index and drills into client selection then one guide. Connection details, connected-app management, audit and tools each have a separate view and explicit return path. Signed-out users get a direct Owner login preserving the MCP destination; delegated users retain the Owner boundary. Requests are bounded and failed activity never masquerades as no events. Disconnection requires an inline confirmation; active access and expired/revoked history are separated. Refresh acknowledgement explicitly remains a browser-local reminder. Settings icons use theme tokens; navigation and copy targets are larger and clipboard failures are visible. Manual OAuth copy now matches the implemented one-hour access / rotating refresh contract.
diff --git a/frontend/slices/os-settings/components/mcp-client-setup.tsx b/frontend/slices/os-settings/components/mcp-client-setup.tsx
index 296019b6..8cce6831 100644
--- a/frontend/slices/os-settings/components/mcp-client-setup.tsx
+++ b/frontend/slices/os-settings/components/mcp-client-setup.tsx
@@ -33,15 +33,16 @@ export function McpClientSetup({
{selected.kind === "cli" ? <TerminalSquare className="size-3.5 shrink-0" /> : <Bot className="size-3.5 shrink-0" />}
<p className="text-sm text-muted-foreground">{selected.label} · {selected.description}</p>
</div>
+ <div className="space-y-5">{steps.map((step, index) => <StepRow key={`${client}-${step.title}`} number={index + 1} {...step} />)}</div>
{client === "chatgpt" && (
- <div className="grid gap-3 rounded-lg border border-border/70 bg-secondary/20 p-3 sm:grid-cols-2">
- <McpCopyField label="Name" value="MSO" />
- <McpCopyField label="Description" value="Control this MSO host with scoped MCP tools" />
- <McpCopyField label="Connection" value="Server URL · Streamable HTTP" />
- <McpCopyField label="Authentication" value="OAuth" />
- </div>
+ <details className="rounded-lg border border-border/70 bg-secondary/20 p-3">
+ <summary className="min-h-11 cursor-pointer content-center text-sm font-medium">Optional app name and description</summary>
+ <div className="mt-3 grid gap-3 sm:grid-cols-2">
+ <McpCopyField label="Name" value="MSO" />
+ <McpCopyField label="Description" value="Control this MSO host with scoped MCP tools" />
+ </div>
+ </details>
)}
- <div className="space-y-5">{steps.map((step, index) => <StepRow key={`${client}-${step.title}`} number={index + 1} {...step} />)}</div>
</>
);
}
diff --git a/frontend/slices/os-settings/components/mcp-copy-field.tsx b/frontend/slices/os-settings/components/mcp-copy-field.tsx
index a4b72ea7..2b546d44 100644
--- a/frontend/slices/os-settings/components/mcp-copy-field.tsx
+++ b/frontend/slices/os-settings/components/mcp-copy-field.tsx
@@ -12,7 +12,7 @@ export function McpCopyField({ label, value, multiline = false }: { label: strin
<div className="space-y-1.5">
<span className="text-sm font-medium text-muted-foreground">{label}</span>
<div className="flex items-start gap-2 rounded-lg border border-border/70 bg-secondary/45 p-2.5">
- <code className={cn("min-w-0 flex-1 break-all font-mono text-sm leading-relaxed text-secondary-foreground", multiline && "whitespace-pre-wrap break-words")}>{value}</code>
+ <code className={cn("min-w-0 flex-1 [overflow-wrap:anywhere] font-mono text-sm leading-relaxed text-secondary-foreground", multiline && "whitespace-pre-wrap break-words")}>{value}</code>
<Button
type="button"
variant="ghost"
diff --git a/instrumentation.test.ts b/instrumentation.test.ts
index 266d8aa4..43561fc5 100644
--- a/instrumentation.test.ts
+++ b/instrumentation.test.ts
@@ -8,11 +8,17 @@ vi.mock("./lib/host/audit", () => ({ audit: (e: unknown) => auditMock(e) }));
import { onRequestError } from "./instrumentation";
beforeEach(() => {
+ vi.stubEnv("NEXT_RUNTIME", "nodejs");
auditMock.mockReset();
auditMock.mockResolvedValue(undefined);
});
describe("onRequestError", () => {
+ it("does not load the filesystem audit channel in Edge", async () => {
+ vi.stubEnv("NEXT_RUNTIME", "edge");
+ await onRequestError!(new Error("edge"), { path: "/x" } as never, {} as never);
+ expect(auditMock).not.toHaveBeenCalled();
+ });
it("routes a framework error into the audit channel", async () => {
const err = new Error("boom");
await onRequestError!(
diff --git a/instrumentation.ts b/instrumentation.ts
index 9350da44..32981e59 100644
--- a/instrumentation.ts
+++ b/instrumentation.ts
@@ -5,32 +5,33 @@
import type { Instrumentation } from "next";
export async function register() {
- if (process.env.NEXT_RUNTIME !== "nodejs") return;
- // Warm durable agent-session maintenance before accepting requests. Backfilling
- // the conversation index once at boot keeps MCP lookup O(1) even on hosts with
- // thousands of old CLI sessions; archive retention remains best-effort.
- await Promise.all([
- import("./lib/agent/session-files")
- .then(({ backfillConversationIndex }) => backfillConversationIndex())
- .catch(() => undefined),
- import("./lib/agent/session-archive")
- .then(({ pruneAgentSessionArchives }) => pruneAgentSessionArchives())
- .catch(() => undefined),
- ]);
- // systemd liveness: when the unit sets WatchdogSec, systemd exposes
- // NOTIFY_SOCKET + WATCHDOG_USEC. Node has no native AF_UNIX SOCK_DGRAM
- // (dgram is UDP-only), so we ping via the `systemd-notify` binary — which
- // requires NotifyAccess=all in the unit, since the ping comes from a child
- // PID, not main. A missed ping past WatchdogSec → systemd restarts us; this
- // catches a wedged event loop that Restart=always (crash-only) can't.
- // No-op in dev / demo / CI where NOTIFY_SOCKET is unset.
- if (!process.env.NOTIFY_SOCKET) return;
- const { execFile } = await import("node:child_process");
- const usec = parseInt(process.env.WATCHDOG_USEC ?? "0", 10);
- const intervalMs = usec > 0 ? Math.floor(usec / 2000) : 10_000; // half the deadline, in ms
- const ping = () => execFile("systemd-notify", ["WATCHDOG=1"], () => {});
- ping();
- setInterval(ping, intervalMs).unref();
+ if (process.env.NEXT_RUNTIME === "nodejs") {
+ // Warm durable agent-session maintenance before accepting requests. Backfilling
+ // the conversation index once at boot keeps MCP lookup O(1) even on hosts with
+ // thousands of old CLI sessions; archive retention remains best-effort.
+ await Promise.all([
+ import("./lib/agent/session-files")
+ .then(({ backfillConversationIndex }) => backfillConversationIndex())
+ .catch(() => undefined),
+ import("./lib/agent/session-archive")
+ .then(({ pruneAgentSessionArchives }) => pruneAgentSessionArchives())
+ .catch(() => undefined),
+ ]);
+ // systemd liveness: when the unit sets WatchdogSec, systemd exposes
+ // NOTIFY_SOCKET + WATCHDOG_USEC. Node has no native AF_UNIX SOCK_DGRAM
+ // (dgram is UDP-only), so we ping via the `systemd-notify` binary — which
+ // requires NotifyAccess=all in the unit, since the ping comes from a child
+ // PID, not main. A missed ping past WatchdogSec → systemd restarts us; this
+ // catches a wedged event loop that Restart=always (crash-only) can't.
+ // No-op in dev / demo / CI where NOTIFY_SOCKET is unset.
+ if (!process.env.NOTIFY_SOCKET) return;
+ const { execFile } = await import("node:child_process");
+ const usec = parseInt(process.env.WATCHDOG_USEC ?? "0", 10);
+ const intervalMs = usec > 0 ? Math.floor(usec / 2000) : 10_000; // half the deadline, in ms
+ const ping = () => execFile("systemd-notify", ["WATCHDOG=1"], () => {});
+ ping();
+ setInterval(ping, intervalMs).unref();
+ }
}
export const onRequestError: Instrumentation.onRequestError = async (
@@ -38,25 +39,27 @@ export const onRequestError: Instrumentation.onRequestError = async (
request,
context,
) => {
- try {
- const { audit } = await import("./lib/host/audit");
- const e = err instanceof Error ? err : new Error(String(err));
- // Route shape goes into structured `meta` (since the audit field exists)
- // instead of being packed into `target` — easier to filter with `jq`,
- // greppable as `routerKind`/`routeType` keys, and leaves `target` clean
- // for the actual path the request hit.
- await audit({
- action: "framework.error",
- ok: false,
- actor: null,
- target: request.path,
- detail: `${e.name}: ${e.message}`,
- meta: {
- routerKind: context.routerKind,
- routeType: context.routeType,
- },
- });
- } catch {
- // never crash here — best-effort logging only
+ if (process.env.NEXT_RUNTIME === "nodejs") {
+ try {
+ const { audit } = await import("./lib/host/audit");
+ const e = err instanceof Error ? err : new Error(String(err));
+ // Route shape goes into structured `meta` (since the audit field exists)
+ // instead of being packed into `target` — easier to filter with `jq`,
+ // greppable as `routerKind`/`routeType` keys, and leaves `target` clean
+ // for the actual path the request hit.
+ await audit({
+ action: "framework.error",
+ ok: false,
+ actor: null,
+ target: request.path,
+ detail: `${e.name}: ${e.message}`,
+ meta: {
+ routerKind: context.routerKind,
+ routeType: context.routeType,
+ },
+ });
+ } catch {
+ // never crash here — best-effort logging only
+ }
}
};
diff --git a/lib/agent/memory-store.ts b/lib/agent/memory-store.ts
index b4bd570e..2d96147d 100644
--- a/lib/agent/memory-store.ts
+++ b/lib/agent/memory-store.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
import { createHash, randomUUID } from "node:crypto";
import { constants as fsConstants, promises as fs } from "node:fs";
import os from "node:os";
@@ -15,7 +16,7 @@ export type { AgentMemoryDocument, AgentMemoryKind, AgentMemoryQuery, AgentMemor
export type { AgentMemoryTelemetry } from "./memory-telemetry";
export interface AgentMemorySnapshot { capturedAt: string; user: string; memory: string; schemaVersion?: 1; recordCount?: number; }
-const ROOT = path.resolve(process.env.OS_AGENT_MEMORY_DIR || path.join(os.homedir(), ".mso", "agent-memory"));
+const ROOT = path.resolve(/* turbopackIgnore: true */ process.env.OS_AGENT_MEMORY_DIR || path.join(os.homedir(), ".mso", "agent-memory"));
const MAX_DOC_BYTES = 64 * 1024;
const KEY_RE = /^[^\r\n]{1,80}$/;
@@ -29,7 +30,7 @@ function fileFor(principal: string, document: AgentMemoryDocument): string { ret
async function readDocument(principal: string, document: AgentMemoryDocument): Promise<string> {
let handle: Awaited<ReturnType<typeof fs.open>> | null = null;
try {
- handle = await fs.open(fileFor(principal, document), fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW);
+ handle = await fs.open(/* turbopackIgnore: true */ fileFor(principal, document), fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW);
const stat = await handle.stat();
if (!stat.isFile() || stat.size > MAX_DOC_BYTES) throw new Error("agent memory document has an invalid file shape");
if ((stat.mode & 0o077) !== 0) throw new Error("agent memory permissions are too broad; expected 0600");
diff --git a/lib/ai/threads.ts b/lib/ai/threads.ts
index 20100b3f..132e8dfa 100644
--- a/lib/ai/threads.ts
+++ b/lib/ai/threads.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
import { promises as fs } from "node:fs";
import os from "node:os";
import path from "node:path";
@@ -18,7 +19,7 @@ export interface ChatThread {
export type ThreadSummary = Pick<ChatThread, "id" | "title" | "createdAt" | "updatedAt">;
-const DIR = path.resolve(process.env.OS_THREADS_DIR || path.join(os.homedir(), ".mso", "threads"));
+const DIR = path.resolve(/* turbopackIgnore: true */ process.env.OS_THREADS_DIR || path.join(os.homedir(), ".mso", "threads"));
const THREAD_ID = /^[A-Za-z0-9_-]{1,64}$/;
// ids are app-generated but still arrive over HTTP. Keep the allowlist, then use
@@ -38,7 +39,7 @@ function fileFor(id: string): string {
export async function listThreads(): Promise<ThreadSummary[]> {
let names: string[];
try {
- names = await fs.readdir(DIR);
+ names = await fs.readdir(/* turbopackIgnore: true */ DIR);
} catch {
return [];
}
@@ -46,7 +47,7 @@ export async function listThreads(): Promise<ThreadSummary[]> {
for (const n of names) {
if (!n.endsWith(".yml")) continue;
try {
- const t = parse(await fs.readFile(path.join(DIR, n), "utf8")) as ChatThread;
+ const t = parse(await fs.readFile(/* turbopackIgnore: true */ path.join(DIR, n), "utf8")) as ChatThread;
if (t?.id) out.push({ id: t.id, title: t.title || "Untitled", createdAt: t.createdAt || 0, updatedAt: t.updatedAt || 0 });
} catch {
/* skip corrupt file */
@@ -58,7 +59,7 @@ export async function listThreads(): Promise<ThreadSummary[]> {
export async function getThread(id: string): Promise<ChatThread | null> {
const file = fileFor(id); // validate before the not-found/corrupt-file catch
try {
- return parse(await fs.readFile(file, "utf8")) as ChatThread;
+ return parse(await fs.readFile(/* turbopackIgnore: true */ file, "utf8")) as ChatThread;
} catch {
return null;
}
diff --git a/lib/host/audit.ts b/lib/host/audit.ts
index ec82f862..357be3cd 100644
--- a/lib/host/audit.ts
+++ b/lib/host/audit.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
// SERVER-ONLY. Append-only audit trail for privileged actions (shell exec, file
// mutations, cleanup runs, auth events). Single-owner tool that can run shell
// commands MUST keep a tamper-evident record — if something goes wrong, this is
@@ -78,7 +79,7 @@ export async function readAuditTail(opts?: {
limit?: number;
}): Promise<AuditRecord[]> {
const { prefix, limit = 100 } = opts ?? {};
- const raw = await fs.readFile(auditPath(), "utf8").catch(() => "");
+ const raw = await fs.readFile(/* turbopackIgnore: true */ auditPath(), "utf8").catch(() => "");
return raw
.split("\n")
.filter(Boolean)
diff --git a/lib/host/project-candidate.ts b/lib/host/project-candidate.ts
index 3d88fe84..1308eebc 100644
--- a/lib/host/project-candidate.ts
+++ b/lib/host/project-candidate.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
// THE shared project-candidate validator.
//
// There used to be two of these: a strict one inside the enumeration walk, and
@@ -46,7 +47,7 @@ async function validateComponent(parent: string, name: string): Promise<Candidat
export async function validateProjectChild(container: ProjectContainer, name: string): Promise<CandidateResult> {
const component = await validateComponent(container.path, name);
if (!component.ok) return component;
- const real = await fs.realpath(component.path).catch(() => null);
+ const real = await fs.realpath(/* turbopackIgnore: true */ component.path).catch(() => null);
if (real !== component.path || !isUnderRoot(real, container.path)) return { ok: false, reason: "escape" };
return component;
}
@@ -68,7 +69,7 @@ export async function validateProjectDescendant(container: ProjectContainer, tar
if (!component.ok) return component;
parent = component.path;
}
- const real = await fs.realpath(parent).catch(() => null);
+ const real = await fs.realpath(/* turbopackIgnore: true */ parent).catch(() => null);
if (real !== parent || !isUnderRoot(real, container.path)) return { ok: false, reason: "escape" };
return { ok: true, path: parent };
}
diff --git a/lib/host/project-meta.ts b/lib/host/project-meta.ts
index 601576d6..1fb46850 100644
--- a/lib/host/project-meta.ts
+++ b/lib/host/project-meta.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
// Bounded, side-effect-free metadata about ONE project directory. Split out of
// projects.ts so multi-root resolution and the projects_list enumeration can share
// exactly the same readers — two copies would be two chances to forget the symlink
@@ -58,7 +59,7 @@ export async function boundedGitMeta(dir: string): Promise<GitMeta> {
? candidateRef
: undefined;
const branch = ref?.replace(/^refs\/heads\//, "");
- let sha = ref ? (await readRegularText(path.join(gitDir, ref), BOUNDED_READ.gitRef)).trim() : head.trim();
+ let sha = ref ? (await readRegularText(path.join(/* turbopackIgnore: true */ gitDir, ref), BOUNDED_READ.gitRef)).trim() : head.trim();
if (!sha && ref) {
const packed = await readRegularText(path.join(gitDir, "packed-refs"), BOUNDED_READ.packedRefs);
sha = packed.split("\n").find((line) => line.endsWith(` ${ref}`))?.split(" ")[0] ?? "";
diff --git a/lib/host/self-update.ts b/lib/host/self-update.ts
index da8b12dd..55a35963 100644
--- a/lib/host/self-update.ts
+++ b/lib/host/self-update.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
import "server-only";
import { execFile } from "node:child_process";
import { promises as fs } from "node:fs";
@@ -165,7 +166,7 @@ async function isRunning(): Promise<boolean> {
}
async function readLog(): Promise<string> {
- const raw = await fs.readFile(updateLogPath(), "utf8").catch(() => "");
+ const raw = await fs.readFile(/* turbopackIgnore: true */ updateLogPath(), "utf8").catch(() => "");
return raw.length > LOG_TAIL ? raw.slice(-LOG_TAIL) : raw;
}
diff --git a/lib/managed-apps/runner.ts b/lib/managed-apps/runner.ts
index 74f516dd..34b153b7 100644
--- a/lib/managed-apps/runner.ts
+++ b/lib/managed-apps/runner.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
import "server-only";
import { execFile } from "node:child_process";
import { accessSync, constants } from "node:fs";
@@ -64,7 +65,7 @@ const userHome = (): string => process.env.HOME || homedir();
const isExecutable = (candidate: string): boolean => {
try {
- accessSync(candidate, constants.X_OK);
+ accessSync(/* turbopackIgnore: true */ candidate, constants.X_OK);
return true;
} catch {
return false;
@@ -90,7 +91,7 @@ export async function resolveCommand(command: string): Promise<string | null> {
// PATH missed it — look where these CLIs actually install themselves before
// concluding the app is absent.
for (const dir of FALLBACK_BIN_DIRS) {
- const candidate = join(userHome(), dir, command);
+ const candidate = join(/* turbopackIgnore: true */ userHome(), dir, command);
if (isExecutable(candidate)) return candidate;
}
return null;
diff --git a/lib/models/catalog.js b/lib/models/catalog.js
index 37a10f75..428f0bfb 100644
--- a/lib/models/catalog.js
+++ b/lib/models/catalog.js
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
// Model catalog metadata, sourced from the one fixed HTTPS models.dev endpoint.
// Lazy hierarchy: memory -> bounded private disk cache -> bounded network -> stale disk.
import { constants as fsConstants } from 'node:fs'
@@ -47,7 +48,7 @@ async function readBoundedResponse(response) {
async function readDisk() {
let handle
try {
- handle = await open(CACHE_FILE, fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW)
+ handle = await open(/* turbopackIgnore: true */ CACHE_FILE, fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW)
const stat = await handle.stat()
if (!stat.isFile() || stat.size <= 0 || stat.size > MAX_CATALOG_BYTES) return null
const raw = JSON.parse(await handle.readFile('utf8'))
diff --git a/lib/workflow/storage.ts b/lib/workflow/storage.ts
index 5d486334..1f3bc4e3 100644
--- a/lib/workflow/storage.ts
+++ b/lib/workflow/storage.ts
@@ -1,3 +1,4 @@
+// Host-owned runtime data is not a build asset; tracing exclusions preserve runtime guards.
import { promises as fs } from "node:fs";
import os from "node:os";
import path from "node:path";
@@ -26,7 +27,7 @@ export async function loadWorkflowStore(): Promise<WorkflowStoreState> {
const pending = (async () => {
let raw: string;
try {
- raw = await fs.readFile(file, "utf8");
+ raw = await fs.readFile(/* turbopackIgnore: true */ file, "utf8");
} catch (error) {
if ((error as NodeJS.ErrnoException).code === "ENOENT") {
cache = EMPTY();
diff --git a/scripts/verify-build.sh b/scripts/verify-build.sh
index 07e23821..6ab50b22 100755
--- a/scripts/verify-build.sh
+++ b/scripts/verify-build.sh
@@ -34,7 +34,12 @@ cp -a "$REPO/node_modules/." "$TMP/node_modules/"
cd "$TMP"
# nice/ionice: this box also serves prod. A build gate must not starve :4005.
-nice -n 15 ionice -c2 -n7 node node_modules/.bin/next build
+MSO_VERIFY_BUILD_LOG="$TMP/build-output.log"
+nice -n 15 ionice -c2 -n7 node node_modules/.bin/next build 2>&1 | tee "$MSO_VERIFY_BUILD_LOG"
+if grep -Ei "(^|[[:space:]])warnings?[: ]|⚠" "$MSO_VERIFY_BUILD_LOG"; then
+ echo "build: warnings are a release failure; resolve their source before shipping" >&2
+ exit 1
+fi
# Reuse this exact built tree for mandatory browser journeys; synthetic stores only.
node scripts/e2e/release.mjs