Skip to content

artifact: in-memory service shares Part pointers between save, storage and load #1785

Open

Description

@anzal1

The in-memory artifact service stores the saved *genai.Part by pointer and returns that same pointer from Load (artifact/inmemory.go). Changing a part after saving it, or changing a part returned by Load, silently rewrites the stored artifact for every later reader.

adk-python deep-copies the part on save and on load (artifacts/in_memory_artifact_service.py).

Fix with regression tests: #1782


Written with the help of an agent (Claude Code, claude-opus-5-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions