Search before asking
What happened
In v1.0.3-beta12 the second phase of github_graphql Collect Issues (the stale-local-issue cleanup added in #8820) aborts the subtask with Field 'requestedIssues' doesn't exist on type 'Query':
[Collect Issues] ended Graphql collector execution with error
Wraps: (2) Field 'requestedIssues' doesn't exist on type 'Query'
Error types: (1) *hintdetail.withDetail (2) graphql.DataError
The unexported requestedIssues field added to GraphqlQueryIssueDetailWrapper in #8820 (issue_collector.go L54-L62) is intended as Go-side per-request metadata — populated before the request (L198) and read in the response callback (L221, L231) to detect issues that disappeared upstream. The merico-ai/graphql marshaller appears not to skip unexported fields, so requestedIssues is emitted as a top-level selection on Query and GitHub rejects it.
What do you expect to happen
Collect Issues completes both phases when _tool_github_issues already has rows.
How to reproduce
Collect Data once so _tool_github_issues has rows for the scope.
Collect Data again — phase 2 fails on the first request.
A scope with an empty _tool_github_issues skips phase 2 and does not surface the bug.
Anything else
The right fix is to move requestedIssues out of GraphqlQueryIssueDetailWrapper and keep it on the closure or on GithubTaskData. merico-ai/graphql's writeQuery (query.go L111-L173) does not special-case graphql:"-" (the tag value would just be rendered as the field name -) and does not skip unexported fields, so there is no struct-tag-only escape hatch on the wrapper as written.
Version
v1.0.3-beta12
Are you willing to submit PR?
Code of Conduct
Search before asking
What happened
In
v1.0.3-beta12the second phase ofgithub_graphqlCollect Issues(the stale-local-issue cleanup added in #8820) aborts the subtask withField 'requestedIssues' doesn't exist on type 'Query':The unexported
requestedIssuesfield added toGraphqlQueryIssueDetailWrapperin #8820 (issue_collector.goL54-L62) is intended as Go-side per-request metadata — populated before the request (L198) and read in the response callback (L221, L231) to detect issues that disappeared upstream. Themerico-ai/graphqlmarshaller appears not to skip unexported fields, sorequestedIssuesis emitted as a top-level selection onQueryand GitHub rejects it.What do you expect to happen
Collect Issuescompletes both phases when_tool_github_issuesalready has rows.How to reproduce
Collect Dataonce so_tool_github_issueshas rows for the scope.Collect Dataagain — phase 2 fails on the first request.A scope with an empty
_tool_github_issuesskips phase 2 and does not surface the bug.Anything else
The right fix is to move
requestedIssuesout ofGraphqlQueryIssueDetailWrapperand keep it on the closure or onGithubTaskData.merico-ai/graphql'swriteQuery(query.goL111-L173) does not special-casegraphql:"-"(the tag value would just be rendered as the field name-) and does not skip unexported fields, so there is no struct-tag-only escape hatch on the wrapper as written.Version
v1.0.3-beta12
Are you willing to submit PR?
Code of Conduct