Skip to content

test(e2e): standardize smoke vs full distinction and default to real-…#132

Merged
teng-lin merged 5 commits intomainfrom
fix-e2e-smoke-distinction
Feb 25, 2026
Merged

test(e2e): standardize smoke vs full distinction and default to real-…#132
teng-lin merged 5 commits intomainfrom
fix-e2e-smoke-distinction

Conversation

@teng-lin
Copy link
Copy Markdown
Owner

@teng-lin teng-lin commented Feb 24, 2026

  • Standardized E2E Distinction: Updated all backend E2E adapters (gemini, codex, opencode,
    agent-sdk, claude) to consistently use E2E_PROFILE=real-full as a guard for prompt-based
    tests.
    • Default to real-full: Changed the default E2E profile from mock to real-full in
      src/e2e/e2e-profile.ts, aligning with the project's move toward real-binary testing.
    • Credential Safety: Integrated prereqs.canRunPromptTests into the runFull condition for all
      backends to prevent failures when credentials are missing.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @teng-lin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the end-to-end (E2E) testing strategy by changing the default test profile to 'real-full' for more comprehensive testing against real CLI binaries. It also ensures that the full test suite is only executed when the 'real-full' profile is explicitly selected and all necessary prerequisites are met, providing clearer distinction and control over test execution.

Highlights

  • Default E2E Profile Change: The default End-to-End (E2E) test profile has been switched from 'mock' to 'real-full', ensuring more comprehensive testing against real CLI binaries by default.
  • Standardized Full Test Execution Logic: The conditions for executing 'full' E2E tests across various session coordinator test files have been standardized to explicitly check for the 'real-full' profile in addition to other necessary prerequisites.
Changelog
  • src/e2e/e2e-profile.ts
    • Changed the default E2E profile from 'mock' to 'real-full'.
    • Updated documentation comments to reflect the new default profile.
    • Modified the 'normalizeProfile' function to return 'real-full' as the default.
  • src/e2e/session-coordinator-agent-sdk.e2e.test.ts
    • Imported the 'getE2EProfile' function.
    • Adjusted the 'runFull' condition to explicitly check if the current profile is 'real-full'.
  • src/e2e/session-coordinator-claude.e2e.test.ts
    • Adjusted the 'runFull' condition to explicitly check if the current profile is 'real-full' and added 'prereqs.canRunPromptTests'.
  • src/e2e/session-coordinator-codex.e2e.test.ts
    • Imported the 'getE2EProfile' function.
    • Adjusted the 'runFull' condition to explicitly check if the current profile is 'real-full'.
  • src/e2e/session-coordinator-gemini.e2e.test.ts
    • Imported the 'getE2EProfile' function.
    • Adjusted the 'runFull' condition to explicitly check if the current profile is 'real-full'.
  • src/e2e/session-coordinator-opencode.e2e.test.ts
    • Imported the 'getE2EProfile' function.
    • Adjusted the 'runFull' condition to explicitly check if the current profile is 'real-full'.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request standardizes the logic for enabling smoke and full end-to-end tests and changes the default test profile to real-full. The changes are consistent across the test suite and correctly implement the intended logic. I've added one suggestion to refactor the now-duplicated test condition logic into a shared helper function to improve maintainability, in line with our best practices for avoiding code duplication and extracting shared helper functions to common utility files.

Comment on lines +27 to +31
const profile = getE2EProfile();
const prereqs = getAgentSdkPrereqState();
const canBindLocalhost = canBindLocalhostSync();
const runSmoke = prereqs.ok && canBindLocalhost;
const runFull = runSmoke && prereqs.canRunPromptTests;
const runFull = runSmoke && prereqs.canRunPromptTests && profile === "real-full";
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.

medium

This block of logic for determining runSmoke and runFull is now duplicated across several e2e test files (agent-sdk, claude, codex, gemini, opencode). To improve maintainability and reduce code duplication, consider extracting this logic into a shared helper function.

For example, you could add a function in a shared module like prereqs.ts or a new helper file:

// In a shared helper module
import { canBindLocalhostSync } from "./helpers.js";
import { getE2EProfile } from "./e2e-profile.js";
import type { BackendPrereqState } from "./prereqs.js";

export function getTestRunConditions(prereqs: BackendPrereqState) {
  const profile = getE2EProfile();
  const canBindLocalhost = canBindLocalhostSync();
  const runSmoke = prereqs.ok && canBindLocalhost;
  const runFull = runSmoke && prereqs.canRunPromptTests && profile === "real-full";
  return { runSmoke, runFull };
}

Then, each test file could simply do:

import { getTestRunConditions } from "./path/to/helpers.js";
import { getAgentSdkPrereqState } from "./prereqs.js";

const { runSmoke, runFull } = getTestRunConditions(getAgentSdkPrereqState());

describe(...)

This would make the setup in each test file cleaner and ensure consistency if this logic needs to be changed in the future.

References
  1. To improve maintainability and avoid code duplication, extract repeated logic blocks into a private helper method.
  2. Extract shared helper functions (e.g., store access helpers) to a common utility or store file to prevent code duplication across multiple components.

@teng-lin teng-lin merged commit fb78c98 into main Feb 25, 2026
6 checks passed
@teng-lin teng-lin deleted the fix-e2e-smoke-distinction branch February 25, 2026 00:02
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.

1 participant