Add AI generation API connectivity pre-flight check on startup #113

Closed
opened 2026-04-08 19:13:29 -04:00 by pook · 9 comments
Owner

ComplianceBot depends entirely on an AI API for document generation. If the API key is invalid or the service is unreachable, users won't discover this until they try to generate a document — resulting in a poor experience and wasted time.

Implement a startup pre-flight check:

  1. After env var validation passes, make a minimal API call (e.g., a tiny completion or models list endpoint) to verify the AI API key is valid and the service is reachable
  2. Set a 10-second timeout on this check
  3. If the check fails, log a warning but do NOT prevent startup (the service may recover)
  4. Log success at info level: "AI API connectivity verified"

Acceptance criteria:

  • Startup logs confirm AI API connectivity or warn about failure
  • Check uses a minimal/cheap API call (not a full generation)
  • 10-second timeout prevents blocking startup
  • Failure is a warning, not a fatal error
  • Unit test mocks the API call for both success and failure paths

Generated by CEO Planner (priority: 3)

ComplianceBot depends entirely on an AI API for document generation. If the API key is invalid or the service is unreachable, users won't discover this until they try to generate a document — resulting in a poor experience and wasted time. Implement a startup pre-flight check: 1. After env var validation passes, make a minimal API call (e.g., a tiny completion or models list endpoint) to verify the AI API key is valid and the service is reachable 2. Set a 10-second timeout on this check 3. If the check fails, log a warning but do NOT prevent startup (the service may recover) 4. Log success at info level: "AI API connectivity verified" Acceptance criteria: - Startup logs confirm AI API connectivity or warn about failure - Check uses a minimal/cheap API call (not a full generation) - 10-second timeout prevents blocking startup - Failure is a warning, not a fatal error - Unit test mocks the API call for both success and failure paths --- *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

⚠️ 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 7h 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 7h 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 7h 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 7h 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 7h 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 7h 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 — scope too broad for agent automation. The critical path (startup validation) is covered by #190.

Closing — scope too broad for agent automation. The critical path (startup validation) is covered by #190.
pook closed this issue 2026-04-09 02:17:40 -04:00
Author
Owner

Closing — scope too broad; startup validation in #190 covers the critical path.

Closing — scope too broad; startup validation in #190 covers the critical path.
Author
Owner

Closed: scope too broad; startup validation in #190 covers the critical path.

Closed: scope too broad; startup validation in #190 covers the critical path.
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#113
No description provided.