Skip to content

Commit ef6855a

Browse files
committed
fix(onboard): stabilize Docker authority across terminals
Signed-off-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
1 parent a9fc804 commit ef6855a

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/lib/onboard/runtime-provider/docker-operation-authority.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ describe("Docker operation authority", () => {
138138
expect(second.engine.authorityId).not.toBe(first.engine.authorityId);
139139
});
140140

141-
it("keeps authority stable across SSH session metadata and does not forward it", () => {
141+
it("keeps authority stable across terminal and SSH session metadata (#9584)", () => {
142142
const executableRoot = fakeDockerScript(
143-
`printf '%s\\n' "\${XDG_SESSION_ID-unset}" "\${XDG_SESSION_CLASS-unset}" "\${XDG_SESSION_TYPE-unset}"`,
143+
`printf '%s\\n' "\${TERM-unset}" "\${XDG_SESSION_ID-unset}" "\${XDG_SESSION_CLASS-unset}" "\${XDG_SESSION_TYPE-unset}"`,
144144
);
145145
const common = {
146146
HOME: "/tmp/nemoclaw-home",
@@ -153,19 +153,23 @@ describe("Docker operation authority", () => {
153153
XDG_SESSION_ID: "101",
154154
XDG_SESSION_CLASS: "user",
155155
XDG_SESSION_TYPE: "tty",
156+
TERM: "xterm-256color",
156157
});
157158
const second = createDockerOperationAuthority("host-local-inference", {
158159
...common,
159160
XDG_SESSION_ID: "102",
160161
XDG_SESSION_CLASS: "background",
161162
XDG_SESSION_TYPE: "unspecified",
163+
TERM: "dumb",
162164
});
163165

164166
expect(second.engine.authorityId).toBe(first.engine.authorityId);
165167
expect(dockerOperationBindingSha256(second.engine)).toBe(
166168
dockerOperationBindingSha256(first.engine),
167169
);
168-
expect(second.engine.capture(["version"]).stdout).toBe("unset\nunset\nunset\n");
170+
expect(second.engine.capture(["version"]).stdout).toBe(
171+
"unset\nunset\nunset\nunset\n",
172+
);
169173
});
170174

171175
it("fails closed when an earlier Docker credential helper appears", () => {

src/lib/onboard/runtime-provider/docker-operation-authority.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ const DOCKER_COMMAND_ENV_NAMES = new Set([
6868
"SHELL",
6969
"PATH",
7070
"SSH_AUTH_SOCK",
71-
"TERM",
7271
"HOSTNAME",
7372
"LANG",
7473
"TMPDIR",

0 commit comments

Comments
 (0)