fix: resolve GitHub Actions workflow hang after task completion

- Add process.exit(0) in runner.ts for immediate termination
- Fix Timer type to ReturnType<typeof setInterval> in manager.ts
- Add .unref() to BackgroundManager polling interval
- Add cleanup() method to BackgroundManager

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-27 23:06:44 +09:00
parent 2246d1c5ef
commit dd12928390
2 changed files with 10 additions and 7 deletions

View File

@@ -91,19 +91,15 @@ export async function run(options: RunOptions): Promise<number> {
if (eventState.mainSessionError) {
console.error(pc.red(`\n\nSession ended with error: ${eventState.lastError}`))
console.error(pc.yellow("Check if todos were completed before the error."))
abortController.abort()
await eventProcessor.catch(() => {})
cleanup()
return 1
process.exit(1)
}
const shouldExit = await checkCompletionConditions(ctx)
if (shouldExit) {
console.log(pc.green("\n\nAll tasks completed."))
abortController.abort()
await eventProcessor.catch(() => {})
cleanup()
return 0
process.exit(0)
}
}