Skip to content

Lock collision-safe event ID contract and regression coverage #4567

@davidahmann

Description

@davidahmann

Problem

Event IDs must stay collision-safe across high-volume multi-agent/tool execution. Any shift toward normalized-name-only ID derivation would create ambiguous audit/replay trails.

Why Now

ADK usage is increasingly multi-agent and replay/audit-sensitive; this identifier contract should be explicitly protected by tests.

Current Behavior Is Insufficient

The implementation currently uses UUID-based IDs, but there is no focused regression test proving collision-safe behavior and non-dependence on normalized textual labels.

Why Code Change

This requires code-level tests (and hardening if needed) in event creation/conversion paths, not documentation guidance.

Scope / Codepaths

  • src/google/adk/events/event.py
  • src/google/adk/runners.py
  • tests/unittests/a2a/converters/test_event_converter.py

Acceptance / Validation

  • Add tests that validate generated event IDs are unique across collision-prone author/content naming corpus.
  • Preserve existing interoperability and serialization behavior.
  • Run changed-file formatter checks and targeted unit tests.

Repro Evidence Packet

  • Version/commit under test: origin/main as of 2026-02-20.
  • Environment: macOS (Darwin), Python/uv per repo setup.
  • Minimal repro:
    1. Generate events for multiple agents/tool calls with normalized-equivalent names.
    2. Compare generated event IDs.
  • Expected: IDs remain unique and independent of normalized labels.
  • Actual: contract is implied but not explicitly guarded by focused regression tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core[Component] This issue is related to the core interface and implementation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions