fix(alerts): Use workflow APIs for issue alert rules#1084
Merged
Conversation
f431c30 to
b972048
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
b972048 to
5e7e4b7
Compare
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>
e921f1c to
0a7fbdf
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.