Fix: type-check core/test/agents/processors against core/src (31 tsc errors) - #739
Open
AmaadMartin wants to merge 2 commits into
Open
Fix: type-check core/test/agents/processors against core/src (31 tsc errors)#739AmaadMartin wants to merge 2 commits into
AmaadMartin wants to merge 2 commits into
Conversation
added 2 commits
August 6, 2026 15:20
tsc --noEmit reports 31 errors in this directory. The tests import the processor under test from core/src but their fixtures from '@google/adk', which tsc resolves to core/dist/types. Classes with private members or brand symbols then exist twice and are not assignable to each other. Resolve every ADK symbol from core/src, which is what vitest already loads through its '@google/adk' -> ./core/src alias. Two output-schema fixtures now use the Type enum instead of 'object' as const, and the confirmation processor is held through BaseLlmRequestProcessor so the two-parameter base contract applies. No test title or assertion changes.
RequestConfirmationLlmRequestProcessor.runAsync takes only the invocation context and never reads a request, so the second argument was built and discarded. Dropping it removes the TS2554 error at its root and makes the BaseLlmRequestProcessor binding, the makeLlmRequest helper and two imports unnecessary.
7 tasks
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:
npm run ts:checkreports 31 errors incore/test/agents/processors/. Each of six files imports the processor under test fromcore/srcbut its fixtures from'@google/adk', whichtscresolves to the built declarations incore/dist/types. Classes that carry aprivatemember or a brand symbol therefore exist twice, and TypeScript compares those by declaration identity, so the two copies are not assignable to each other. A representative error:Solution: The six files now resolve every ADK symbol from
core/src, which is the single copyvitestalready loads through its'@google/adk'->./core/srcalias. The package specifier cannot stay:core/package.jsonexports only".", and the processors under test are in neithercore/src/common.tsnorcore/src/index.ts, so no package import can reach them. Two remaining errors come from other causes: two local output-schema fixtures used'object' as constinstead of theTypeenum, and the confirmation test passed a second argument thatRequestConfirmationLlmRequestProcessor.runAsyncdoes not declare and never reads, so the test now passes only the invocation context. No production file, test title or assertion changes.Overlap disclosure. Four open fork PRs contain these same hunks inside much larger rewrites: #487, #514, #628 and #294. None is merged and
mainstill shows all 31 errors, so this narrow directory-scoped slice is not a duplicate. If #514 or #487 lands first, close this one. PR #675 renamescode_execution_request_processor.ts; it will conflict textually with the import line in that one test file.I checked all 630 open PRs on the fork for a collision. No open PR is scoped to this directory.
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:
[x] I have added or updated unit tests for my change.
[x] All unit tests pass locally.
No test is added: the change adds no production code, and the existing suite is the regression gate. Measured on this branch at
81c14222afternpm install && npm run build:tsc --noEmiterrors incore/test/agents/processors/tsc --noEmiterrors repo-widevitest run --project unit:core core/test/agents/processorseslint "core/test/agents/processors/*.ts"prettier --check "core/test/agents/processors/*.ts"The repo-wide count drops by exactly 31, which shows no other file moved.
Proof that the gate can fail. I reverted the change and re-ran the check:
Manual End-to-End (E2E) Tests:
Not applicable. The change is type-level and test-only. To reproduce the four checks above:
Checklist
[x] I have read the CONTRIBUTING.md document.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have added tests that prove my fix is effective or that my feature works.
[x] New and existing unit tests pass locally with my changes.
CI
GitHub Actions reports no checks on this fork, so I validated locally on the pushed commit
d127938a: