Skip to content

Code Simplifier: allow required validation commands in sandbox tool permissions#36573

Merged
pelikhan merged 2 commits into
mainfrom
copilot/aw-code-simplifier-fix
Jun 3, 2026
Merged

Code Simplifier: allow required validation commands in sandbox tool permissions#36573
pelikhan merged 2 commits into
mainfrom
copilot/aw-code-simplifier-fix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2026

Code Simplifier failed because its prompt requires local validation commands that were not in the workflow bash allowlist, causing repeated tool/permission denials and wasted token budget. This change aligns declared permissions with the workflow’s intended command surface.

  • Problem alignment

    • Code Simplifier instructs the agent to run make test-unit, make lint, and make build, but those commands were blocked by tool permissions in runtime.
  • Workflow source update (.github/workflows/code-simplifier.md)

    • Expanded tools.bash allowlist to include required validation/build commands:
      • make test-unit
      • make lint
      • make build
      • make fmt
      • go build ./...
  • Compiled manifest update (.github/workflows/code-simplifier.lock.yml)

    • Regenerated lockfile so emitted --allow-tool 'shell(...)' entries match the updated source workflow and runtime permissions.
tools:
  bash:
    - "cat /tmp/gh-aw/code-simplifier/recent-context.json"
    - "cat /tmp/gh-aw/code-simplifier/source-files.json"
    - "cat /tmp/gh-aw/code-simplifier/recent-prs.json"
    - "cat /tmp/gh-aw/code-simplifier/recent-commits.jsonl"
    - "cat /tmp/gh-aw/code-simplifier/history-summary.json"
    - "ls /tmp/gh-aw/code-simplifier"
    - "make test-unit"
    - "make lint"
    - "make build"
    - "make fmt"
    - "go build ./..."

Copilot AI linked an issue Jun 3, 2026 that may be closed by this pull request
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix effective token budget exhaustion in Code Simplifier Code Simplifier: allow required validation commands in sandbox tool permissions Jun 3, 2026
Copilot AI requested a review from pelikhan June 3, 2026 05:22
@pelikhan pelikhan marked this pull request as ready for review June 3, 2026 05:49
Copilot AI review requested due to automatic review settings June 3, 2026 05:49
@pelikhan pelikhan merged commit 4208aea into main Jun 3, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/aw-code-simplifier-fix branch June 3, 2026 05:50
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

This PR updates the Code Simplifier agent workflow permissions so the sandboxed shell tool can run the same local validation commands the workflow prompt asks the agent to execute, avoiding repeated tool/permission denials during runs.

Changes:

  • Expanded the tools.bash allowlist in .github/workflows/code-simplifier.md to permit additional make/go validation commands.
  • Regenerated .github/workflows/code-simplifier.lock.yml so the compiled --allow-tool shell(...) entries match the updated allowlist.
Show a summary per file
File Description
.github/workflows/code-simplifier.md Adds make/go commands to the bash allowlist for agent-side validation.
.github/workflows/code-simplifier.lock.yml Updates the compiled workflow manifest to include the newly allowed shell commands.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment on lines +45 to +49
- "make test-unit"
- "make lint"
- "make build"
- "make fmt"
- "go build ./..."
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] Code Simplifier failed

3 participants