Skip to content

feat: run integration tests via agentic workflow with copilot-requests:write#134

Merged
pelikhan merged 1 commit into
mainfrom
copilot/update-integration-test-workflows
Jul 25, 2026
Merged

feat: run integration tests via agentic workflow with copilot-requests:write#134
pelikhan merged 1 commit into
mainfrom
copilot/update-integration-test-workflows

Conversation

Copilot AI commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Replaces the COPILOT_GITHUB_TOKEN-gated CI job with an agentic workflow that uses the built-in copilot-requests: write permission, eliminating the dependency on a repository secret.

Changes

  • .github/workflows/rig-integration.md — new agentic workflow; triggers on push to main and workflow_dispatch; uses engine: copilot + copilot-requests: write; runs npm ci && npm run test:integration via bash
  • .github/workflows/rig-integration.lock.yml — compiled output from gh aw compile
  • scripts/haiku.integration.test.ts — tests now activate when COPILOT_SDK_URI is set (agentic engine context) in addition to COPILOT_GITHUB_TOKEN; skips --server flag when COPILOT_SDK_URI is present, using URI-based connection instead of stdio transport
  • .github/workflows/ci.yml — removed integration-test job

Connection mode logic

// COPILOT_SDK_URI set (agentic engine) → URI connection, no --server
// COPILOT_GITHUB_TOKEN set (local/dev) → stdio transport via --server
const args = sdkUri ? [launcherPath, samplePath] : [launcherPath, samplePath, "--server"];

…ests:write

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title feat: migrate integration tests to agentic workflow with copilot-requests:write feat: run integration tests via agentic workflow with copilot-requests:write Jul 25, 2026
Copilot AI requested a review from pelikhan July 25, 2026 10:58
@pelikhan
pelikhan marked this pull request as ready for review July 25, 2026 11:05
@pelikhan
pelikhan merged commit 5ad09a0 into main Jul 25, 2026
3 checks passed
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /codebase-design — approving with one minor suggestion.

📋 Key Themes & Highlights

Key Themes

  • Implicit coupling: The args and env construction in runIntegrationSample both branch on sdkUri, but independently. When sdkUri is present, COPILOT_GITHUB_TOKEN is still forwarded into the child process env even though the stdio transport is not used. This is harmless today but silently couples two decisions.

Positive Highlights

  • ✅ Clean, minimal change to the integration test — only the transport selection and condition are touched
  • ✅ Removing the secret-gated job in favor of copilot-requests: write is the right architectural move
  • ✅ The agentic workflow source (rig-integration.md) is well-scoped: minimal tools allowlist, explicit network allow-list, sensible timeout
  • ✅ The PR description clearly explains the connection-mode logic, which is exactly the kind of context future readers need

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 39.8 AIC · ⌖ 7 AIC · ⊞ 6.3K
Comment /matt to run again

// and the URI-based connection is used without --server.
const args = sdkUri ? [launcherPath, samplePath] : [launcherPath, samplePath, "--server"];
const child = spawn(process.execPath, args, {
cwd: repoRoot,

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.

[/codebase-design] When both COPILOT_SDK_URI and COPILOT_GITHUB_TOKEN are set simultaneously, COPILOT_GITHUB_TOKEN is still spread into the child env even though --server (stdio transport) is skipped — the two decisions (args, env) are driven by the same condition but handled separately.

💡 Consider aligning env selection with transport selection

Making the credential exclusion explicit alongside the args decision removes the implicit coupling:

const useUriTransport = !!sdkUri;
const args = useUriTransport
  ? [launcherPath, samplePath]
  : [launcherPath, samplePath, "--server"];
const env = useUriTransport
  ? { ...process.env }
  : { ...process.env, COPILOT_GITHUB_TOKEN: token! };

This makes it obvious that when running via URI transport, COPILOT_GITHUB_TOKEN is intentionally omitted rather than being forwarded silently.

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