Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the test harness CI-detection logic to avoid treating VS Code Vitest extension runs as “real CI”, while preserving strict behavior in actual CI where missing snapshots should fail.
Changes:
- Refines CI detection to exclude
VITEST_VSCODEruns even whenCI=true. - Reuses the new
isCIhelper in Node E2E tests to decide when to inject the fake GitHub token. - Updates the replaying CAPI proxy behavior to only hard-fail on missing cached responses in real CI.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/harness/replayingCapiProxy.ts | Uses refined isCI logic before failing on missing cached responses. |
| nodejs/test/e2e/session.test.ts | Switches CI-dependent token injection to use shared isCI. |
| nodejs/test/e2e/harness/sdkTestContext.ts | Introduces/export isCI and applies it to client setup for E2E tests. |
Cross-SDK Consistency Review ✅I've reviewed this PR for cross-SDK consistency. No consistency issues found. SummaryThis PR fixes CI detection in the Node.js/TypeScript tests only, which is appropriate because:
VerificationI confirmed that other SDKs use simple
This is correct because they don't have the VS Code Vitest extension interference issue. Recommendation: ✅ Approve - this change maintains proper cross-SDK consistency by fixing a language-specific testing issue without requiring changes to other SDKs.
|
Cross-SDK Consistency ReviewI've reviewed this PR for consistency across all four SDK implementations (Node.js/TypeScript, Python, Go, and .NET). ✅ Consistency Issue IdentifiedThis PR updates CI detection from However, the Python, Go, and .NET E2E test files still use the old Python ( github_token = "fake-token-for-e2e-tests" if os.environ.get("CI") == "true" else NoneGo ( if os.Getenv("CI") == "true" {
options.GitHubToken = "fake-token-for-e2e-tests"
}.NET ( GitHubToken = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CI")) ? "fake-token-for-e2e-tests" : null,and var isCI = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CI"));📋 RecommendationFor consistency, consider updating the other SDKs to use the same
This would ensure all SDKs detect CI environments using the same, more reliable GitHub Actions-specific environment variable.
|
Test-only change to fix how we detect whether we're running in CI.