| … | … | @@ -1005,6 +1009,23 @@ const t3Default = (sample: Sample, name: string, input: Readonly<Record<string, | |
| 1012 | + | case "link_pull_requests": { | |
| 1013 | + | const targets = (Array.isArray(input.urls) ? input.urls : []).map((url) => | |
| 1014 | + | pullRequest(sample.repo, { url }), | |
| 1015 | + | ); | |
🟢 Low mcp-tool-use/run.ts:1013
When input.urls contains the same URL more than once, this mock returns that pull request multiple times in linked (for example, numbers: [1, 1]), inflating the linked count. fresh is computed before any URLs are added to sample.linked, so deduplicate the URLs before mapping them, as the production handler does.
No longer relevant as of 402e96d9cfe727ff7c13ad4a0d3da3eddfb7584e
Note
Written by claude-opus-5-5 on behalf of Maria
Fixed in 402e96d9cf: the mock dedupes URLs before classifying them, like the handler.
| … | … | @@ -1005,6 +1009,23 @@ const t3Default = (sample: Sample, name: string, input: Readonly<Record<string, | |
| 1006 | 1010 | return { ...pr(), alreadyLinked }; | |
| 1007 | 1011 | } | |
| 1012 | + | case "link_pull_requests": { | |
| 1013 | + | const targets = (Array.isArray(input.urls) ? input.urls : []).map((url) => | |
🟢 Low mcp-tool-use/run.ts:1013
An issue URL such as https://github.com/acme/app/issues/301 is returned as a successful link with PR number 301 and added to sample.linked, instead of being reported in invalidUrls. pullRequest() does not validate that the URL targets a pull request, so filter invalid targets and return them in invalidUrls before mutating the set.
No longer relevant as of 402e96d9cfe727ff7c13ad4a0d3da3eddfb7584e
Note
Written by claude-opus-5-5 on behalf of Maria
Fixed in 402e96d9cf: the mock reports non-PR URLs in invalidUrls and never adds them to sample.linked. Prior-call seeding skips them too.