fabro/lib/components/fabro-sandbox
Bryan Helmkamp 5ebf3ebd35
Model the Daytona snapshot source as an enum
`DaytonaSnapshotSettings` carried two independent `Option`s (`image` and
`dockerfile`) that every consumer had to re-validate. Replace them with a
single `source: DaytonaSnapshotSource { Image, Dockerfile }` so the
both-set and neither-set states are unrepresentable at the sandbox layer.
This removes four unreachable error arms in `canonical_manifest` and
`create_snapshot_params`, the `.filter(...)` guard in `initialize`, and
the presence guard in `daytona_config_from_environment`. The
mutual-exclusion rule now lives only in fabro-config, which owns the
`image.docker` / `image.dockerfile` keys the old messages named.

Merge `ImageSnapshotManifest` into `SnapshotManifest` via a flattened
`SourceManifest` enum. The dockerfile case serializes to the same bytes
as before, so existing snapshot names are unchanged; the pinned identity
test still passes. Pin the image-case identity as well so a future
manifest change cannot silently orphan image snapshots.

Fold `validate_daytona_image_settings` into the existing Daytona arm of
`validate_provider_capabilities`; both callers already invoke it right
after `resolve_environment_fields`, so error order is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 16:19:56 -04:00
..
src Model the Daytona snapshot source as an enum 2026-08-28 16:19:56 -04:00
tests Add tag support to Git run targets 2026-08-26 11:16:37 -04:00
Cargo.toml fix: harden GitHub token refresh handling 2026-08-20 19:56:06 -04:00