feat: run integration tests via agentic workflow with copilot-requests:write#134
Conversation
…ests:write Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design — approving with one minor suggestion.
📋 Key Themes & Highlights
Key Themes
- Implicit coupling: The
argsandenvconstruction inrunIntegrationSampleboth branch onsdkUri, but independently. WhensdkUriis present,COPILOT_GITHUB_TOKENis 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: writeis 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, |
There was a problem hiding this comment.
[/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.
Replaces the
COPILOT_GITHUB_TOKEN-gated CI job with an agentic workflow that uses the built-incopilot-requests: writepermission, eliminating the dependency on a repository secret.Changes
.github/workflows/rig-integration.md— new agentic workflow; triggers on push tomainandworkflow_dispatch; usesengine: copilot+copilot-requests: write; runsnpm ci && npm run test:integrationvia bash.github/workflows/rig-integration.lock.yml— compiled output fromgh aw compilescripts/haiku.integration.test.ts— tests now activate whenCOPILOT_SDK_URIis set (agentic engine context) in addition toCOPILOT_GITHUB_TOKEN; skips--serverflag whenCOPILOT_SDK_URIis present, using URI-based connection instead of stdio transport.github/workflows/ci.yml— removedintegration-testjobConnection mode logic