Skip to content

ateapi: garbage collect actor snapshots - #669

Closed
Eitan Yarmush (EItanya) wants to merge 1 commit into
agent-substrate:mainfrom
kagent-dev:issue-664-snapshot-gc
Closed

Eitan Yarmush (EItanya) wants to merge 1 commit into
agent-substrate:mainfrom
kagent-dev:issue-664-snapshot-gc

Conversation

@EItanya

@EItanya Eitan Yarmush (EItanya) commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add per-ActorTemplate minimum-count and minimum-age snapshot retention with tunable zero values
  • elect one ateapi GC worker with a Kubernetes Lease and delete snapshot storage through ready atelets
  • pin Actor latest snapshots, in-progress snapshots, golden snapshots, and tagged snapshots; tombstone deletions to prevent new references
  • add unit, storage-prefix, leader-election, and kind E2E coverage

Known tradeoff

ateapi currently calls DialAny() to route each storage deletion through an arbitrary ready atelet. Snapshot deletion is not node-affine; this exists only because atelet already has the object-store credentials while ateapi does not. This is intentionally minimal but creates an unnecessary availability dependency on atelet. Before making the PR ready, we should decide whether ateapi should receive narrowly scoped object-delete privileges and delete directly instead.

Testing

  • env -u NO_COLOR GOCACHE=/tmp/substrate-issue-664-gocache make verify
  • hack/run-e2e-kind.sh ./internal/e2e/suites/demo -run '^TestActorSnapshotGarbageCollection$' -count=1 -args --no-color

Fixes #664

@EItanya
Eitan Yarmush (EItanya) marked this pull request as draft July 31, 2026 18:45
@EItanya

Copy link
Copy Markdown
Collaborator Author

Closing while the retention configuration and GC indexing design are revised.

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.

Add retention policy and garbage collection for ActorSnapshots

1 participant