Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Exercise Runner context creation when CFC is enabled and then disabled with the same agent, both within one session and across sessions. Preserve configured local and built-in executors while checking the request capability. Related: google#7224
yang0228
force-pushed
the
codex/7224-cfc-invocation-isolation
branch
from
September 21, 2026 08:55
e866321 to
9b4647d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Issue or Description of Change
Problem:
The capability bleed reported in #7224 was fixed by f8282da. Its processor tests construct invocation contexts directly, so they do not exercise the Runner context-creation path that originally mutated the shared agent.
Solution:
Add a parametrized Runner regression test that enables CFC and then disables it while reusing one agent and runner. Cover both independent sessions and reuse of the same session, with no configured executor, a local executor, and an explicitly configured built-in executor. Assert the resulting model-request capability and preservation of the configured executor's identity.
Testing Plan
Unit Tests:
Focused command:
Result: 150 passed on Python 3.12, 3.13, and 3.14. All six new cases also passed in each full tox environment.
Regression check: transplant the new test into the unmodified pre-fix source at
43b73e4f(f8282daf^), then runpytest tests/unittests/test_runners.py -k cfc_code_execution -q. Result: 4 failed, 2 passed. Both the no-executor and local-executor cases fail for same-session and cross-session reuse:The explicitly configured built-in executor cases pass on both revisions.
Full supported-version suite:
Generated a local, ignored
uv.lockbecause the checkout does not include one and the configured tox runner requiresuv sync --locked. Ran the complete suite using:tox -p 2 -x 'testenv.commands=pytest tests/unittests -n 4'The failures are the agent import allowlist check and four
test_load_web_page.pycases: public NAT64, private hostname blocking, resolved-IP pinning, and retrying another resolved address. An unmodifiedd1c64587source snapshot reproduced the same five failures under Python 3.10: 15,229 passed, 5 failed, exactly six fewer passing cases than this branch. Python 3.12 additionally reportssitecustomizein the runner import allowlist check; both Python 3.12 import failures also reproduce against the unmodified snapshot.Manual End-to-End (E2E) Tests:
Built the wheel with
uv build, installed it into a clean Python 3.12 virtual environment, and ran the local Runner-to-request-processor reproduction from the issue. It uses real ADK objects and requires no model service or credentials:Observed output from the clean wheel environment:
This validates the local reproduction; it does not exercise a live Gemini connection.
Checklist
Additional context
pre-commit run --files tests/unittests/test_runners.pyand the installed commit hooks passed. Hook sources were retrieved from GitHub's official codeload endpoint at the configured tags because this environment could not connect to GitHub's HTTPS git endpoint. The repository hook configuration was used unchanged.