Skip to content

fix(linter-miner): add go build/test to bash allowlist and harden error handling#32283

Merged
pelikhan merged 4 commits into
mainfrom
copilot/fix-linter-miner-failure
May 15, 2026
Merged

fix(linter-miner): add go build/test to bash allowlist and harden error handling#32283
pelikhan merged 4 commits into
mainfrom
copilot/fix-linter-miner-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

Bug Fix

What was the bug?

The Linter Miner consumed 63.5M tokens over 15 minutes and exited without calling any safe output. The root cause was that go build was absent from the bash allowlist, so the agent could never verify compilation after writing linter files. The original command also used cd $GITHUB_WORKSPACE && go build ./cmd/linters — a compound shell expression that wouldn't have matched a go build:* pattern even after adding one.

How did you fix it?

  • linter-miner.md — bash allowlist: added go build:* and go test:*

    bash:
      - ...existing entries...
      - "go build:*"
      - "go test:*"
  • Compilation verification command: simplified to go build ./cmd/linters (the cd … && prefix would have bypassed the new allowlist pattern)

  • Error handling guidance: if compilation still fails after two separate fix attempts, the sub-agent now calls report_incomplete rather than silently exhausting its context

  • Safety-net guideline: explicitly instructs the agent to always call create_pull_request or noop before finishing — never exit without a safe output

  • linter-miner.lock.yml: recompiled; now includes --allow-tool 'shell(go build:*)' and --allow-tool 'shell(go test:*)'

Copilot AI linked an issue May 15, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits May 15, 2026 05:07
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…or handling

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Linter Miner workflow failure fix(linter-miner): add go build/test to bash allowlist and harden error handling May 15, 2026
Copilot AI requested a review from pelikhan May 15, 2026 05:11
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot allow go in firewall

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 15, 2026

@copilot allow go in firewall

Done — added network: allowed: [defaults, go] to linter-miner.md and recompiled. The lock file now allows golang.org, proxy.golang.org, sum.golang.org, go.dev, pkg.go.dev, and goproxy.io through the firewall.

@pelikhan pelikhan marked this pull request as ready for review May 15, 2026 05:21
Copilot AI review requested due to automatic review settings May 15, 2026 05:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a Linter Miner agent failure mode where it could exhaust its context without producing a safe output. The root cause was that go build wasn't in the bash allowlist, so compilation verification always failed. Adds the missing allowlist entries, simplifies the verification command to match the new pattern, and adds explicit guidance for the agent to always finish with a safe output.

Changes:

  • Adds go build:* and go test:* to the bash allowlist, plus the go network domain group
  • Simplifies the compile-verification command (drops the cd $GITHUB_WORKSPACE && prefix that would have bypassed the new allowlist pattern)
  • Adds prompt guidance to call report_incomplete/noop/create_pull_request rather than ending with no safe output
Show a summary per file
File Description
.github/workflows/linter-miner.md Adds go build/test to bash allowlist, opens go network egress, simplifies build command, and adds safe-output exit guidance.
.github/workflows/linter-miner.lock.yml Recompiled lock file reflecting the source changes (also picks up unrelated compiler-version-driven updates).
.github/workflows/daily-geo-optimizer.lock.yml Unrelated minor regeneration of a different workflow's lock file (uses env var for repository in geo audit).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@pelikhan pelikhan merged commit 24dd2b3 into main May 15, 2026
4 checks passed
@pelikhan pelikhan deleted the copilot/fix-linter-miner-failure branch May 15, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Linter Miner failed

3 participants