Skip to content

fix(alerts): Use workflow APIs for issue alert rules#1084

Merged
dcramer merged 5 commits into
mainfrom
fix/issue-alert-workflow-apis
Jun 11, 2026
Merged

fix(alerts): Use workflow APIs for issue alert rules#1084
dcramer merged 5 commits into
mainfrom
fix/issue-alert-workflow-apis

Conversation

@dcramer

@dcramer dcramer commented Jun 11, 2026

Copy link
Copy Markdown
Member

Issue alert catalog lookups now use the organization workflow index for list, search, and detail paths instead of the deprecated project rule endpoints. Detail lookup filters by both project slug and workflow id, preserving project-scoped behavior while moving to workflow-shaped payloads and monitor alert URLs.

The workflow index can return unattached org-level workflows even when a project slug is supplied, so issue alert results are filtered to attached workflows and listing continues through workflow pages until it has enough project-scoped rules or the upstream cursor is exhausted. Issue alert name searches use wildcarded quoted workflow name syntax so normal name searches still behave like contains searches without tripping the workflow query parser on names containing colons.

The alert formatter now treats workflow payloads as source data rather than user-facing output: it removes detector/workflow component IDs, drops empty or unknown placeholder fields, humanizes workflow conditions and actions, and keeps response notes focused on real alert inspection workflows. Snapshot coverage now shows full formatted alert output for list/detail behavior and includes regressions for stale internal workflow details.

This also adds docs/contributing/tool-responses.md as the policy for MCP tool output, updates QA guidance to inspect raw MCP tool results, reorganizes docs into topic directories, removes the obsolete LLM-only docs bucket, and changes docs:check to validate local Markdown links while rejecting at-prefixed repo-local references that can inline entire docs.

Fixes #1082

Validated with pnpm run docs:check, pnpm run tsc, pnpm run lint, pnpm run test, pnpm -w run build, focused alert snapshot tests, and raw stdio MCP QA for live issue alert detail output.

@dcramer dcramer force-pushed the fix/issue-alert-workflow-apis branch from f431c30 to b972048 Compare June 11, 2026 19:08

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b972048. Configure here.

Comment thread packages/mcp-core/src/api-client/client.ts
@dcramer dcramer marked this pull request as ready for review June 11, 2026 19:15
@dcramer dcramer force-pushed the fix/issue-alert-workflow-apis branch from b972048 to 5e7e4b7 Compare June 11, 2026 19:25
dcramer and others added 4 commits June 11, 2026 13:20
Route issue alert rule list, search, and detail lookups through the organization workflow index instead of the deprecated project rule endpoints. Keep projectSlug scoping on ID lookups so the catalog behavior remains project-scoped while using the workflow API payload shape.

Update issue alert formatting and tests for workflow-native fields such as enabled state, triggers, action filters, detector IDs, and monitor alert URLs.

Fixes #1082

Co-authored-by: GPT-5 Codex <codex@openai.com>
Avoid exposing a workflow next cursor after client-side filtering produces more attached issue alert rules than the requested limit. Returning that cursor would skip filtered-but-unshown rules from the current response.

Add regression coverage for overfull workflow pages with next cursors.

Refs #1082

Co-authored-by: GPT-5 Codex <codex@openai.com>
Remove workflow-internal identifiers and raw action payload details from issue alert responses. Humanize workflow component labels and omit empty or unknown placeholder fields so alert output is useful for real alert questions.

Refs #1082

Co-authored-by: GPT-5 Codex <codex@openai.com>
Move docs into topic directories, add a tool response policy, and update AGENTS.md and docs/README.md so every doc is listed in the maintained maps.

Update docs checking to validate Markdown links and reject at-prefixed repo-local references, which can cause agents to inline large documents.

Refs #1082

Co-authored-by: GPT-5 Codex <codex@openai.com>
@dcramer dcramer force-pushed the fix/issue-alert-workflow-apis branch from e921f1c to 0a7fbdf Compare June 11, 2026 20:22
Comment thread packages/mcp-core/src/tools/catalog/support/alerts.ts Outdated
Render trigger-level threshold metadata alongside nested actions so metric alert details keep useful
threshold labels when actions are present.

Add full snapshot coverage for metric alert detail output. Fix component section spacing so
headings do not run into prior content.

Refs #1082
Co-Authored-By: GPT-5 Codex <codex@openai.com>
@dcramer dcramer merged commit 324a7de into main Jun 11, 2026
20 checks passed
@dcramer dcramer deleted the fix/issue-alert-workflow-apis branch June 11, 2026 21:29
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.

Migrate issue alert rule API calls to workflow endpoints

1 participant