Refactor: rename code_execution_request_processor to code_execution_processor - #675
Open
AmaadMartin wants to merge 1 commit into
Open
Refactor: rename code_execution_request_processor to code_execution_processor#675AmaadMartin wants to merge 1 commit into
AmaadMartin wants to merge 1 commit into
Conversation
…tion_processor The module declares both CodeExecutionRequestProcessor and CodeExecutionResponseProcessor, so the _request_ infix in the filename hides the response processor from anyone scanning the directory. It is the only file in core/src/agents/processors/ that holds both directions. Pure rename: git mv of the source and its mirrored test, plus the three import specifiers that point at them. No symbol, behavior, or public API change.
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
N/A
Problem:
core/src/agents/processors/code_execution_request_processor.tsdeclares a request processor and a response processor. It is the only file in that directory that holds both. Every other*_request_processor.tsthere holds a request processor only, so the_request_infix hidesCodeExecutionResponseProcessorfrom a contributor who scans the directory.Solution: I renamed the module and its mirrored test to
code_execution_processor.ts, so the name describes the whole file. The rename follows adk-python, which names the equivalent module_code_execution.pyfor its subject instead of its direction. This is a pure rename: no symbol, behavior, or public API change. I usedgit mv, so git records both moves and can re-target hunks from other branches.Scope notes:
CodeExecutionRequestProcessor,CodeExecutionResponseProcessor,CODE_EXECUTION_REQUEST_PROCESSORand theresponseProcessorsingleton keep their names.core/src/index.tsorcore/src/common.ts. A relocation is not a promotion to public API.@google/adk/agents/processors/...in the integration test alone and only updated the filename in it.Collision check (open PRs on this fork,
--limit 1000): no open PR renames this file. Six PRs touch adjacent files and will need a rebase, which the recorded rename should absorb: #639 and #460 edit the moved module, #486, #561 and #73 editllm_agent.ts, and #632, #486, #561 and #460 edit the sandbox executor test. I branched frommainrather than stacking, because the overlap spans four independent branches and this change reads nothing they add.Sequencing: #486 wires the response processor into the
LlmAgentdefaults. This PR does not depend on it and touches only the import line inllm_agent.ts, not the processor array literals. Merge the two in either order.Testing Plan
Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes.
Unit Tests:
I added no test. The moved test file is byte-identical to its predecessor except for the import on line 19, so a reviewer can confirm the move preserved content. Test count is unchanged: 8 before, 8 after.
Proof the checks can fail. A rename has no behavior to assert, so I mutated each import site and confirmed the toolchain catches the stale path:
core/src/agents/llm_agent.ts:63to the old specifier.npm run ts:checkwent from 281 errors to 282, and the new one is:core/src/agents/llm_agent.ts:63:48 - error TS2307: Cannot find module './processors/code_execution_request_processor.js' or its corresponding type declarations.Error: Cannot find module '../../../src/agents/processors/code_execution_request_processor.js'npm run ts:checkreports 281 errors on this branch. That count is identical onmainwith my change stashed, and the errors are unrelated to this PR (mostlyCannot find module '@google/adk'in test files). The one error in a file I touched,tests/integration/agents/agent_with_sandbox_executor_test.ts:9, exists onmaintoo with the old path: that deep specifier resolves only through the vitest alias, never throughcore/package.jsonexports. Fixing it is out of scope here.Manual End-to-End (E2E) Tests:
Checklist