fix: accept flow functions in test case function call assertions - #283
Open
alanacevedo wants to merge 1 commit into
Open
fix: accept flow functions in test case function call assertions#283alanacevedo wants to merge 1 commit into
alanacevedo wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
Test case validation built its allowed function set from resources with the `fn` prefix, so an assertion naming a flow function under `flows/<flow>/functions/` (prefix `ft`) was rejected as unknown. Agent Studio accepts either: such an assertion can be created in the UI and is read back by `poly pull`, so the ADK rejected files it had itself just written, and validation failed for the whole project until the test case was removed. Both prefixes now count. Unknown names still raise, so typos are still caught. DEVP-618 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
alanacevedo
force-pushed
the
alan/devp-618/flow-functions-in-assertions
branch
from
August 24, 2026 16:39
6de616d to
95f38dd
Compare
Contributor
Coverage Report
Changed file coverage
|
Wiz1991
approved these changes
Aug 24, 2026
Wiz1991
approved these changes
Aug 24, 2026
Wiz1991
approved these changes
Aug 24, 2026
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.
Summary
function_call_assertionsonly accepted global functions, so an assertion naming a flow function was rejected as unknown. Agent Studio accepts either — the assertion can be created in the UI and read back bypoly pull— so the ADK was rejecting files it had just written.Motivation
DEVP-618
register_phone_numberis atflows/idnv/functions/. Validation fails per project, so while such a test case existspoly validatefails for the whole project and CI goes red on any PR touching it.Changes
TestCase.validateaccepts both function prefixes:fn(global) andft(flow). Unknown names still raiseTest strategy
poly <command>)Three tests in
TestCaseTests— global passes, flow passes, unknown still raises. Confirmed the flow test fails onmainand passes here. Nothing covered this check before.Also ran the patched validator over the real
adapthealth-uspproject offline (219 functions, 166 of them flow-local): the test case that triggered this now validates. Not pushed to Agent Studio.Checklist
ruff check .andruff format --check .passpytestpasses (1310 passed; 2posthog_test.pyfailures are pre-existing on cleanmain)Note for reviewers
Function steps and start/end functions have no prefix and stay rejected — they aren't LLM-callable. If the platform does accept assertions on them, covering that is harder: the empty prefix also covers every non-function resource, so unmapped names would stop being distinguishable from valid ones.
🤖 Generated with Claude Code