fix(cache): drop the engine version from the replay cache key
Merged
OK
2mo ago+37+37+01234567890123456789-51-51-01234567890123456789
What and why
- Every
chore: version packagesmerge fails the strictweb agentjob on main withREPLAY_STALEon all 25 replayable steps (#825 now, #774 before it, re-recorded in #833). The cache key carried the engine'smajor.minor, and a 0.x engine bumps its minor on every release. - The key now keeps the engine's name and SPI version only. A release of the same engine is caught where it matters: each recorded action re-finds its node against a fresh observation at replay, so a node a new version resolves differently misses then (
relocate.ts). Keying on the version only cold-started recordings for engines that had not changed how a node resolves. - The 30 web benchmark entries move to their new hashes. Each was re-keyed offline: the old key rebuilt from the entry's
recordedForand the agent config hashed to the committed file name for all 30, then the same parts hashed without the engine version. Entry contents are untouched (gitshows 30 renames). - The mobile benchmark entries stay as they are. They were recorded on Sep 23-24 under
conservative/5and the pre-#732 key shape, so they have been stale since #732 and need a real re-record on a Mac, not a re-key (mobile CI does not run strict, so it spends model calls instead of failing). - Docs:
cache.mdx"What must match",writing-an-engine.mdx, the engine reference, and the AGENTS.md note on key changes.
Verified
Ran it locally: yes
pnpm --filter @e2e-dev/web-benchmark run test:agent --strict-cacheagainst the built packages with a dummy gateway key, so a step that reaches the model fails and a replayed one cannot be mistaken for a live run:
| main (#825 CI) | this branch | |
|---|---|---|
REPLAY_STALE | 25 | 0 |
| Replayed | 0 | 26 |
| Handed off | - | 2 |
| Missed | - | 4 |
| Model calls | 8 | 1 (dummy key, rejected) |
The 26/2/4 split is the one #833 recorded. The 7 failures are all MODEL_PROVIDER_FAILED from the dummy key on the handed-off and never-recorded steps; the cache directory was left unchanged by the run.
pnpm --filter e2e exec vitest run --project unit: 2459 passed.lint,typecheck,docs:checkpass.
Checklist
- Changeset added (
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only. - Breaking change: title carries
!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md). - Docs updated in the same PR: the
docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it. - Contract change: emitted
.d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures. - Engine contract change (
e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.