-
Notifications
You must be signed in to change notification settings - Fork 26
feat: Add RCA tools for fetching and formatting Root Cause Analysis data #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ion for test ID input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds Root Cause Analysis (RCA) tools for BrowserStack automation testing. The feature enables fetching and formatting AI-generated RCA data for failed test cases to help diagnose test failures.
- Implements three core RCA tools: getBuildId, listTestIds, and fetchRCA
- Adds comprehensive polling mechanism for asynchronous RCA data retrieval
- Includes proper error handling and progress tracking functionality
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/tools/rca-agent.ts | Main tool definitions and MCP server integration for RCA functionality |
src/tools/rca-agent-utils/types.ts | Type definitions for RCA states, test details, and API responses |
src/tools/rca-agent-utils/rca-data.ts | Core RCA data fetching logic with polling and progress tracking |
src/tools/rca-agent-utils/get-failed-test-id.ts | Utility to extract failed test IDs from BrowserStack build hierarchy |
src/tools/rca-agent-utils/get-build-id.ts | Utility to fetch build ID from project and build names |
src/tools/rca-agent-utils/format-rca.ts | Formatter for RCA data into readable markdown format |
src/server-factory.ts | Integration of RCA tools into the main server factory |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
// Return unique failed test IDs | ||
return allFailedTests; | ||
} catch (error) { | ||
console.error("Error fetching failed tests:", error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the imported logger instead of console.error for consistent logging throughout the application.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.