Skip to content

ateapi: store snapshots under stable UUID paths - #568

Merged
Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
kagent-dev:issue-529-snapshot-storage-layout
Jul 30, 2026
Merged

Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
kagent-dev:issue-529-snapshot-storage-layout

Conversation

@EItanya

Copy link
Copy Markdown
Collaborator

Summary

  • store snapshots under <configured-root>/snapshots/<uuid>
  • avoid encoding actor or atespace lifecycle in the GCS object prefix
  • validate the snapshot prefix and UUID format

This is a small storage-layout prerequisite for #529. Snapshot metadata, tagging, and retention remain separate follow-up work.

Testing

  • make test
  • env -u NO_COLOR make verify
  • Kind E2E, token auth: gVisor suite and micro-VM demo suite
  • Kind E2E, certificate auth: gVisor suite and micro-VM demo suite

@dberkov

Copy link
Copy Markdown
Collaborator

Concern:

This concept introduces a tight coupling between the snapshot layer and the persistence layer. If an issue occurs with the persistence layer, data cannot be recreated. Relying on backups is insufficient because, between the most recent backup and the failure point, we cannot determine which snapshot belongs to which actor.

Proposals:

Option 1: Keep the directory layout flat as proposed in this PR, but store an additional metadata file inside the snapshot folder indicating its associated actor.
Option 2: Structure the directory hierarchy, for example: /snapshots/atespaces/ATE_SPACE/actorTemplates/ACTOR_TEMPLATE/ACTOR_ID/SNAPSHOT_ID (or something similar).
Option 3: Combine Options 1 & 2.

@EItanya

Copy link
Copy Markdown
Collaborator Author

Concern:

This concept introduces a tight coupling between the snapshot layer and the persistence layer. If an issue occurs with the persistence layer, data cannot be recreated. Relying on backups is insufficient because, between the most recent backup and the failure point, we cannot determine which snapshot belongs to which actor.

Proposals:

Option 1: Keep the directory layout flat as proposed in this PR, but store an additional metadata file inside the snapshot folder indicating its associated actor. Option 2: Structure the directory hierarchy, for example: /snapshots/atespaces/ATE_SPACE/actorTemplates/ACTOR_TEMPLATE/ACTOR_ID/SNAPSHOT_ID (or something similar). Option 3: Combine Options 1 & 2.

I'm happy to add the metadata file, but at a higher level is persistence rebuilding a goal of the project. From everything I've seen so far data loss is essentially existential for the system.

@EItanya

Copy link
Copy Markdown
Collaborator Author

Added the metadata mapping while keeping the storage layout flat. Each snapshot already contains a manifest.json, so instead of adding another file or directory hierarchy, the existing manifest now records atespace, actorName, actorUid, actorTemplateNamespace, and actorTemplateName alongside the snapshot file list and sandbox metadata. This makes the snapshot independently attributable to its actor without coupling identity to the object path.

@EItanya
Eitan Yarmush (EItanya) force-pushed the issue-529-snapshot-storage-layout branch from d120dbb to 695e417 Compare July 30, 2026 16:30
@EItanya
Eitan Yarmush (EItanya) force-pushed the issue-529-snapshot-storage-layout branch from 695e417 to 88cb2fa Compare July 30, 2026 16:52
@HavenXia
Haven Xia (HavenXia) merged commit 38ade55 into agent-substrate:main Jul 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants