fix(non-interactive-env): use export for env vars to apply to all chained commands

Previous `VAR=val cmd` format only applied to first command in chains.
New `export VAR=val; cmd` format ensures variables persist for all commands.

Also increased test timeouts for todo-continuation-enforcer stability.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2026-01-03 15:36:01 +09:00
parent 03c51c9321
commit f61e1a5f2b
3 changed files with 37 additions and 16 deletions

View File

@@ -415,7 +415,7 @@ describe("todo-continuation-enforcer", () => {
await hook.handler({
event: { type: "session.idle", properties: { sessionID } },
})
await new Promise(r => setTimeout(r, 2500))
await new Promise(r => setTimeout(r, 3500))
// #then - first injection happened
expect(promptCalls.length).toBe(1)
@@ -424,11 +424,11 @@ describe("todo-continuation-enforcer", () => {
await hook.handler({
event: { type: "session.idle", properties: { sessionID } },
})
await new Promise(r => setTimeout(r, 2500))
await new Promise(r => setTimeout(r, 3500))
// #then - second injection also happened (no throttle blocking)
expect(promptCalls.length).toBe(2)
}, { timeout: 10000 })
}, { timeout: 15000 })
// ============================================================
// ABORT "IMMEDIATELY BEFORE" DETECTION TESTS
@@ -589,7 +589,7 @@ describe("todo-continuation-enforcer", () => {
event: { type: "session.idle", properties: { sessionID } },
})
await new Promise(r => setTimeout(r, 3000))
await new Promise(r => setTimeout(r, 3500))
expect(promptCalls).toHaveLength(0)
// #when - second idle event occurs (abort is no longer "immediately before")
@@ -597,11 +597,11 @@ describe("todo-continuation-enforcer", () => {
event: { type: "session.idle", properties: { sessionID } },
})
await new Promise(r => setTimeout(r, 2500))
await new Promise(r => setTimeout(r, 3500))
// #then - continuation injected on second idle (abort state was consumed)
expect(promptCalls.length).toBe(1)
}, { timeout: 10000 })
}, { timeout: 15000 })
test("should handle multiple abort errors correctly - only last one matters", async () => {
// #given - session with incomplete todos