Skip to content

Conversation

@rchardx
Copy link
Collaborator

@rchardx rchardx commented Dec 5, 2025

Description

The base class InferenceEngine defines workflow_executor as a read-only property without a setter. Override it with a proper getter/setter pair to allow setting the mock workflow executor in tests.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not
    work as expected)
  • Documentation update
  • Code refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Checklist

  • I have read the Contributing Guide
  • I have run formatting tools (pre-commit or manual)
  • I have run relevant unit tests and they pass
  • I have added tests for new functionality
  • I have updated documentation if needed
  • My branch is up to date with main
  • This PR introduces breaking changes (if yes, fill out details below)
  • If this PR changes documentation, I have built and previewed it locally with
    jb build docs
  • No critical issues raised by AI reviewers (/gemini review)

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @rchardx, 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 addresses a limitation in the MockInferenceEngine by enabling the workflow_executor property to be set. This change is crucial for testing scenarios where the mock workflow executor needs to be dynamically assigned or reconfigured, ensuring that tests can accurately simulate various workflow execution behaviors without being constrained by a read-only property.

Highlights

  • MockInferenceEngine Property Override: The workflow_executor property in MockInferenceEngine has been updated to include a setter, allowing its value to be modified during testing. Previously, it was a read-only property inherited from the base InferenceEngine.
  • Internal Variable Renaming: The internal variable backing the workflow_executor property within MockInferenceEngine's __init__ method was renamed from self.workflow_executor to self._workflow_executor to properly align with the new property getter and setter implementation.
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
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 correctly addresses an issue where a read-only property in the base class InferenceEngine prevented setting a mock value in the MockInferenceEngine test class. The change introduces a standard getter/setter property pair to override the workflow_executor property, making it writable for testing purposes. The implementation is clean, follows Python best practices, and effectively improves the testability of the code as intended. The change is sound and I have no further recommendations.

The base class InferenceEngine defines workflow_executor as a read-only
property without a setter. Override it with a proper getter/setter pair
to allow setting the mock workflow executor in tests.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in the MockInferenceEngine test class where the workflow_executor property could not be set. The base class InferenceEngine defines workflow_executor as a read-only property (getter only), so the mock class needs to override it with both getter and setter to allow test code to configure the mock workflow executor.

Key Changes:

  • Changed from direct attribute assignment to using a private _workflow_executor attribute with property getter/setter
  • The implementation now follows the same pattern as the concrete RemoteInfEngine implementation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rchardx rchardx added the safe-to-test Ready to run unit-tests in a PR. label Dec 5, 2025
@rchardx rchardx temporarily deployed to AReaL-unittests December 5, 2025 17:30 — with GitHub Actions Inactive
@nuzant nuzant merged commit 1810edf into main Dec 6, 2025
9 of 10 checks passed
@nuzant nuzant deleted the rchardx/fix_ci branch December 6, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe-to-test Ready to run unit-tests in a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants