Skip to content

ateapi: reject VOLUMES snapshots without supported volume mounts - #1972

Open
Luomu (cloudonly) wants to merge 1 commit into
agent-substrate:mainfrom
cloudonly:fix-data-snapshot-template-validation
Open

Luomu (cloudonly) wants to merge 1 commit into
agent-substrate:mainfrom
cloudonly:fix-data-snapshot-template-validation

Conversation

@cloudonly

@cloudonly Luomu (cloudonly) commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1936

Reject ActorTemplates whose snapshot_config.preferred_fidelity is VOLUMES unless a container mounts a durable-dir volume, or a CSI volume on microVM. This catches invalid configurations before suspend crashes the actor. Update the volume snapshot resume fixture with a mounted durable-dir volume.

The validation covers both sandbox classes and MEMORY/VOLUMES fidelity across eight mount configurations, including durable-dir plus CSI on gVisor and a mounted systemInfo volume. It retains the upstream ROOTFS rejection case.

Document the requirement beside the ROOTFS rule in the snapshotConfig row of the API guide, noting that an external volume's data stays on the volume rather than in the snapshot.

Supersedes #2550, which implements the same rule; that PR is closed in favor of this one.

Validation

Rebased onto main 5d7a89070fabee769656d23877353b29c98777b8 on 2026-10-16. Resolved the API-guide conflict by keeping the VOLUMES requirement, main's durable-dir permission documentation, and the microvm sandbox-class spelling.

  • Linux/amd64, Go 1.27.1, CI=true, non-root test user: go test -race -count=1 passed for cmd/ateapi/internal/apivalidation, cmd/ateapi/internal/controlapi, and the complete cmd/ateapi/internal/controlapi/functionaltest suite. All 454 top-level tests passed, with 2,009 passing test entries and no skips, including TestResumeActor_DataSnapshotIgnoresGolden.
  • API validation coverage was 78.9% of statements. The ateapi build passed.
  • Regenerating code produced no changes. Go format, protobuf format, boilerplate, and golangci-lint checks for the affected packages passed.
  • hack/verify/benchmarking-python.sh passed after the final main sync.

The Linux tests and build ran on c0eb40f7c9f5d421f5e8f6e5c836ca3dcbc4779f. The final main sync changes only benchmarking Python and documentation; every Go source file and API test input is identical to that tested commit. The Python verifier ran on the final PR commit.

Real gVisor/micro-VM E2E was not run.

AI assistance: Codex helped implement, review, and validate the original change; Claude Code rebased it onto current main and added the API-guide documentation. Codex resolved this rebase and ran the validation listed above.

@cloudonly
Luomu (cloudonly) marked this pull request as ready for review September 29, 2026 03:53
@mayawang Maya Wang (mayawang) added area/api User-facing API changes kind/bug Something isn't working / bugfixes labels Sep 29, 2026
@cloudonly
Luomu (cloudonly) force-pushed the fix-data-snapshot-template-validation branch from 40891a4 to 05ff652 Compare October 8, 2026 02:53
@cloudonly Luomu (cloudonly) changed the title ateapi: reject DATA snapshots without supported volume mounts ateapi: reject VOLUMES snapshots without supported volume mounts Oct 10, 2026
@cloudonly
Luomu (cloudonly) force-pushed the fix-data-snapshot-template-validation branch 2 times, most recently from 28fb830 to 78ee1d7 Compare October 13, 2026 18:00
@cloudonly
Luomu (cloudonly) force-pushed the fix-data-snapshot-template-validation branch from 78ee1d7 to 930be81 Compare October 14, 2026 03:40
@cloudonly

Copy link
Copy Markdown
Contributor Author

Julian Gutierrez Oschmann (@juli4n), gentle ping on this one. It is rebased on current main with no conflicts and CI is green. It also unblocks the golden-snapshot stack that builds on it (the warmup/capture consistency PR and the atespace migration), so a first look would help a lot. Happy to adjust anything you'd like changed.

@cloudonly
Luomu (cloudonly) force-pushed the fix-data-snapshot-template-validation branch 5 times, most recently from d215060 to 491cd80 Compare October 17, 2026 15:55
A template whose preferred fidelity is VOLUMES but that mounts no
volume a snapshot can capture (durable-dir, or a CSI volume on the
micro-VM class) fails at runtime on every pause and suspend. Reject it
at template admission instead, in the custom validation that already
checks volume references and the ROOTFS sandbox class.

Document the requirement next to the ROOTFS rule in the API guide,
including that an external volume's data stays on the volume rather
than in the snapshot.
@cloudonly
Luomu (cloudonly) force-pushed the fix-data-snapshot-template-validation branch from 491cd80 to cd0ce64 Compare October 18, 2026 02:05
@gambtho

Copy link
Copy Markdown

Since #2543 merged, golden capture uses the template's fidelity, so a VOLUMES template with no durable volume passes validation and then ends in GoldenActorCrashed. We run files-only templates, so catching this at validation would help us.

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

Labels

area/api User-facing API changes kind/bug Something isn't working / bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actor with DATA scope but no durable-dir volumes fail to suspend / pause

3 participants