Test the surface a consumer meets.
Lemire calls the method "ephemeral testing." Build a temporary application or layer on top of the component under review. Judge how well that temporary software works, then throw it away. He argues that clean application programming interfaces, stable invariants, and useful errors help the agent build quickly. Hidden state, surprising defaults, and incomplete documentation produce patches and failures instead.[1]
This tests a different question than a unit test. A unit test checks a behavior selected by the component author. A throwaway consumer asks whether a new user can find the route, combine the parts, and recover when the happy path breaks.
The disposable client is the probe. The friction log is the evidence.
Fresh does not mean unpinned.
A clean checkout can still produce a meaningless result if it downloads moving dependencies, reads host state, or starts with an undocumented toolchain. Bazel's hermeticity guide defines a hermetic build as one that returns the same output for the same source and configuration. It isolates the build from host software and pins tools and dependencies.[2]
Record the component revision, tool versions, dependency lock, environment image, task, prompt or instruction, and network policy. If the agent retries, save each attempt. A final working screenshot hides the exact detours this test is supposed to reveal.
Do not confuse disposable code with disposable infrastructure.
Testcontainers documents both per-suite containers and a singleton pattern that reuses containers across integration test classes. Its guide warns that starting a new container for every test is resource intensive.[3] The temporary thing can be the consumer code while the pinned test service stays warm.
VS Code 1.140 adds another lifecycle choice for agent work. Its release notes say an idle Dev Container stops after five minutes, restarts when work resumes, and is removed when the last session is marked done or deleted.[4] That is workspace cleanup. It does not prove that two runs used identical inputs.
Keep the test narrow enough to compare.
- Pick one consumer job the component claims to support.
- Start from a fresh checkout with pinned tools and dependencies.
- Give the agent a fixed budget for attempts, time, and network use.
- Save commands, errors, patches, retries, and the final result.
- Discard the consumer code. File the friction against the component revision.
Repeat the same job with another agent or another fresh run if you want a comparison. Keep the task and foundation fixed. Otherwise you have two anecdotes that share a label.