Skip to content

Fix integration tests: replace AW workflow with regular GHA workflow - #179

Merged
pelikhan merged 3 commits into
mainfrom
copilot/rig-integration-fix-authentication-failure
Jul 26, 2026
Merged

Fix integration tests: replace AW workflow with regular GHA workflow#179
pelikhan merged 3 commits into
mainfrom
copilot/rig-integration-fix-authentication-failure

Conversation

Copilot AI commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

The haiku.integration.test.ts integration tests were failing with AUTHENTICATION_FAILED because the AWF security model explicitly excludes COPILOT_GITHUB_TOKEN from the sandbox container. With COPILOT_SDK_URI visible (so tests ran) but no credentials reachable by child processes, all three tests failed every run.

Changes

  • Remove rig-integration.md + rig-integration.lock.yml: The agentic workflow approach is fundamentally incompatible with tests that spawn credentialed child processes — the AWF sandbox strips COPILOT_GITHUB_TOKEN before the bash environment, so spawned subprocesses can never authenticate to the local SDK server at port 3002.

  • Add rig-integration.yml — a regular GitHub Actions workflow that:

    • Passes COPILOT_GITHUB_TOKEN from repository secrets directly to the test environment
    • Tests automatically use --server (stdio) mode since COPILOT_SDK_URI is absent; the bundled @github/copilot CLI inherits the token and authenticates
    • Creates a GitHub issue on test failure (preserving the observability the AW provided)
    • Tests skip cleanly (exit 0) when no credentials are present, keeping local dev unaffected

The COPILOT_GITHUB_TOKEN secret is already configured in the repository (it appeared in the AW workflow manifest).

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix authentication error in integration tests Fix integration tests: replace AW workflow with regular GHA workflow Jul 26, 2026
Copilot AI requested a review from pelikhan July 26, 2026 10:31
Comment thread .github/workflows/rig-integration.yml Outdated
Comment on lines +29 to +50
- name: Create failure issue
if: failure()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const run_url = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `[rig-integration] Integration test run: failed`,
body: [
`## Integration Test Results`,
``,
`**Date**: ${new Date().toISOString().split("T")[0]}`,
`**Workflow run**: ${context.runId}`,
``,
`Some or all integration tests in \`scripts/haiku.integration.test.ts\` failed.`,
``,
`See the [workflow run](${run_url}) for full error output and stack traces.`,
].join("\n"),
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove and remove issues:write permissions, add copilot-requests:write permissions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in e3a6ca7 — removed issues: write, added copilot-requests: write, and dropped the failure-issue step (which depended on that permission).

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan July 26, 2026 12:40
@pelikhan
pelikhan marked this pull request as ready for review July 26, 2026 15:24
@pelikhan
pelikhan merged commit 786f192 into main Jul 26, 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.

[rig-integration] Integration test run: all 3 tests failed (AUTHENTICATION_FAILED)

2 participants