Skip to content

Remediate targeted custom-linter findings - #51942

Merged
pelikhan merged 5 commits into
mainfrom
copilot/lint-monster-remediate-findings
Aug 11, 2026
Merged

Remediate targeted custom-linter findings#51942
pelikhan merged 5 commits into
mainfrom
copilot/lint-monster-remediate-findings

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Two targeted custom-linter findings flagged an oversized inline-section parser helper and a hard-coded GitHub CLI path.

  • Parser

    • Extract end-marker matching from extractInlineSections into a focused helper.
    • Preserve marker selection and consumption behavior.
  • MCP gateway

    • Replace the "/usr/bin/gh" literal with the named mcpGatewayGitHubCLIPath constant.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 29.8 AIC · ⌖ 5.18 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remediate targeted non-backlog custom-linter findings Remediate targeted custom-linter findings Aug 11, 2026
Copilot AI requested a review from pelikhan August 11, 2026 05:30
@github-actions

Copy link
Copy Markdown
Contributor

Triage: Remediate targeted custom-linter findings

  • Category: chore (lint remediation)
  • Risk: low (2 files, +15/-11, small helper extraction + named constant swap)
  • Score: 24/100 (impact 8, urgency 6, quality 10)
  • Recommended action: defer

Notes: Draft PR, no CI run yet, no reviews. Small and low-risk but not ready — needs to be marked ready for review and CI to run before it can be fast-tracked or auto-merged.

Generated by 🔧 PR Triage Agent · auto · 25.5 AIC · ⌖ 2.31 AIC · ⊞ 7.8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 11, 2026 12:21
Copilot AI balanced review requested due to automatic review settings August 11, 2026 12:21
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.individual.githubcopilot.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.individual.githubcopilot.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #51942

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel skipped. Changes are production-only (pkg/parser/inline_section_helpers.go, pkg/workflow/mcp_setup_gateway.go).

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #51942 does not have the 'implementation' label and has only 15 new lines of code in business logic directories (threshold: 100).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resolves the two targeted custom-linter findings while preserving existing behavior.

Changes:

  • Extracts inline-section end-marker matching into a focused helper.
  • Replaces the hard-coded GitHub CLI path with a named constant.
Show a summary per file
File Description
pkg/parser/inline_section_helpers.go Extracts end-marker matching logic.
pkg/workflow/mcp_setup_gateway.go Defines and uses the GitHub CLI path constant.

Review details

Tip

Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two clean linter remediations with no behavior change: matchInlineSectionEndMarker extracts an inline loop with identical semantics, and mcpGatewayGitHubCLIPath constant replaces the magic string /usr/bin/gh. No security, correctness, or reliability concerns.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 17.8 AIC · ⌖ 6.2 AIC · ⊞ 5.4K

@github-actions github-actions Bot mentioned this pull request Aug 11, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design — requesting one change.

📋 Key Themes & Highlights

Key Themes

  • Duplicated path literal: mcpGatewayGitHubCLIPath = "/usr/bin/gh" is a new file-local constant that re-declares the same path already embedded in constants.DefaultGhBinaryMount. Both now need updating if the gh binary path ever changes.

Positive Highlights

  • matchInlineSectionEndMarker is a clean, well-scoped extraction — good single-responsibility refactor.
  • ✅ The usedEnd mutation side-effect is preserved correctly across the refactor.
  • ✅ Naming is clear and consistent with the existing inlineSectionEndMarker type.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 29.1 AIC · ⌖ 7 AIC · ⊞ 7.1K
Comment /matt to run again

Comment thread pkg/workflow/mcp_setup_gateway.go Outdated
const mcpGatewayCustomEnvNamesVar = "GH_AW_MCP_GATEWAY_CUSTOM_ENV_NAMES"
const mcpGatewayCustomEnvTransportPrefix = "GH_AW_MCP_GATEWAY_ENV_"
const mcpGatewayCustomEnvMarker = "__GH_AW_MCP_GATEWAY_CUSTOM_ENV__"
const mcpGatewayGitHubCLIPath = "/usr/bin/gh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] The new constant mcpGatewayGitHubCLIPath = "/usr/bin/gh" duplicates a path literal that already lives in pkg/constants as part of DefaultGhBinaryMount = "/usr/bin/gh:/usr/bin/gh:ro". A future path change must now be updated in two places.

💡 Suggested fix

Add a GhCLIPath constant in pkg/constants and derive DefaultGhBinaryMount from it:

const GhCLIPath = "/usr/bin/gh"
const DefaultGhBinaryMount = GhCLIPath + ":" + GhCLIPath + ":ro"

Then use constants.GhCLIPath here and drop the local constant.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Centralized the path as constants.GhCLIPath, derive DefaultGhBinaryMount from it, and use it in the gateway allowlist (369d04e).

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: N/A — No Tests Modified

No test files were added or modified in this PR. Changes are production-only.

📊 Analysis Summary
Item Result
Test files added 0
Test files modified 0
Production files changed 2
Go test files None
JavaScript test files None
Go TestMain entries 0
goleak.VerifyTestMain entries 0
🚨 Violations 0

Files changed:

  • pkg/parser/inline_section_helpers.go (+13/-10)
  • pkg/workflow/mcp_setup_gateway.go (+2/-1)

Verdict

passed. No test quality concerns. This PR contains only production code changes.

🧪 Test quality analysis by Test Quality Sentinel · haiku45 · 21.8 AIC · ⌖ 3.69 AIC · ⊞ 7.6K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Test Quality Sentinel: N/A — No test files were modified. Production-only changes (pkg/parser/inline_section_helpers.go, pkg/workflow/mcp_setup_gateway.go). No violations.

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: chore | Risk: medium | Score: 44/100 (impact 18, urgency 10, quality 16)
  • Action: batch_review (batch: linter-improvements)
  • CI green overall but mixed reviews: one CHANGES_REQUESTED alongside an APPROVED. Small targeted fix (15+/11-). Resolve requested changes before merge.

Generated by 🔧 PR Triage Agent · auto · 38.6 AIC · ⌖ 2.76 AIC · ⊞ 7.8K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

No failed checks were reported in the compact candidate set for this run.
Branch update was requested by sous-chef in run https://github.com/github/gh-aw/actions/runs/31493845883.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 29.8 AIC · ⌖ 5.18 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Copilot AI and others added 2 commits August 11, 2026 13:26
…remediate-findings

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please refresh this branch, verify checks, and use the pr-finisher skill before handing back.

No failed checks were reported in the compact candidate set for this run....

Refreshed the branch with current main and completed validation. The remaining review feedback is addressed in 369d04e.

Copilot AI requested a review from gh-aw-bot August 11, 2026 13:38
@pelikhan
pelikhan merged commit a382e9b into main Aug 11, 2026
27 checks passed
@pelikhan
pelikhan deleted the copilot/lint-monster-remediate-findings branch August 11, 2026 14:05
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[lint-monster] remediate targeted non-backlog custom-linter findings

4 participants