Add 30-second timeout on OpenAI document generation API calls #136

Closed
opened 2026-04-08 21:11:49 -04:00 by pook · 5 comments
Owner

Replaces stale issue #63. AI generation calls can hang indefinitely, tying up server resources.

Implement:

  1. Add AbortController with 30-second timeout to the OpenAI API call in the document generation service
  2. On timeout, throw a typed GenerationTimeoutError
  3. Return 504 with { "error": "generation_timeout", "message": "Document generation timed out. Please retry." }
  4. Add unit test with delayed mock verifying timeout fires and returns 504

Acceptance criteria:

  • Hanging API call aborted after 30s
  • Client gets 504 with actionable message
  • Test covers timeout path

Generated by CEO Planner (priority: 3)

Replaces stale issue #63. AI generation calls can hang indefinitely, tying up server resources. Implement: 1. Add AbortController with 30-second timeout to the OpenAI API call in the document generation service 2. On timeout, throw a typed GenerationTimeoutError 3. Return 504 with { "error": "generation_timeout", "message": "Document generation timed out. Please retry." } 4. Add unit test with delayed mock verifying timeout fires and returns 504 Acceptance criteria: - Hanging API call aborted after 30s - Client gets 504 with actionable message - Test covers timeout path --- *Generated by CEO Planner (priority: 3)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

Closing as superseded by #203 (comprehensive timeout handling) and #156. The scope of this issue is fully covered by those newer issues.

Closing as superseded by #203 (comprehensive timeout handling) and #156. The scope of this issue is fully covered by those newer issues.
pook closed this issue 2026-04-09 03:32:25 -04:00
Author
Owner

Superseded by #203 and #156 which cover the same 30s timeout scope.

Superseded by #203 and #156 which cover the same 30s timeout scope.
Author
Owner

Closed: superseded by #203 and #156.

Closed: superseded by #203 and #156.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#136
No description provided.