Skip to content

Fix Copilot setup bootstrap ordering and checkout permissions#66

Merged
L03TJ3 merged 1 commit into
mainfrom
copilot/fix-copilot-actions-failure
Jun 24, 2026
Merged

Fix Copilot setup bootstrap ordering and checkout permissions#66
L03TJ3 merged 1 commit into
mainfrom
copilot/fix-copilot-actions-failure

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The Copilot Actions job was bootstrapping the environment in the wrong order: pnpm install ran before the repository existed in the agent workspace. The failure also exposed a separate auth issue: the session token presented as GITHUB_TOKEN was invalid, surfacing as the job's authorization error.

  • Bootstrap ordering

    • Move repository checkout to the first setup step so all workspace-aware commands run against an actual clone.
    • Initialize Node before package-manager work to keep the bootstrap deterministic.
  • Workflow permissions

    • Add explicit contents: read permissions required by actions/checkout in the Copilot setup job.
  • Dependency install behavior

    • Keep the setup aligned with the committed lockfile via pnpm install --frozen-lockfile.
    • Continue building workspace packages during setup so the agent lands in a ready-to-use state.
  • Workflow operability

    • Add standard triggers for setup-workflow validation so changes to the bootstrap can be exercised directly outside of a Copilot session.
  • Auth signal surfaced

    • The authorization failure is not caused by the workflow YAML itself.
    • The exact missing/expired credential surfaced by the run is an invalid GITHUB_TOKEN.
permissions:
  contents: read

steps:
  - uses: actions/checkout@v5
  - uses: actions/setup-node@v4
    with:
      node-version: '20'
      cache: pnpm
  - run: corepack enable && corepack prepare pnpm@9.15.0 --activate
  - run: pnpm install --frozen-lockfile

Copilot AI changed the title Fix copilot setup workflow bootstrap ordering Fix Copilot setup bootstrap ordering and checkout permissions Jun 24, 2026
Copilot AI requested a review from L03TJ3 June 24, 2026 15:17
@L03TJ3

L03TJ3 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@copilot what is using or requesting GITHUB_TOKEN.
As far as I know the only token for github connectivity in copilot would be the secret for using the github MCP?

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@copilot what is using or requesting GITHUB_TOKEN.
As far as I know the only token for github connectivity in copilot would be the secret for using the github MCP?

It’s the GitHub Actions job runtime itself, not the MCP secret.

GITHUB_TOKEN is automatically provisioned by GitHub Actions for each job, and actions can read it via the github.token context even if the workflow never declares it explicitly. In this workflow, actions/checkout uses that job token under the hood, and any gh / GitHub API call in the runner would also typically use it.

So the auth failure I surfaced was: the Copilot/Actions job environment had an invalid job-scoped GITHUB_TOKEN. That is separate from the GitHub MCP connectivity secret used by the coding agent tools in this session.

@L03TJ3 L03TJ3 marked this pull request as ready for review June 24, 2026 15:27
@L03TJ3 L03TJ3 requested a review from a team June 24, 2026 15:27
@L03TJ3 L03TJ3 merged commit 5d1f82f into main Jun 24, 2026
1 of 4 checks passed
L03TJ3 added a commit that referenced this pull request Jun 24, 2026
@L03TJ3 L03TJ3 mentioned this pull request Jun 24, 2026
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