Skip to content

bug(trigger): recognize Google ADK LlmAgent tools=[...] changes as tool-surface changes #315

Description

@pengfei-threemoonslab

Reproduction target

google/adk-python#6605 adds the contributing/samples/agent_hooks Google ADK sample. Its root agent is:

root_agent = LlmAgent(
    name="support_agent",
    tools=[lookup_account, delete_account],
)

The PR therefore adds two directly reachable tool functions, one of which deletes an account.

Reproduction

With the base/head merge base and the sparse paths hydrated:

env AGENTS_SHIPGATE_AGENT_MODE=1 \
  PYTHONPATH=/Users/pengfeihu/code/shipgate/src \
  python -m agents_shipgate verify --preview \
  --workspace . --base origin/main --head HEAD --format json

Observed with source version 0.16.0b7:

{
  "changed_files": ["contributing/samples/agent_hooks/agent.py", "..."],
  "trigger": {
    "should_run": false,
    "run_shipgate": false,
    "skip_reason": "dry_run_only",
    "dry_run_recommended": true,
    "matched_rules": ["TRIGGER-FRAMEWORK-VERSION-BUMP"],
    "diff_tokens": ["google-adk"]
  }
}

The sole match is a raw google-adk diff token. It does not establish that the PR changed a Google ADK dependency version; the token can come from sample/documentation/install text. Meanwhile, the actual LlmAgent(..., tools=[...]) capability change is not recognized as a positive tool-surface trigger.

Expected

Add a conservative, static Google ADK trigger for changes that combine a Google ADK import/context with an Agent or LlmAgent construction whose tools argument is added or modified. The result should be a positive Shipgate route, not merely a framework-upgrade dry-run recommendation.

This must remain static: no imports, user-code execution, network calls, or LLM calls.

Acceptance criteria

  • A fixture equivalent to #6605, with no framework-version mutation, returns should_run: true and run_shipgate: true.
  • Documentation-only changes mentioning google-adk do not produce a false framework-version-bump classification.
  • Existing Google ADK patterns such as FunctionTool / toolset changes retain coverage.
  • The trigger rationale names the structural signal that matched, rather than implying a dependency upgrade from a bare token.

Why this matters

A trigger is only routing, not a release decision. But routing this real tool change as dry_run_only prevents normal adoption/verification workflows from starting and weakens the end-to-end value of a supported Google ADK adapter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Next after P0; blocks other work or ships a misleading resultarea:triggerTrigger catalog and relevance routingbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions