Adds three new monitoring endpoints:
- GET /health/gitea — Verifies Gitea API connectivity
- GET /health/discord — Reports Discord bot connection status
- GET /health/queue — Returns pending task count
All endpoints return JSON with status field. The Gitea endpoint
includes the API status code on success or error message on failure.
Discord endpoint returns "not_configured", "connecting", or "ok" with
bot username. Queue endpoint includes pending_tasks count.
Tests use mock lifespan to avoid initializing task queue, message
store, dispatcher, and discord handler during testing.
Adds asynccontextmanager lifespan to webapp.py that:
- Initializes task_queue and message_store on startup
- Starts Dispatcher as background task
- Starts Discord bot gateway if DISCORD_TOKEN is set
- Properly shuts down all resources on application exit
This completes Phase 3 Task 6, enabling the webapp to run Discord bot
and dispatcher concurrently with the webhook server.
- Add parse_gitea_event() function to parse issue comments, labels, and PR review requests
- Detect @agent mentions in issue comments and strip them from message
- Implement rate limiting with slowapi (10 requests/minute)
- Integrate with PersistentTaskQueue and MessageStore
- Queue messages if task is already running for the same thread
- Add 6 comprehensive tests for event parsing and signature verification