Skip to content

fix(smoke-copilot): revert agent job to read-only perms to unblock CI - #6369

Merged
lpcox merged 1 commit into
mainfrom
fix-smoke-copilot-agent-perms
Jul 18, 2026
Merged

fix(smoke-copilot): revert agent job to read-only perms to unblock CI#6369
lpcox merged 1 commit into
mainfrom
fix-smoke-copilot-agent-perms

Conversation

@lpcox

@lpcox lpcox commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Smoke Copilot activation check (Check workflow lock file) is failing on every open PR — including unrelated ones like #6362 that never touch smoke-copilot — with:

ERR_CONFIG: Lock file '.github/workflows/smoke-copilot.lock.yml' is outdated!
The workflow file '.github/workflows/smoke-copilot.md' frontmatter has changed.

Root cause

PR #6366 changed the smoke-copilot agent job permissions to issues: write / pull-requests: write. However, the gh-aw compiler (v0.82.13) forbids write permissions on the agent job — writes must go through safe-outputs, which uses a scoped GitHub App token.

Because the write-perm .md cannot be compiled, its lock file's frontmatter_hash was never regenerated and stayed at the read-perm value (008d5a5c…), while the .md advertised write perms (hash 81338ace…). Since PR CI builds the branch merged with main, every PR inherits main's write-perm .md against the read-perm lock hash and fails the activation check.

Fix

Revert issues / pull-requests to read (safe-outputs already handles the comment/label writes via its scoped token) and recompile so .md and .lock.yml are consistent again (frontmatter_hash: 008d5a5c…).

This unblocks CI across all open PRs.

Verification

  • gh aw compile smoke-copilot → 0 errors (v0.82.13)
  • .md frontmatter hash now matches the committed lock (008d5a5c…)
  • npm test → 244 suites / 3851 tests pass

Scope

Only two files change: smoke-copilot.md and smoke-copilot.lock.yml.

PR #6366 changed the smoke-copilot agent job to issues:write /
pull-requests:write, but the gh-aw compiler (v0.82.13) forbids write
permissions on the agent job — writes must flow through safe-outputs'
scoped app token. As a result the lock file's frontmatter_hash could
not be regenerated and stayed at the read-perm value (008d5a5c), while
the .md advertised write perms.

This mismatch made the 'Check workflow lock file' activation step fail
on every open PR (CI builds the branch merged with main), e.g. #6362,
even for PRs that never touched smoke-copilot.

Revert issues/pull-requests to read (safe-outputs already handles the
comment/label writes) and recompile so .md and lock are consistent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 23717692-af7a-4e03-a156-5b696c3f01bd
Copilot AI review requested due to automatic review settings July 18, 2026 15:47

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

Restores compiler-compatible read permissions for the Smoke Copilot agent job and synchronizes its generated workflow lock.

Changes:

  • Reverts agent issue and pull-request permissions to read-only.
  • Updates the compiled lock workflow accordingly.
  • Preserves write permissions for safe-output jobs.
Show a summary per file
File Description
.github/workflows/smoke-copilot.md Restores read-only agent permissions.
.github/workflows/smoke-copilot.lock.yml Synchronizes compiled agent permissions and metadata.

Review details

Tip

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

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 98.64% 98.68% 📈 +0.04%
Statements 98.46% 98.49% 📈 +0.03%
Functions 99.24% 99.24% ➡️ +0.00%
Branches 94.55% 94.55% ➡️ +0.00%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@lpcox
lpcox merged commit 98ea5b7 into main Jul 18, 2026
24 of 25 checks passed
@lpcox
lpcox deleted the fix-smoke-copilot-agent-perms branch July 18, 2026 15:51
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.

2 participants