Repositories and storage
Swale keeps files in three places, and each lasts as long as what it belongs to: a repository keeps its files across runs until you delete or replace them, a run's shared workspace lasts until the run ends, and a task's private scratch until the task ends. This page explains repositories, from tags and transfers to storage billing; Runtime storage covers the workspace and scratch.
What a repository is
A repository on Swale is a versioned file store inside a project. You push files to a repository using the CLI and pull them back when needed. Repositories are well-suited for storing datasets, model weights, build artifacts, or any large files that workflows consume or produce.
A repository is not a Git repository. There is no diff, commit history, or branching. Instead, each push writes a named snapshot called a tag.
Tags
A tag is a named snapshot of the files you pushed at a point in time. It records which files the snapshot contains and where their content is stored; it holds no file data of its own.
Tag names are reusable. Pushing to a tag name that already exists replaces that tag's snapshot with the files in the new push — the tag keeps its name, and its previous file list is gone. Pushing to a name that does not exist creates the tag.
There is no separate update operation, and an individual tag keeps no history of its own: once its snapshot is replaced, the platform cannot return the previous one to you. Keeping several versions of your files around means pushing them under distinct tag names, not pushing repeatedly to one.
The tag latest is the default when you push without specifying a name, and pulling without a tag name also defaults to latest. Since it is the default on both sides, latest is normally the tag that gets replaced most often.
What replacing a tag does
- The switch is all-or-nothing. A pull resolves a tag to a single snapshot — either the previous one or the new one, never a mixture of the two.
- A failed push leaves the tag alone. Before writing the tag, the platform checks that every file in the push refers to content it still stores. If that check fails, the push fails and the tag keeps pointing at its previous snapshot.
- The old content is not deleted right away. Content that only the replaced snapshot referred to is permanently deleted within three weeks, as after a tag is deleted, and counts as account storage until then. Content the new snapshot still uses — or that any other tag uses — is untouched.
- Re-pushing is incremental. Because deduplication is account-wide, replacing a tag only uploads the parts of the files that are genuinely new. Replacing a tag whose content barely changed transfers barely anything.
Push and pull
Files move in and out of repositories only through the CLI's swale push and swale pull, from your machine or from a task in a run; there is no UI for transferring files. Both name a repository and tag as project/repo:tag, in the account the CLI is working in; see Repository target and Push and pull files.
How storage works
You never manage storage below the file level — push and pull handle everything. But the storage model explains why repeated pushes are fast, why keeping many tags is cheap, and why deleting one tag does not affect others.
Files are stored as chunks
On push, the CLI splits each file into chunks. The split points are derived from the file's content rather than fixed positions, so editing part of a file leaves the boundaries around unchanged data in place — only the chunks near the edit are new. Each chunk is identified by a hash of its content.
Chunks are compressed and packed into large immutable aggregates called xorbs (around 64 MiB each), which are what the platform stores. For each file, a compact manifest records how to reconstruct that file from ranges of xorbs.
Data is deduplicated per account
Before uploading, the CLI asks the platform what the account already stores. The answer is account-level: the platform consults a sampled index of previously stored content and reports which xorbs the account already has, and only new xorbs are uploaded.
When the query matches content the account already holds, the platform's answer points the CLI straight at that content — the match comes back ready to fetch, so the CLI reuses what it can in one step rather than looking each match up again. Pushing the same files a second time transfers nothing, and pushing after a small edit uploads only the changed parts of the file.
Deduplication is scoped to the account. Repositories and projects under the same account share stored data: identical files pushed to different projects of the same account are stored once. Content is never shared or observable across accounts.
Tags reference data, they don't copy it
A tag stores no file data of its own. It maps each filename to that file's manifest.
Many tags that share most of their content are just small sets of references pointing at one copy of that content, stored once per account. Re-tagging (see Manage tags) copies references, not data.
Deletion respects the sharing: deleting a tag removes it immediately, and data that nothing in the account references any more is permanently deleted within three weeks. Data still referenced by another tag is untouched.
The CLI keeps a local content cache
The CLI keeps a cache of the chunks it transfers on your machine, keyed by chunk hash; both pushes and pulls add to it. On pull, chunks already in the cache are verified against their hash and reused from disk, and only the byte ranges covering missing chunks are downloaded.
The cache survives across runs, so an interrupted pull can be re-run and it continues from where the previous run stopped. An interrupted push can also be re-run — the platform reports which xorbs the account already stores and asks again only for those whose upload never completed, so a promptly re-run push resends little or nothing — see Push and pull files.
Why tags make a good cache
Reusable tag names combined with account-wide deduplication make a repository usable as a cache for the files your workflows would otherwise rebuild every run. Two shapes cover most needs, and they differ in which property you are after.
A rolling tag — one name re-pushed on every run — always points at the most recent snapshot, and each push uploads only what changed, so the cache stays current at close to the cost of storing it once. Concurrent pushes to a single name are last-write-wins: the tag ends up holding one of the two snapshots, not a blend of them. For a cache that repopulates itself on the next run, that is acceptable.
A hash-keyed tag — a name derived from the inputs the content depends on, such as a lockfile hash — changes whenever those inputs change, so each key is written once in practice and pulling it returns the same content every time. This is how you get immutability where you need it: as a convention on top of reusable names, rather than as a property of the tag itself. The check-then-push sequence it relies on is not a lock and does not need to be — two runs deriving the same key derived it from the same inputs, so both push equivalent content, and the loser transfers almost nothing under deduplication.
Cleaning up is the same in both shapes: delete the tag, and the content it held is reclaimed once nothing else refers to it.
There is no setting that makes a tag reject being replaced — tag names are reusable everywhere on the platform. Where you need a snapshot that will not change under you, use a hash-keyed name.
See Cache files between runs for both patterns as runnable recipes.
Deleted repositories
A deleted repository or project can be restored, from the platform UI or the API, through its 90-day grace period. Everything an account stores is billed as account storage, and Why deleted content is billed for a while explains how deletion and sharing affect it.