fix(examples): bypass cache when running a single example directly#55
Merged
richardsolomou merged 1 commit intomainfrom Apr 24, 2026
Merged
Conversation
When the user invokes run-examples.sh with a name filter that resolves to exactly one match, they're running that example on purpose — caching the previous pass and skipping it is surprising. Batch runs and fuzzy filters matching multiple examples still use the cache. Generated-By: PostHog Code Task-Id: 8eea9ca1-1939-4c59-b12a-92784f5b7238
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When invoking
run-examples.shwith a name filter that resolves to exactly one example (e.g../run-examples.sh openai/embeddings), the runner would silently skip execution if the example was already cached from a previous passing run. If you're running a specific example by name, you almost certainly want it to actually run.Changes
RERUN=1in the single-match branch of the name-based matcher so the cache check is bypassed.Batch runs (
--all,--parallel, or fuzzy filters matching multiple examples) still respect the cache.How did you test this code?
Manual: ran
./run-examples.sh <name>for a cached example and confirmed it re-executed rather than reporting "cached".Created with PostHog Code