Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/features/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

## Cache mode

`cache.mode` is `off`, `read-only`, or `read-write`. Unset, it is `read-write` locally and `read-only` when `CI` is set. `cache.strict` fails a recording that no longer matches with `REPLAY_STALE` instead of running the step live. Under `cache.strict`, retries replay too, and the run never writes the cache. `cache.dir` resolves against the config file's directory. `E2E_CACHE_DIR` replaces it, so checkouts and worktrees of one project can share a replay cache without editing the config; the mode stays as configured. `E2E_CACHE_DIR_OVERRIDE` is upstream's `--cache-dir` for one run and wins over both (.NET-only name; the flag itself is on `e2e cache`). `E2E_NO_CACHE=1` (or `true`) is upstream's `--no-cache`: for that run the cache is `off` whatever the config says, in CI too and beside a `cache.store`, so every step runs on the live agent and nothing is recorded or evicted. Use it to evaluate a new model, or to run a test once live after it passes. A replay cache of your own (upstream's `cache.store`, an `IStepCache`) replaces the file store: it is code, so set it with `E2EConfig.WithCacheStore(store)`, not in `e2e.config.json`. An `IStepCache` has `Writable` (upstream's `CacheStore.writable`: false when the store never writes or deletes), `Read`, `Delete`, and `Write`, which returns the entry's size in bytes, or `null` when it did not write (upstream's `{ bytes } | undefined`); a confirmed recording whose `Write` returns `null` is reported as not written, not saved. A store written against the older `void Write` and with no `Writable` no longer compiles: add `Writable`, and return the bytes or `null` from `Write`. A store has no directory, so it ignores `E2E_CACHE_DIR`, and CI does not turn an unset mode into `read-only` (the store states its own trust). The file store (`FileStepCache`) takes upstream's `maxBytes` and `writable` as `new FileStepCache(directory, maxBytes, writable)`: an entry over the byte cap (at most 1 MiB, `FileStepCache.MaxCacheWireBytes`) is not written and reads as invalid, and a store that is not writable never writes or deletes (its `Write` returns `null`). Parallel runs can share the directory: each write replaces its entry file atomically, and two writers on one key leave the last write. On Windows, a write the file system refuses while another write replaces the same entry, or while a reader holds it open, is retried for a moment before the step reports it as not written.
`cache.mode` is `off`, `read-only`, or `read-write`. Unset, it is `read-write` locally and `read-only` when `CI` is set. `cache.strict` fails a recording that no longer matches with `REPLAY_STALE` instead of running the step live. Under `cache.strict`, retries replay too, and the run never writes the cache. `cache.dir` resolves against the config file's directory. `E2E_CACHE_DIR` replaces it, so checkouts and worktrees of one project can share a replay cache without editing the config; the mode stays as configured. `E2E_CACHE_DIR_OVERRIDE` is upstream's `--cache-dir` for one run and wins over both (.NET-only name; the flag itself is on `e2e cache`). `E2E_NO_CACHE=1` (or `true`) is upstream's `--no-cache`: for that run the cache is `off` whatever the config says, in CI too and beside a `cache.store`, so each step still runs and calls the model instead of replaying cached actions, and nothing is recorded or evicted. Use it to evaluate a new model, or to run a test once live after it passes. A replay cache of your own (upstream's `cache.store`, an `IStepCache`) replaces the file store: it is code, so set it with `E2EConfig.WithCacheStore(store)`, not in `e2e.config.json`. An `IStepCache` has `Writable` (upstream's `CacheStore.writable`: false when the store never writes or deletes), `Read`, `Delete`, and `Write`, which returns the entry's size in bytes, or `null` when it did not write (upstream's `{ bytes } | undefined`); a confirmed recording whose `Write` returns `null` is reported as not written, not saved. A store written against the older `void Write` and with no `Writable` no longer compiles: add `Writable`, and return the bytes or `null` from `Write`. A store has no directory, so it ignores `E2E_CACHE_DIR`, and CI does not turn an unset mode into `read-only` (the store states its own trust). The file store (`FileStepCache`) takes upstream's `maxBytes` and `writable` as `new FileStepCache(directory, maxBytes, writable)`: an entry over the byte cap (at most 1 MiB, `FileStepCache.MaxCacheWireBytes`) is not written and reads as invalid, and a store that is not writable never writes or deletes (its `Write` returns `null`). Parallel runs can share the directory: each write replaces its entry file atomically, and two writers on one key leave the last write. On Windows, a write the file system refuses while another write replaces the same entry, or while a reader holds it open, is retried for a moment before the step reports it as not written.

A step that changes nothing on screen or in the route records nothing (`no-change`), and so does a step whose only change is inside a frame from another site: the agent's observation leaves that frame out, so such a step runs live on every run.

Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/reference/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ See [Caching and self-healing](/features/caching/).

#### `E2E_NO_CACHE`

Upstream's `--no-cache`, for one run. Set to `1` or `true`, it turns the cache `off`: nothing replays and nothing is recorded or evicted, so the live agent runs every step.
Upstream's `--no-cache`, for one run. Set to `1` or `true`, it turns the cache `off`: nothing replays and nothing is recorded or evicted. Each step still runs and calls the model instead of replaying cached actions.
Comment thread
kblok marked this conversation as resolved.
Resolved

- It overrides `cache.mode`, including an explicit `read-write`, and applies in CI.
- It overrides a custom `cache.store` too.
Expand Down
3 changes: 2 additions & 1 deletion skills/e2e-dotnet/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ lines you changed:
`off`: `off` sends every goal to the model again. To run once against the live
agent (a new model, or the one live run after a test passes), set
`E2E_NO_CACHE=1` for that run: it turns the cache `off` over the config, in CI
too, and records nothing. `E2E_CACHE_DIR_OVERRIDE=<dir>` is upstream's `--cache-dir` for
too, and records nothing. Each step still runs and calls the model instead of
replaying cached actions. `E2E_CACHE_DIR_OVERRIDE=<dir>` is upstream's `--cache-dir` for
that run (over `E2E_CACHE_DIR` and `cache.dir`). Only a `read-write` cache
records: the local default, but not with `CI` set and no cache mode in the
config, nor under `cache.strict`. A cache of your own is an `IStepCache` set with
Expand Down
4 changes: 2 additions & 2 deletions skills/e2e-dotnet/references/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Entries live under `cache.dir` (`.e2e/cache/` by default), one file per key
it resolves from the config file's directory, a leading `~` or `~/` is the
home directory, a blank value is ignored, and the mode stays as configured.
`E2E_NO_CACHE=1` (or `true`) is upstream's `--no-cache`: it runs with the cache
`off` whatever the config says, in CI too, so every step runs on the live agent
and nothing is recorded or evicted. Use it to evaluate a new model, or for the
`off` whatever the config says, in CI too. Each step still runs, and calls the
model instead of replaying cached actions; nothing is recorded or evicted. Use it to evaluate a new model, or for the
one live run after a test passes.
`E2E_CACHE_DIR_OVERRIDE` is upstream's `--cache-dir` for one run: it wins over
`E2E_CACHE_DIR` and `cache.dir`, `~` is the home directory, a blank value is
Expand Down
Loading