# Roadmap Things treadle could do better once an upstream project adds a feature. Each item says what treadle does today and what it would change. ## Cloudflare Containers - **Directory snapshots.** treadle snapshots the whole container after a trusted run on the default branch. A step could leave a secret anywhere on disk, so treadle keeps two snapshots: a trusted one for runs that had secrets, and a public one that every run may restore. With `snapshotDirectory()` and `directorySnapshots` on `start()`, `cache` could name the cache directories of a workflow (for example the pnpm store and `/var/cache/apt`), like the `cache` entries of the upstream spindle. Then treadle could keep one cache for each trusted branch, such as `master`. Only trusted runs on that branch write it, and a PR reads the cache of its target branch. The two tiers go away, and `check.yml` and `deploy.yml` could share a cache. workerd has the methods behind its experimental flag, but Containers does not support them yet. - **Delete snapshots.** Snapshots cannot be deleted. They expire 30 days after their last restore. After a failed restore, treadle starts from the image and waits for a newer run to replace the snapshot. ## Tangled - **Dependencies between workflows.** The workflow format has no way to wait for another workflow, so treadle adds `treadle.after`. treadle would switch to an upstream field. - **List steps before they start.** The web app learns about a step only when the spindle sends its first log message. The log lexicon has no status for a step that has not started yet, so the web app cannot show all steps up front. - **Check that a branch contains a commit.** A manual run can name any commit, and the knot cannot say whether a branch contains it. So a manual run on a trusted branch is trusted only when its commit is the branch head. ## Cloudflare API - **OIDC token exchange.** The upstream spindle gives trusted runs an OIDC ID token for a workflow `audience`, which a cloud provider can exchange for short-lived credentials. The Cloudflare API cannot exchange such a token for an API token, so treadle does not implement `audience`, and `deploy.yml` uses a long-lived API token. ## wrangler - **Container observability.** A container application for a Durable Object does not use the top-level `observability` setting. `wrangler.jsonc` sets `observability` on the container as well. - **Errors during deploy.** A failed API call while wrangler sets up a container application prints only a short warning. The real error (a 403 from listing Durable Object namespaces) shows only with `WRANGLER_LOG=debug`. - **Durable Objects in `exports`.** For a Durable Object that exists only in `exports`, wrangler lists every Durable Object namespace in the account. So the deploy token needs Workers Metadata Read. ## Buildkite - **Secrets for one build.** The API cannot give a secret to a single build, so `engine: buildkite` workflows get no secrets from treadle.