44# - Files matching the glob trigger cache invalidation
55# - Files outside the glob do NOT trigger cache invalidation
66[[e2e ]]
7- name = " positive globs only - cache hit on second run "
7+ name = " positive globs only"
88steps = [
9- # First run - cache miss
109 " vp run positive-globs-only" ,
11- # Second run - cache hit
10+ # Cache hit on second run
1211 " vp run positive-globs-only" ,
13- ]
14-
15- [[e2e ]]
16- name = " positive globs only - miss on matched file change"
17- steps = [
18- # Initial run
12+ # Modify a file that does NOT match the glob (test/ is outside src/)
13+ " replace-file-content test/main.test.ts outside modified" ,
14+ # Cache hit: file not in inputs
1915 " vp run positive-globs-only" ,
2016 # Modify a file that matches the glob
2117 " replace-file-content src/main.ts initial modified" ,
2218 # Cache miss: matched file changed
2319 " vp run positive-globs-only" ,
2420]
2521
26- [[e2e ]]
27- name = " positive globs only - hit on unmatched file change"
28- steps = [
29- # Initial run
30- " vp run positive-globs-only" ,
31- # Modify a file that does NOT match the glob (test/ is outside src/)
32- " replace-file-content test/main.test.ts outside modified" ,
33- # Cache hit: file not in inputs
34- " vp run positive-globs-only" ,
35- ]
36-
3722# 1b. Positive globs reads unmatched file: inputs: ["src/main.ts"], command reads src/utils.ts too
3823# - File read by command but NOT matched by glob should NOT be fingerprinted
3924# - This tests that inference is truly disabled when only explicit globs are used
@@ -52,71 +37,49 @@ steps = [
5237# - Files matching positive but NOT negative trigger invalidation
5338# - Files matching negative glob are excluded
5439[[e2e ]]
55- name = " positive negative globs - miss on non-excluded file "
40+ name = " positive negative globs"
5641steps = [
57- # Initial run
58- " vp run positive-negative-globs" ,
59- # Modify a file that matches positive but NOT negative
60- " replace-file-content src/main.ts initial modified" ,
61- # Cache miss: file changed
62- " vp run positive-negative-globs" ,
63- ]
64-
65- [[e2e ]]
66- name = " positive negative globs - hit on excluded file"
67- steps = [
68- # Initial run
6942 " vp run positive-negative-globs" ,
7043 # Modify a file that matches the negative glob (excluded)
7144 " replace-file-content src/main.test.ts main modified" ,
7245 # Cache hit: file excluded by negative glob
7346 " vp run positive-negative-globs" ,
47+ # Modify a file that matches positive but NOT negative
48+ " replace-file-content src/main.ts initial modified" ,
49+ # Cache miss: file changed
50+ " vp run positive-negative-globs" ,
7451]
7552
7653# 3. Auto only: inputs: [{ "auto": true }]
7754# - Files read by the command trigger invalidation (fspy inference)
7855# - Files NOT read by the command do NOT trigger invalidation
7956[[e2e ]]
80- name = " auto only - miss on inferred file change"
81- steps = [
82- # Initial run - reads src/main.ts
83- " vp run auto-only" ,
84- # Modify the file that was read
85- " replace-file-content src/main.ts initial modified" ,
86- # Cache miss: inferred input changed
87- " vp run auto-only" ,
88- ]
89-
90- [[e2e ]]
91- name = " auto only - hit on non-inferred file change"
57+ name = " auto only"
9258steps = [
9359 # Initial run - reads src/main.ts (NOT utils.ts)
9460 " vp run auto-only" ,
9561 # Modify a file that was NOT read by the command
9662 " replace-file-content src/utils.ts initial modified" ,
9763 # Cache hit: file not in inferred inputs
9864 " vp run auto-only" ,
65+ # Modify the file that was read
66+ " replace-file-content src/main.ts initial modified" ,
67+ # Cache miss: inferred input changed
68+ " vp run auto-only" ,
9969]
10070
10171# 4. Auto + negative: inputs: [{ "auto": true }, "!dist/**"]
10272# - Inferred files are tracked, but negative globs filter them out
10373# - Files in excluded directories don't trigger invalidation even if read
10474[[e2e ]]
105- name = " auto with negative - hit on excluded inferred file "
75+ name = " auto with negative"
10676steps = [
10777 # Initial run - reads both src/main.ts and dist/output.js
10878 " vp run auto-with-negative" ,
10979 # Modify file in excluded directory (dist/)
11080 " replace-file-content dist/output.js initial modified" ,
11181 # Cache hit: dist/ is excluded by negative glob
11282 " vp run auto-with-negative" ,
113- ]
114-
115- [[e2e ]]
116- name = " auto with negative - miss on non-excluded inferred file"
117- steps = [
118- # Initial run
119- " vp run auto-with-negative" ,
12083 # Modify file NOT in excluded directory
12184 " replace-file-content src/main.ts initial modified" ,
12285 # Cache miss: inferred input changed
@@ -129,7 +92,6 @@ steps = [
12992[[e2e ]]
13093name = " positive auto negative - miss on explicit glob file"
13194steps = [
132- # Initial run
13395 " vp run positive-auto-negative" ,
13496 # Modify explicit input file
13597 " replace-file-content package.json inputs-cache-test modified-pkg" ,
@@ -138,46 +100,30 @@ steps = [
138100]
139101
140102[[e2e ]]
141- name = " positive auto negative - miss on inferred file"
142- steps = [
143- # Initial run
144- " vp run positive-auto-negative" ,
145- # Modify inferred input file (read by command)
146- " replace-file-content src/main.ts initial modified" ,
147- # Cache miss: inferred input changed
148- " vp run positive-auto-negative" ,
149- ]
150-
151- [[e2e ]]
152- name = " positive auto negative - hit on excluded file"
103+ name = " positive auto negative - hit on excluded then miss on inferred"
153104steps = [
154- # Initial run
155105 " vp run positive-auto-negative" ,
156106 # Modify file excluded by negative glob
157107 " replace-file-content src/main.test.ts main modified" ,
158108 # Cache hit: file excluded by negative glob
159109 " vp run positive-auto-negative" ,
110+ # Modify inferred input file (read by command)
111+ " replace-file-content src/main.ts initial modified" ,
112+ # Cache miss: inferred input changed
113+ " vp run positive-auto-negative" ,
160114]
161115
162116# 6. Empty inputs: inputs: []
163117# - No file changes affect the cache
164118# - Only command/env changes trigger cache invalidation
165119[[e2e ]]
166- name = " empty inputs - hit despite file changes "
120+ name = " empty inputs"
167121steps = [
168- # Initial run
169122 " vp run empty-inputs" ,
170123 # Modify any file - should NOT affect cache
171124 " replace-file-content src/main.ts initial modified" ,
172125 # Cache hit: no inputs configured
173126 " vp run empty-inputs" ,
174- ]
175-
176- [[e2e ]]
177- name = " empty inputs - miss on command change"
178- steps = [
179- # Initial run
180- " vp run empty-inputs" ,
181127 # Change the command
182128 " json-edit vite-task.json \" _.tasks['empty-inputs'].command = 'print-file src/utils.ts'\" " ,
183129 # Cache miss: command changed
@@ -188,15 +134,10 @@ steps = [
188134# - FSPY=1 is set when fspy is enabled (includes_auto is true)
189135# - FSPY is NOT set when fspy is disabled (explicit globs only)
190136[[e2e ]]
191- name = " fspy env - set when auto inference enabled "
137+ name = " fspy env"
192138steps = [
193139 # Run task with auto inference - should see FSPY=1
194140 " vp run check-fspy-env-with-auto" ,
195- ]
196-
197- [[e2e ]]
198- name = " fspy env - not set when auto inference disabled"
199- steps = [
200141 # Run task without auto inference - should see (undefined)
201142 " vp run check-fspy-env-without-auto" ,
202143]
0 commit comments