From e30a384e580d044c7a0c956c0ba19db6c21bd699 Mon Sep 17 00:00:00 2001 From: William Easton Date: Thu, 2 Oct 2025 13:16:17 -0500 Subject: [PATCH 1/3] Change martian response format --- ...ue-triage.yml => martian-issue-triage.yml} | 58 ++++++++++++------- 1 file changed, 37 insertions(+), 21 deletions(-) rename .github/workflows/{marvin-issue-triage.yml => martian-issue-triage.yml} (65%) diff --git a/.github/workflows/marvin-issue-triage.yml b/.github/workflows/martian-issue-triage.yml similarity index 65% rename from .github/workflows/marvin-issue-triage.yml rename to .github/workflows/martian-issue-triage.yml index bd3f46b24..9cc170f06 100644 --- a/.github/workflows/marvin-issue-triage.yml +++ b/.github/workflows/martian-issue-triage.yml @@ -49,51 +49,67 @@ jobs: PROMPT< and tags. You shouldn't put everything in collapsible sections, especially if the response is short. Use your discretion to determine when to use collapsible sections to avoid overwhelming the reader with too much detail -- think of them like an appendix that can be expanded if the reader is interested. - We have identified an open pull request, #654, titled "Fix division by zero handling." This pull request introduces a custom DivisionByZeroError and a safe_divide function, which aligns with your desired "Expected Behavior." However, an inconsistency was found in the fix/division-by-zero branch associated with this pull request: the Calculator.divide method itself has not been updated to utilize the new DivisionByZeroError or the safe_divide function, and still raises a generic ValueError. + # Example output for "Recommendation" part of the response + PR #654 already implements the requested feature but is incomplete. The Pull Request is not in a mergable state yet, the remaining work should be completed: 1) update the Calculator.divide method to utilize the new DivisionByZeroError or the safe_divide function, and 2) update the tests to ensure that the Calculator.divide method raises the new DivisionByZeroError when the divisor is 0. + +
+ Findings + ...details from the code analysis that are relevant to the issue and the recommendation... +
- Next Steps: - It is recommended to update the existing pull request #654 to fully integrate the DivisionByZeroError and safe_divide function into the Calculator.divide method. This would ensure that the calculator consistently raises the more specific error, fulfilling the goal of graceful error handling with a clear message. +
+ Detailed Action Plan + ...a detailed plan that a junior developer could follow to implement the recommendation... +
- #### Related Issues and Pull Requests + # Example Output for "Related Items" part of the response + +
+ Related Issues and Pull Requests | Repository | Issue or PR | Title | Confidence | | --- | --- | --- | --- | | jlowin/fastmcp | [Add matrix operations support](https://github.com/jlowin/fastmcp/pull/680) | Add matrix operations support | [High ⓘ](## "This pull request directly addresses the feature request for adding matrix operations to the calculator.") | | jlowin/fastmcp | [Add matrix operations support](https://github.com/jlowin/fastmcp/issues/681) | Add matrix operations support | [High ⓘ](## "This issue directly addresses the feature request for adding matrix operations to the calculator.") | +
- #### Related Files +
+ Related Files | Repository | File | Confidence | Sections | | --- | --- | --- | --- | - | modelcontextprotocol/python-sdk | [test_calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py) | [High ⓘ](## "This file contains the test cases for the Calculator class, including a test that specifically asserts a ValueError is raised for division by zero, confirming the current intended behavior.") | [25-27](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py#L25-27) | - | modelcontextprotocol/python-sdk | [calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py) | [High ⓘ](## "This file contains the implementation of the Calculator class, specifically the `divide` method which raises the ValueError when dividing by zero, matching the bug report.") | [29-32](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py#L29-32) | - - #### Related Webpages + | modelcontextprotocol/python-sdk | [test_calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py) | [High ⓘ](## "This file contains the test cases for the Calculator class, including a test that specifically asserts a ValueError is raised for division by zero, confirming the current intended behavior.") | [25-27](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py#L25-L27) | + | modelcontextprotocol/python-sdk | [calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py) | [High ⓘ](## "This file contains the implementation of the Calculator class, specifically the `divide` method which raises the ValueError when dividing by zero, matching the bug report.") | [29-32](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py#L29-L32) | +
+
+ Related Webpages | Name | URL | Confidence | | --- | --- | --- | | Handling Division by Zero Best Practices | https://my-blog-about-division-by-zero.com/handling+division+by+zero+in+calculator | [High ⓘ](## "This webpage provides general best practices for handling division by zero in calculator applications and in Python, which is directly relevant to the issue and potential solutions.") | - - IMPORTANT: You will not make branches or pull requests. Your ONLY action will be investigating the issue, locating related issues, - pull requests, and files in the repository and reporting your findings. - +
+ PROMPT_END EOF From 11e88161be825dc5e72471c44a8e7706b7ffeb24 Mon Sep 17 00:00:00 2001 From: William Easton Date: Thu, 2 Oct 2025 13:27:28 -0500 Subject: [PATCH 2/3] Prompt updates --- .github/workflows/martian-issue-triage.yml | 49 +++++++++++++--------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/.github/workflows/martian-issue-triage.yml b/.github/workflows/martian-issue-triage.yml index 9cc170f06..b7166677e 100644 --- a/.github/workflows/martian-issue-triage.yml +++ b/.github/workflows/martian-issue-triage.yml @@ -49,16 +49,19 @@ jobs: PROMPT< and tags. You shouldn't put everything in collapsible sections, especially if the response is short. Use your discretion to determine when to use collapsible sections to avoid overwhelming the reader with too much detail -- think of them like an appendix that can be expanded if the reader is interested. # Example output for "Recommendation" part of the response - PR #654 already implements the requested feature but is incomplete. The Pull Request is not in a mergable state yet, the remaining work should be completed: 1) update the Calculator.divide method to utilize the new DivisionByZeroError or the safe_divide function, and 2) update the tests to ensure that the Calculator.divide method raises the new DivisionByZeroError when the divisor is 0. - + PR #654 already implements the requested feature but is incomplete. The Pull Request is not in a mergeable state yet, the remaining work should be completed: 1) update the Calculator.divide method to utilize the new DivisionByZeroError or the safe_divide function, and 2) update the tests to ensure that the Calculator.divide method raises the new DivisionByZeroError when the divisor is 0. +
Findings ...details from the code analysis that are relevant to the issue and the recommendation... @@ -88,28 +99,28 @@ jobs:
Related Issues and Pull Requests - | Repository | Issue or PR | Title | Confidence | - | --- | --- | --- | --- | - | jlowin/fastmcp | [Add matrix operations support](https://github.com/jlowin/fastmcp/pull/680) | Add matrix operations support | [High ⓘ](## "This pull request directly addresses the feature request for adding matrix operations to the calculator.") | - | jlowin/fastmcp | [Add matrix operations support](https://github.com/jlowin/fastmcp/issues/681) | Add matrix operations support | [High ⓘ](## "This issue directly addresses the feature request for adding matrix operations to the calculator.") | + | Repository | Issue or PR | Relevance | + | --- | --- | --- | + | jlowin/fastmcp | [Add matrix operations support](https://github.com/jlowin/fastmcp/pull/680) | This pull request directly addresses the feature request for adding matrix operations to the calculator. | + | jlowin/fastmcp | [Add matrix operations support](https://github.com/jlowin/fastmcp/issues/681) | This issue directly addresses the feature request for adding matrix operations to the calculator. |
Related Files - | Repository | File | Confidence | Sections | + | Repository | File | Relevance | Sections | | --- | --- | --- | --- | - | modelcontextprotocol/python-sdk | [test_calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py) | [High ⓘ](## "This file contains the test cases for the Calculator class, including a test that specifically asserts a ValueError is raised for division by zero, confirming the current intended behavior.") | [25-27](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py#L25-L27) | - | modelcontextprotocol/python-sdk | [calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py) | [High ⓘ](## "This file contains the implementation of the Calculator class, specifically the `divide` method which raises the ValueError when dividing by zero, matching the bug report.") | [29-32](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py#L29-L32) | + | modelcontextprotocol/python-sdk | [test_calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py) | This file contains the test cases for the Calculator class, including a test that specifically asserts a ValueError is raised for division by zero, confirming the current intended behavior. | [25-27](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py#L25-L27) | + | modelcontextprotocol/python-sdk | [calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py) | This file contains the implementation of the Calculator class, specifically the `divide` method which raises the ValueError when dividing by zero, matching the bug report. | [29-32](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py#L29-L32) |
Related Webpages - | Name | URL | Confidence | + | Name | URL | Relevance | | --- | --- | --- | - | Handling Division by Zero Best Practices | https://my-blog-about-division-by-zero.com/handling+division+by+zero+in+calculator | [High ⓘ](## "This webpage provides general best practices for handling division by zero in calculator applications and in Python, which is directly relevant to the issue and potential solutions.") | + | Handling Division by Zero Best Practices | https://my-blog-about-division-by-zero.com/handling+division+by+zero+in+calculator | This webpage provides general best practices for handling division by zero in calculator applications and in Python, which is directly relevant to the issue and potential solutions. |
- + PROMPT_END EOF From 293455ee00331ecf6ab9e0e9f792d61bc0dde765 Mon Sep 17 00:00:00 2001 From: William Easton Date: Fri, 3 Oct 2025 14:57:07 -0500 Subject: [PATCH 3/3] Fixes for Marvin and Martian prompts --- .github/workflows/martian-issue-triage.yml | 18 +++++------------- .github/workflows/marvin-dedupe-issues.yml | 2 +- .github/workflows/marvin-label-triage.yml | 1 - 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/martian-issue-triage.yml b/.github/workflows/martian-issue-triage.yml index b7166677e..b6e01135d 100644 --- a/.github/workflows/martian-issue-triage.yml +++ b/.github/workflows/martian-issue-triage.yml @@ -22,18 +22,9 @@ jobs: id-token: write steps: - - name: Checkout base repository - uses: actions/checkout@v5 - with: - repository: ${{ github.repository }} - ref: ${{ github.event.repository.default_branch }} - # Install UV package manager - name: Install UV uses: astral-sh/setup-uv@v6 - with: - enable-cache: true - cache-dependency-glob: "uv.lock" - name: Generate Marvin App token id: marvin-token @@ -54,12 +45,13 @@ jobs: pull requests, and files in the repository and reporting your findings. 2. You will identify the issue type (bug/feature/question) up front and tailor the Recommendation (e.g., for questions: answer directly + links; for bugs: point to failing tests/lines). 3. You will avoid speculation and only assert facts that are deeply rooted (traceable) to the codebase, language/framework conventions, related issues, related pull requests, etc. + 4. The repository has not been cloned locally, there are no files on the local system for you to read, grep, edit, etc. You will use the available MCP Server tools to read files (get_files), search the codebase (search_code is ripgrep!), and identify related issues and pull requests (search_issues and search_pull_requests) just like you would if the repository was cloned locally. # Getting Started 1. Call the generate_agents_md tool to get a high-level summary of the project you're working in 2. Get the issue ${{ github.event.issue.number }} in the GitHub repository: ${{ github.repository }}. - 3. Use the issue and pull request search tools to scour the repository for actually related issues and pull requests - 4. Call the code-search, get_files, etc. tools to search the repository to identify the related classes, methods, docs, tests, etc that are relevant to the issue. + 3. Use the search_issues and search_pull_requests tools to scour the repository for actually related issues and pull requests + 4. Call the search_code, get_files, etc. tools to search the repository to identify the related classes, methods, docs, tests, etc that are relevant to the issue. # Providing a Great Response Your number one priority is to provide a great response to the issue. A great response is a response that is clear, concise, accurate, and actionable. You will avoid long paragraphs, flowery language, and overly verbose responses. Your readers have limited time and attention, so you will be concise and to the point. @@ -136,7 +128,7 @@ jobs: }, "code-search": { "type": "http", - "url": "https://github-code-search.fastmcp.app/mcp" + "url": "https://public-code-search.fastmcp.app/mcp" }, "github-research": { "type": "stdio", @@ -163,7 +155,7 @@ jobs: track_progress: true claude_args: | --model claude-sonnet-4-5-20250929 - --allowedTools mcp__repository-summary,mcp__code-search__search_code,mcp__github-research__get_repository,mcp__github-research__get_issue,mcp__github-research__get_pull_request,mcp__github-research__search_issues,mcp__github-research__search_pull_requests,mcp__github-research__get_files, + --allowedTools mcp__repository-summary,mcp__code-search__search_code,mcp__github-research__get_repository,mcp__github-research__get_issue,mcp__github-research__get_pull_request,mcp__github-research__search_issues,mcp__github-research__search_pull_requests,mcp__github-research__get_files --mcp-config /tmp/mcp-config/mcp-servers.json settings: | { diff --git a/.github/workflows/marvin-dedupe-issues.yml b/.github/workflows/marvin-dedupe-issues.yml index 3da916bf2..aaa8987c9 100644 --- a/.github/workflows/marvin-dedupe-issues.yml +++ b/.github/workflows/marvin-dedupe-issues.yml @@ -1,5 +1,5 @@ name: Marvin Issue Dedupe -description: Automatically dedupe GitHub issues using Marvin +# description: Automatically dedupe GitHub issues using Marvin on: issues: types: [opened] diff --git a/.github/workflows/marvin-label-triage.yml b/.github/workflows/marvin-label-triage.yml index 64d91eada..11a4c6625 100644 --- a/.github/workflows/marvin-label-triage.yml +++ b/.github/workflows/marvin-label-triage.yml @@ -134,7 +134,6 @@ jobs: allowed_non_write_users: "*" # Required for issue triage workflow, if users without repo write access create issues claude_args: | --allowedTools Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__get_pull_request_files - --mcp-config /tmp/mcp-config/mcp-servers.json settings: | { "model": "claude-sonnet-4-5-20250929",