Skip to content

[Feat] Add custom routing rules to built-in automations - #2452

Merged
brunobergher merged 4 commits into
developfrom
feature/automation-output-routing-0s2jsauqit0zo
Sep 10, 2026
Merged

[Feat] Add custom routing rules to built-in automations#2452
brunobergher merged 4 commits into
developfrom
feature/automation-output-routing-0s2jsauqit0zo

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Generalize the CI Failure Triage Additional rules experience into a shared repository-scope, per-repository destination, and residual workflow-guidance capability.
  • Enable it for Suggest Ideas, Summarize Merged PRs, Security Auditor, Code Quality Auditor, CI Failure Triage, and Merge announcer while leaving global, triage-oriented, reactive, and non-communication automations unchanged.
  • Compile and revalidate natural-language rules at save time against exact repository identities and available communication destinations, persisting the compiled result in each automation's JSON settings.
  • Enforce repository scope and destination-aware grouping in scheduled, manual, and webhook runtime paths so work for different providers, hosts, or communication targets is never mixed.
  • Preserve persisted task_pull_requests repository IDs when routing merged-PR summaries, with provider-and-host-scoped fallback only for legacy rows without an ID.
  • Keep Suggest Ideas environment coverage partitioned by repository ID and allow every eligible automation to pass Run now preflight when its saved rules provide the only available destinations.
  • Add public documentation, focused regression coverage, and repository guidance for evaluating this capability on future built-in automations.

Why this change was made

Repository-specific automation output can be relevant to different teams. The text-based routing model previously available only to CI Failure Triage now provides the same flexible configuration without introducing separate repository-group management UI.

Impact

Admins can keep a default automation destination while using optional natural-language rules to narrow repository scope, override destinations for individual repositories, and provide workflow or report-writing guidance. Existing CI rules remain compatible, blank rules retain the shipped defaults, and invalid or stale compiled routing fails closed.

The implementation was exercised with focused types, SDK, web server, web client, and documentation tests, plus the repository's formatting, lint, typecheck, and Knip gates. The exact previously failing web Test-job cases now pass, and the full SDK suite passes.

@roomote-community

roomote-community Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Preserve task_pull_requests repository identity when routing merged-PR summaries.
  • Keep Suggest Ideas environment coverage scoped by repository identity, not just full name.
  • Allow rules-only non-Slack destinations to satisfy every manual Run now preflight requirement.

Reviewed 423959f

@brunobergher
brunobergher marked this pull request as ready for review September 10, 2026 10:51
Comment thread packages/sdk/src/server/automations/announcer.ts Outdated
Comment thread packages/sdk/src/server/automations/suggester.ts
Comment thread apps/web/src/trpc/commands/automations/trigger-agent.ts
@roomote-roomote

roomote-roomote Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Fixed all reviewed routing issues and the failing Test-job regression in e8ca25c and 423959f.

  • Merged-PR summaries resolve active repositories by persisted task_pull_requests.repository_id, with a provider/host-scoped fallback only for legacy null IDs.
  • Suggest Ideas carries repository IDs into provider/host partitions and filters environment coverage by ID.
  • Run now uses rules-based destinations for every eligible automation's preflight, including Discord, Teams, and Telegram without an unrelated Slack installation, while leaving per-repository routing to the runner.
  • The exact previously failing web test reproduction passes 52/52, the full SDK suite passes 1,791/1,791, the refreshed GitHub Test check passed, and all pre-push gates pass.

A full local web-server run passed 1,693/1,701; the remaining eight dev-login assertions were affected by the sandbox's preconfigured inference environment and are unrelated to this diff. The visual-proof step timed out; this fixer changed server-side identity and preflight behavior, not rendered UI.

@brunobergher
brunobergher merged commit 9dde525 into develop Sep 10, 2026
18 checks passed
@brunobergher
brunobergher deleted the feature/automation-output-routing-0s2jsauqit0zo branch September 10, 2026 11:39
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.

2 participants