Skip to content

Fix/webhook dispatcher db fallback#344

Merged
vincentgrobler merged 2 commits intomainfrom
fix/webhook-dispatcher-db-fallback
Apr 9, 2026
Merged

Fix/webhook dispatcher db fallback#344
vincentgrobler merged 2 commits intomainfrom
fix/webhook-dispatcher-db-fallback

Conversation

@vincentgrobler
Copy link
Copy Markdown
Collaborator

@vincentgrobler vincentgrobler commented Apr 9, 2026

Description

webhook dispatcher db fallback

Related Issue

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📝 Documentation update
  • ♻️ Refactor (no functional changes)
  • 🧪 Test update

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Browser testing (specify browsers)

Screenshots (if applicable)

Checklist

  • My code follows the project's coding standards
  • I have run npm run lint and there are no errors
  • I have run npm run test and all tests pass
  • I have added tests for my changes (if applicable)
  • I have updated the documentation (if applicable)
  • My source files have AGPL licence headers
  • My changes generate no new TypeScript errors

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crewform Ready Ready Preview, Comment Apr 9, 2026 0:53am

Root cause found via Railway logs: the brain LLM calls final_answer
with a 95-char summary instead of the full synthesized content. The
worker delegation results contain thousands of chars of detailed
output, but the brain just says 'Task completed successfully.'

Fix: when final_answer output is less than 20% of the combined worker
outputs, automatically append all completed delegation results as
structured markdown sections (## WorkerName). This ensures the full
team output reaches Trello/Slack/Discord regardless of brain behavior.

Also added DB fallback in webhookDispatcher: if no output is passed
inline, fetch it from team_runs table as a safety net.
- Collaboration executor: now fetches team name + output_route_ids
  (was using hardcoded string and missing route filtering)
- Orchestrator executor: augment lazy final_answer with full worker
  delegation outputs when brain provides < 20% of total content
- Webhook dispatcher: DB fallback to fetch output if not passed inline
- All 3 executors now follow the same pattern:
  * SELECT name, config, mode, output_route_ids from teams
  * Hoist teamData above try block for catch access
  * Pass output, team name, and output_route_ids to dispatcher
  * Fallback team name in catch block
@vincentgrobler vincentgrobler force-pushed the fix/webhook-dispatcher-db-fallback branch from 430c87c to fcd44a4 Compare April 9, 2026 12:52
@vincentgrobler vincentgrobler merged commit b18b235 into main Apr 9, 2026
8 checks passed
@vincentgrobler vincentgrobler deleted the fix/webhook-dispatcher-db-fallback branch April 9, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant