fix: apply 2 pr-agent suggestions

- frontend/src/contexts/EventContext.test.tsx:501 Make the deferred-bootstrap test assert real behavior
- backend/test/services/opencode-single-server.test.ts:352 Restore process env instead of deleting HOME/SHELL

Applied-by: pr-agent-autoapply
This commit is contained in:
lil-worker-cstech[bot] authored and GitHub committed 2026-11-13 06:19:42 +00:00
1 parent b625acfc0c
commit b9ab85d44c
2 files changed
+8 -5

No files matched your search

@@ -349,18 +349,19 @@ describe('OpenCodeServerManager - child environment', () => {
ENV: '/workspace/repos/evil/envrc',
HOME: '/tmp/evil-user-home',
} satisfies Record<string, string>
const restoreEnv = applyTestEnv(
fromPreferences ? {} : vars,
)
try {
if (fromPreferences) {
new SettingsService(context.db).updateSettings({
serverEnvVars: Object.entries(vars).map(([key, value]) => ({ key, value })),
})
} else {
for (const [key, value] of Object.entries(vars)) process.env[key] = value
}
await context.harness.manager.start()
} finally {
for (const key of Object.keys(vars)) delete process.env[key]
restoreEnv()
}
const env = context.harness.spawnEnv()