From 72419bc33351b659874a7be32b3b74c2053e1815 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Fri, 7 Aug 2026 21:29:14 +0800 Subject: [PATCH] test(e2b): cover the environment tombstone removal The serializer's undefined-tombstone branch (from the seam's NodeJS.ProcessEnv migration) removes an ambient entry; the composition env test now exercises it against the scrubbed ambient KEEP entry. --- packages/e2b/subprocess-e2b/tests/subprocess.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/e2b/subprocess-e2b/tests/subprocess.spec.ts b/packages/e2b/subprocess-e2b/tests/subprocess.spec.ts index 747dc936c6..d40c69df89 100644 --- a/packages/e2b/subprocess-e2b/tests/subprocess.spec.ts +++ b/packages/e2b/subprocess-e2b/tests/subprocess.spec.ts @@ -388,6 +388,8 @@ describe('E2BSubprocessHandle', () => { '--split-string': 'literal-value', DEEPSEEK_API_KEY: 'explicit-secret', DSH_MODE: 'test', + // The seam's tombstone: an explicit undefined removes the ambient entry. + KEEP: undefined, }, }), '/workspace/.dsh-e2b/processes/one') expect(handle.pid).toBe(-1) @@ -433,7 +435,7 @@ describe('E2BSubprocessHandle', () => { '/workspace/.dsh-e2b/processes/one/stderr.log', ]) expect(fake.writtenFileData.get('/workspace/.dsh-e2b/processes/one/environment')).toBe( - 'PATH=/bin\0KEEP=safe\0UNICODE=你好\0HOME=/home/user\0FOO-BAR=hyphen-value\0--split-string=literal-value\0DEEPSEEK_API_KEY=explicit-secret\0DSH_MODE=test\0', + 'PATH=/bin\0UNICODE=你好\0HOME=/home/user\0FOO-BAR=hyphen-value\0--split-string=literal-value\0DEEPSEEK_API_KEY=explicit-secret\0DSH_MODE=test\0', ) let piped = ''