Repository navigation
Linter Miner: have discussion-miner read GitHub through the github bridge instead of gh - #73871
Conversation
…MCP CLI bridge Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
github bridge instead of gh
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Review summary
Two non-blocking correctness/operability concerns were identified and commented inline. The new bridge examples may omit closed issues depending on the documented default, and discussion hydration has no explicit budget for high-volume windows. No critical or high-severity blocker was found in the changed lines.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again
There was a problem hiding this comment.
🔵 Needs a closer look
The required fixed-branch run remains unvalidated for discussion-miner’s own GitHub reads and downstream progress, while existing evidence predates the fix and proves only parent bridge access.
No open issues 🎉
What changed in this PR
Updates Linter Miner’s discussion-miner sub-agent to use the configured github CLI bridge instead of unauthenticated gh, addressing the access failure described in #73870.
Changes:
- Requires tool discovery through
--help, repository-scoped queries, pagination, and reading supporting evidence. - Preserves the 14-day window, 30-day fallback, five-candidate limit, and main-agent
nooprule; explicitly prohibits invented candidates. - Refreshes generated prompt and admission hashes without changing workflow configuration.
Successful GitHub access from the sub-agent still requires authorized runtime validation.
| File | Description |
|---|---|
.github/workflows/linter-miner.md |
Replaces gh instructions with bridge discovery, querying, and error-handling guidance. |
.github/workflows/linter-miner.lock.yml |
Updates body and admission hashes to match the revised prompt. |
Review effort: Balanced (auto)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs to the discussion-miner prompt change. Requesting changes on scope, budget, and output-contract gaps.
📋 Key Themes & Highlights
Key Themes
- Scope drift: the
list_issuescall drops the oldgh issue list --state all, so closed issues may be skipped while the PR says the window is unchanged. - Unbounded reads: pagination and per-discussion comment reads have no budget, which risks the engine-step timeout pattern in #66819.
- Output contract: the error-reporting sentence sits next to a JSON array the main agent parses.
- Unresolved security alert: the existing code-scanning comment on line 209 (prompt injection from issue and discussion bodies) still applies. This change makes the sub-agent read more untrusted content, so it should be addressed in this PR, for example with an explicit rule to treat fetched text as data, not instructions.
Positive Highlights
- ✅ Forbidding
ghandGH_TOKENand requiring--helpbefore calls is a clear, testable fix. - ✅ "Never invent candidates" tightens grounding.
- ✅ The lock change is limited to the prompt hash, as the PR states.
@copilot please address the inline comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt to run again
…ean [] JSON block Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Findings addressed: the read budget and clean [] output are fixed in 1147b57; the list_issues state/since point doesn't apply (the upstream github-mcp-server schema returns open and closed issues by default and supports since); prompt injection is pre-existing and answered in the thread.
|
🎉 This pull request is included in a new release. Release: |
The
discussion-minersub-agent was told to query GitHub withgh, which isn't logged in inside the sandbox. In the routed runs, bothgh issue listandgh api graphqlfailed authentication, the sub-agent returned[], and the main agent correctly ended withnoop. The workflow already configures the GitHub MCP server, which the agent reaches through agithubcommand onPATH. The main agent uses that command successfully; this PR points the sub-agent at it too.Changes (
## agent: discussion-minersection only)githubcommand from bash. It is told not to usegh, not to set or ask for aGH_TOKEN, and not to assume a built-in GitHub tool call exists.github --helpandgithub <tool> --helpbefore querying, and uses only the parameters that help shows. If a call fails, it corrects the arguments from--helpinstead of switching togh.mcp-logs/tools.jsoncited in the issue):search_issues,list_issues,list_discussions,get_discussion,get_discussion_comments, all scoped togithub/gh-aw. It follows pagination until the window is covered, filters discussions bycreatedAt, and reads bodies and comments before citing an item.name/description/sourceoutput format, and the limit of 5 candidates.[]and state the error. The main agent'snooprule is untouched.Generated file
linter-miner.lock.yml: only the prompt hash changes (in the metadata header andGH_AW_ADMISSION_WORKFLOW_HASH), because the prompt text is loaded when the workflow runs.Notes for review
github --helpoutput in the sandbox. That is why the prompt makes--helpthe first step.discussion-minercan actually read GitHub this way (acceptance cases 1 and 2) still needs the authorized dispatch of this branch.code-pattern-scanner,linter-writer, or the protected-file fallback.