3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-26 17:02:38 +00:00

Fix Code Simplifier agent authentication in GitHub Actions (#10222)

The `Code Simplifier` workflow’s `agent` job was failing before any
analysis ran because Copilot requests were not authorized in the
workflow context. The generated lock workflow therefore executed against
a stale auth model and consistently hit `HTTP 401` during agent startup.

- **Root cause**
- The workflow frontmatter did not grant `copilot-requests: write`,
which is required for Copilot-backed agent execution in Actions.

- **Workflow change**
- Added `copilot-requests: write` to
`.github/workflows/code-simplifier.md`.

- **Generated workflow update**
- Recompiled `code-simplifier.lock.yml` so the executable workflow
matches the new permission model.
- This updates the Copilot invocation path from the old secret-based
flow to the GitHub Actions token-based flow used by current gh-aw
compilation.

- **Effective delta**
  ```yaml
  permissions:
    contents: read
    issues: read
    pull-requests: read
    copilot-requests: write
  ```

- **Lockfile effect**
  ```yaml
  # before
  COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}

  # after
  COPILOT_GITHUB_TOKEN: ${{ github.token }}
  S2STOKENS: true
  ```

This keeps the change scoped to the failing workflow while aligning the
checked-in lock file with the auth mechanism expected by the current
Agentic Workflows toolchain.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot 2026-07-24 19:29:54 -07:00 committed by GitHub
parent 538d419978
commit 19cac831b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 130 additions and 127 deletions

File diff suppressed because one or more lines are too long

View file

@ -9,6 +9,7 @@ permissions:
contents: read
issues: read
pull-requests: read
copilot-requests: write
tracker-id: code-simplifier