fix: preserve gateway watch trace overrides

This commit is contained in:
Peter Steinberger
2026-05-04 22:53:50 +01:00
parent 35e48a049b
commit d6917edc53
3 changed files with 4 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ const TMUX_CHILD_ENV_KEYS = [
RUN_NODE_CPU_PROF_DIR_ENV,
"OPENCLAW_SKIP_CHANNELS",
"OPENCLAW_STATE_DIR",
"OPENCLAW_TRACE_SYNC_IO",
];
const sanitizeSessionPart = (value) => {

View File

@@ -159,7 +159,7 @@ function createGatewayCliStartupTrace() {
async measure<T>(name: string, run: () => Awaitable<T>): Promise<T> {
const before = performance.now();
try {
return await withDiagnosticPhase(`cli.${name}`, run);
return await withDiagnosticPhase(name, run);
} finally {
const now = performance.now();
emit(name, now - before, now - started);

View File

@@ -43,6 +43,7 @@ describe("gateway-watch tmux wrapper", () => {
env: {
OPENCLAW_GATEWAY_PORT: "19001",
OPENCLAW_PROFILE: "Dev Profile",
OPENCLAW_TRACE_SYNC_IO: "0",
SHELL: "/bin/zsh",
},
nodePath: "/opt/node",
@@ -57,6 +58,7 @@ describe("gateway-watch tmux wrapper", () => {
expect(command).toContain("'FORCE_COLOR=1'");
expect(command).toContain("'OPENCLAW_GATEWAY_PORT=19001'");
expect(command).toContain("'OPENCLAW_PROFILE=Dev Profile'");
expect(command).toContain("'OPENCLAW_TRACE_SYNC_IO=0'");
expect(command).toContain("/opt/node");
expect(command).toContain("scripts/watch-node.mjs");
expect(command).toContain("gateway");