feat: Automation sprint — webhooks, auto-research, model fallback, SensoryBus (#77, #78, #79, #80) #81

Merged
perplexity merged 1 commits from feat/automation-sprint into main 2026-03-20 15:06:00 -04:00
Owner

Automation Sprint

Four high-leverage automation features built and tested:

Block 2 — Gitea Webhooks → Gateway (#77)

  • server/webhooks.py: Translates push/issue/PR/comment events to Matrix messages
  • Gateway integration: POST /api/webhook/gitea
  • Bot filtering, HMAC verification
  • 17/17 tests pass

Block 3 — Self-Triggering Research (#78)

  • _evaluate_research_trigger() in bridge.py
  • Pattern matching for question-like thoughts
  • Cooldown, seed filter, active-lock safeguards
  • 6 new tests (bridge total: 17)

Block 4 — Model Fallback Chain (#79)

  • server/ollama_client.py: Resilient Ollama client with model chain
  • Auto-retry, health tracking, skip unhealthy models
  • Integrated into ResearchEngine (backward compatible)
  • 11/11 tests pass, 21/21 research tests still pass

Block 5 — SensoryBus Subscriber (#80)

  • register_on_bus() subscribes to 7 SensoryBus event types
  • Ready for Timmy dashboard integration
  • 3 new bus integration tests

Test Summary

  • test_webhooks.py: 17/17 ✓
  • test_bridge.py: 17/17 ✓
  • test_ollama_client.py: 11/11 ✓
  • test_research.py: 21/21 ✓
  • test_gateway.py: 10/10 ✓

Closes #77, #78, #79, #80
Supersedes #51

## Automation Sprint Four high-leverage automation features built and tested: ### Block 2 — Gitea Webhooks → Gateway (#77) - `server/webhooks.py`: Translates push/issue/PR/comment events to Matrix messages - Gateway integration: `POST /api/webhook/gitea` - Bot filtering, HMAC verification - **17/17 tests pass** ### Block 3 — Self-Triggering Research (#78) - `_evaluate_research_trigger()` in bridge.py - Pattern matching for question-like thoughts - Cooldown, seed filter, active-lock safeguards - **6 new tests** (bridge total: 17) ### Block 4 — Model Fallback Chain (#79) - `server/ollama_client.py`: Resilient Ollama client with model chain - Auto-retry, health tracking, skip unhealthy models - Integrated into ResearchEngine (backward compatible) - **11/11 tests pass**, 21/21 research tests still pass ### Block 5 — SensoryBus Subscriber (#80) - `register_on_bus()` subscribes to 7 SensoryBus event types - Ready for Timmy dashboard integration - **3 new bus integration tests** ### Test Summary - `test_webhooks.py`: 17/17 ✓ - `test_bridge.py`: 17/17 ✓ - `test_ollama_client.py`: 11/11 ✓ - `test_research.py`: 21/21 ✓ - `test_gateway.py`: 10/10 ✓ Closes #77, #78, #79, #80 Supersedes #51
perplexity added 1 commit 2026-03-20 15:05:50 -04:00
Block 2 — Gitea webhooks → gateway (#77):
- New server/webhooks.py: translates push/issue/PR/comment events to Matrix messages
- Gateway integration: POST /api/webhook/gitea endpoint
- Bot filtering (hermes, kimi, manus), HMAC signature verification
- 17/17 tests pass

Block 3 — Self-triggering research (#78):
- _evaluate_research_trigger() in bridge.py
- Pattern matching for question-like thoughts (I wonder, How does, etc.)
- Cooldown (10min), seed type filter, active-lock safeguards
- _extract_research_topic() extracts concise topic from thought content
- 6 new tests in test_bridge.py (14 → 17 total)

Block 4 — Model fallback chain (#79):
- New server/ollama_client.py: resilient Ollama client
- Configurable model_chain with auto-retry and model health tracking
- Integrated into ResearchEngine (replaces raw httpx, backward compatible)
- health_check() and status() for monitoring
- 11/11 tests pass, 21/21 research tests still pass

Block 5 — Bridge as SensoryBus subscriber (#80):
- register_on_bus() subscribes to 7 SensoryBus event types
- Adapter methods translate SensoryEvent → Matrix protocol messages
- Ready for Timmy dashboard integration via get_sensory_bus()
- 3 new bus integration tests in test_bridge.py (17 total)

PROTOCOL.md updated with all new capabilities.
perplexity merged commit d7d269fc51 into main 2026-03-20 15:06:00 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: perplexity/the-matrix#81