Skip to content

v1.x regression: pre_activation job loses permissions, skip-if-match 422s on private/internal repos #77519

Done

Description

@jansdhillon

Summary

Compiling the same workflow source with v0.89.21 and v1.2.2 produces different permissions for the pre_activation job that hosts the skip-if-match gate. v0.89.21 emits:

pre_activation:
  permissions:
    issues: write
    pull-requests: write

v1.2.2 emits no permissions block for the job. Because the compiled workflow sets top-level permissions: {}, the gate's GITHUB_TOKEN falls back to metadata-only, and the gate's /search/issues call fails with HTTP 422 ("The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them") on an internal repository, failing the whole run before the agent starts.

Environment

  • gh-aw v0.89.21 (working) vs v1.2.2 (broken), both compiled locally
  • Repository visibility: internal
  • Workflow: pull_request trigger with skip-if-match: 'is:issue is:open in:title "[airgap-guide-drift] "'

Reproduction

  1. Take any workflow using skip-if-match in a private or internal repository
  2. Compile with v0.89.21, then with v1.2.2
  3. Diff the pre_activation job in the two lock files: the v1.2.2 output has no permissions block
  4. A run of the v1.2.2 lock fails in pre_activation at the "Check skip-if-match query" step with the 422 above

Failing run: canonical/landscape-server run 43475910107 (pre_activation, "Metadata: read" token, 422 from /search/issues). Previously green run of the same gate compiled by v0.88.7: run 36045341424, whose lock grants pre_activation issues: write and pull-requests: write.

Expected

The gate job keeps at least issues: read (and whatever else its checks need), or the compiler rejects skip-if-match configurations it cannot grant, with a message naming the missing scope.

Actual

v1.2.2 silently compiles a gate whose token cannot perform the search; every run fails before the agent job, and the failure message points at the search API rather than the missing permission.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions