返回 CodeWhale
cases.json
根目录 / crates / tui / src / computer_meter / fixtures / cases.json
1 {
2 "schema": "codewhale.computer-meter-fixtures/v1",
3 "note": "Hermetic Daytona-shaped observations. No live provider calls.",
4 "cases": [
5 {
6 "id": "accepted-standard-8",
7 "expect": "receipt",
8 "acceptedSeconds": 600,
9 "standardEquivalentSeconds": 600,
10 "admission": {
11 "admissionId": "adm_std8_001",
12 "accountId": "acct_demo",
13 "computerId": "cmp_8gb_a",
14 "runId": "run_demo_1",
15 "provider": "daytona",
16 "profileId": "standard-8",
17 "fundingAuthority": "coding_membership_included",
18 "quoteId": "quote_std8_001",
19 "expiresAt": "2026-08-31T18:00:00.000Z"
20 },
21 "observation": {
22 "provider": "daytona",
23 "providerSandboxId": "sbox_std8_a",
24 "providerEventRef": "daytona:sbox_std8_a:running:2026-08-31T12:00:00.000Z",
25 "state": "running",
26 "idle": false,
27 "providerAccepted": true,
28 "meterBasis": "provider_accepted_active",
29 "cpu": 2,
30 "memoryGiB": 8,
31 "diskGiB": 8,
32 "startedAt": "2026-08-31T12:00:00.000Z",
33 "endedAt": "2026-08-31T12:10:00.000Z"
34 }
35 },
36 {
37 "id": "accepted-standard-16",
38 "expect": "receipt",
39 "acceptedSeconds": 600,
40 "standardEquivalentSeconds": 1200,
41 "admission": {
42 "admissionId": "adm_std16_001",
43 "accountId": "acct_demo",
44 "computerId": "cmp_16gb_a",
45 "runId": "run_demo_2",
46 "provider": "daytona",
47 "profileId": "standard-16",
48 "fundingAuthority": "coding_membership_included",
49 "quoteId": "quote_std16_001",
50 "expiresAt": "2026-08-31T18:00:00.000Z"
51 },
52 "observation": {
53 "provider": "daytona",
54 "providerSandboxId": "sbox_std16_a",
55 "providerEventRef": "daytona:sbox_std16_a:running:2026-08-31T12:00:00.000Z",
56 "state": "running",
57 "idle": false,
58 "providerAccepted": true,
59 "meterBasis": "provider_accepted_active",
60 "cpu": 4,
61 "memoryGiB": 16,
62 "diskGiB": 16,
63 "startedAt": "2026-08-31T12:00:00.000Z",
64 "endedAt": "2026-08-31T12:10:00.000Z"
65 }
66 },
67 {
68 "id": "accepted-standard-32",
69 "expect": "receipt",
70 "acceptedSeconds": 600,
71 "standardEquivalentSeconds": 2400,
72 "admission": {
73 "admissionId": "adm_std32_001",
74 "accountId": "acct_demo",
75 "computerId": "cmp_32gb_a",
76 "runId": "run_demo_3",
77 "provider": "daytona",
78 "profileId": "standard-32",
79 "fundingAuthority": "computer_time_pack",
80 "quoteId": "quote_std32_001",
81 "expiresAt": "2026-08-31T18:00:00.000Z"
82 },
83 "observation": {
84 "provider": "daytona",
85 "providerSandboxId": "sbox_std32_a",
86 "providerEventRef": "daytona:sbox_std32_a:running:2026-08-31T12:00:00.000Z",
87 "state": "running",
88 "idle": false,
89 "providerAccepted": true,
90 "meterBasis": "provider_accepted_active",
91 "cpu": 8,
92 "memoryGiB": 32,
93 "diskGiB": 32,
94 "startedAt": "2026-08-31T12:00:00.000Z",
95 "endedAt": "2026-08-31T12:10:00.000Z"
96 }
97 },
98 {
99 "id": "per-second-no-minute-floor",
100 "expect": "receipt",
101 "acceptedSeconds": 11,
102 "standardEquivalentSeconds": 11,
103 "admission": {
104 "admissionId": "adm_std8_subminute",
105 "accountId": "acct_demo",
106 "computerId": "cmp_8gb_b",
107 "runId": "run_demo_4",
108 "provider": "daytona",
109 "profileId": "standard-8",
110 "fundingAuthority": "coding_membership_included",
111 "quoteId": "quote_std8_subminute",
112 "expiresAt": "2026-08-31T18:00:00.000Z"
113 },
114 "observation": {
115 "provider": "daytona",
116 "providerSandboxId": "sbox_std8_b",
117 "providerEventRef": "daytona:sbox_std8_b:running:2026-08-31T12:00:00.000Z",
118 "state": "running",
119 "idle": false,
120 "providerAccepted": true,
121 "meterBasis": "provider_accepted_active",
122 "cpu": 2,
123 "memoryGiB": 8,
124 "diskGiB": 8,
125 "startedAt": "2026-08-31T12:00:00.000Z",
126 "endedAt": "2026-08-31T12:00:11.400Z"
127 }
128 },
129 {
130 "id": "idle-wall-clock",
131 "expect": "error",
132 "code": "computer_meter_wall_clock_idle",
133 "admission": {
134 "admissionId": "adm_std8_idle",
135 "accountId": "acct_demo",
136 "computerId": "cmp_8gb_idle",
137 "runId": "run_demo_idle",
138 "provider": "daytona",
139 "profileId": "standard-8",
140 "fundingAuthority": "coding_membership_included",
141 "quoteId": "quote_std8_idle",
142 "expiresAt": "2026-08-31T18:00:00.000Z"
143 },
144 "observation": {
145 "provider": "daytona",
146 "providerSandboxId": "sbox_idle",
147 "providerEventRef": "daytona:sbox_idle:wall-clock:2026-08-31T12:00:00.000Z",
148 "state": "running",
149 "idle": true,
150 "providerAccepted": true,
151 "meterBasis": "wall_clock",
152 "cpu": 2,
153 "memoryGiB": 8,
154 "diskGiB": 8,
155 "startedAt": "2026-08-31T12:00:00.000Z",
156 "endedAt": "2026-08-31T13:00:00.000Z"
157 }
158 },
159 {
160 "id": "queued-not-accepted",
161 "expect": "error",
162 "code": "computer_meter_not_provider_accepted_active",
163 "admission": {
164 "admissionId": "adm_std8_queued",
165 "accountId": "acct_demo",
166 "computerId": "cmp_8gb_queued",
167 "runId": "run_demo_queued",
168 "provider": "daytona",
169 "profileId": "standard-8",
170 "fundingAuthority": "coding_membership_included",
171 "quoteId": "quote_std8_queued",
172 "expiresAt": "2026-08-31T18:00:00.000Z"
173 },
174 "observation": {
175 "provider": "daytona",
176 "providerSandboxId": "sbox_queued",
177 "providerEventRef": "daytona:sbox_queued:queued:2026-08-31T12:00:00.000Z",
178 "state": "queued",
179 "idle": false,
180 "providerAccepted": false,
181 "meterBasis": "provider_accepted_active",
182 "cpu": 2,
183 "memoryGiB": 8,
184 "diskGiB": 8,
185 "startedAt": "2026-08-31T12:00:00.000Z",
186 "endedAt": "2026-08-31T12:02:00.000Z"
187 }
188 },
189 {
190 "id": "stopped-storage-tail",
191 "expect": "error",
192 "code": "computer_meter_not_provider_accepted_active",
193 "admission": {
194 "admissionId": "adm_std8_stopped",
195 "accountId": "acct_demo",
196 "computerId": "cmp_8gb_stopped",
197 "runId": "run_demo_stopped",
198 "provider": "daytona",
199 "profileId": "standard-8",
200 "fundingAuthority": "coding_membership_included",
201 "quoteId": "quote_std8_stopped",
202 "expiresAt": "2026-08-31T18:00:00.000Z"
203 },
204 "observation": {
205 "provider": "daytona",
206 "providerSandboxId": "sbox_stopped",
207 "providerEventRef": "daytona:sbox_stopped:stopped:2026-08-31T12:10:00.000Z",
208 "state": "stopped",
209 "idle": false,
210 "providerAccepted": true,
211 "meterBasis": "provider_accepted_active",
212 "cpu": 2,
213 "memoryGiB": 8,
214 "diskGiB": 8,
215 "startedAt": "2026-08-31T12:10:00.000Z",
216 "endedAt": "2026-08-31T13:10:00.000Z"
217 }
218 },
219 {
220 "id": "teardown-tail",
221 "expect": "error",
222 "code": "computer_meter_not_provider_accepted_active",
223 "admission": {
224 "admissionId": "adm_std8_teardown",
225 "accountId": "acct_demo",
226 "computerId": "cmp_8gb_teardown",
227 "runId": "run_demo_teardown",
228 "provider": "daytona",
229 "profileId": "standard-8",
230 "fundingAuthority": "coding_membership_included",
231 "quoteId": "quote_std8_teardown",
232 "expiresAt": "2026-08-31T18:00:00.000Z"
233 },
234 "observation": {
235 "provider": "daytona",
236 "providerSandboxId": "sbox_teardown",
237 "providerEventRef": "daytona:sbox_teardown:teardown:2026-08-31T12:10:00.000Z",
238 "state": "teardown",
239 "idle": false,
240 "providerAccepted": true,
241 "meterBasis": "provider_accepted_active",
242 "cpu": 2,
243 "memoryGiB": 8,
244 "diskGiB": 8,
245 "startedAt": "2026-08-31T12:10:00.000Z",
246 "endedAt": "2026-08-31T12:10:45.000Z"
247 }
248 },
249 {
250 "id": "undersized-rollback-small",
251 "expect": "error",
252 "code": "computer_meter_allocation_mismatch",
253 "admission": {
254 "admissionId": "adm_std8_undersize",
255 "accountId": "acct_demo",
256 "computerId": "cmp_8gb_undersize",
257 "runId": "run_demo_undersize",
258 "provider": "daytona",
259 "profileId": "standard-8",
260 "fundingAuthority": "coding_membership_included",
261 "quoteId": "quote_std8_undersize",
262 "expiresAt": "2026-08-31T18:00:00.000Z"
263 },
264 "observation": {
265 "provider": "daytona",
266 "providerSandboxId": "sbox_undersize",
267 "providerEventRef": "daytona:sbox_undersize:running:2026-08-31T12:00:00.000Z",
268 "state": "running",
269 "idle": false,
270 "providerAccepted": true,
271 "meterBasis": "provider_accepted_active",
272 "cpu": 2,
273 "memoryGiB": 4,
274 "diskGiB": 8,
275 "startedAt": "2026-08-31T12:00:00.000Z",
276 "endedAt": "2026-08-31T12:10:00.000Z"
277 }
278 },
279 {
280 "id": "oversize-not-an-upgrade",
281 "expect": "error",
282 "code": "computer_meter_allocation_mismatch",
283 "admission": {
284 "admissionId": "adm_std8_oversize",
285 "accountId": "acct_demo",
286 "computerId": "cmp_8gb_oversize",
287 "runId": "run_demo_oversize",
288 "provider": "daytona",
289 "profileId": "standard-8",
290 "fundingAuthority": "coding_membership_included",
291 "quoteId": "quote_std8_oversize",
292 "expiresAt": "2026-08-31T18:00:00.000Z"
293 },
294 "observation": {
295 "provider": "daytona",
296 "providerSandboxId": "sbox_oversize",
297 "providerEventRef": "daytona:sbox_oversize:running:2026-08-31T12:00:00.000Z",
298 "state": "running",
299 "idle": false,
300 "providerAccepted": true,
301 "meterBasis": "provider_accepted_active",
302 "cpu": 4,
303 "memoryGiB": 16,
304 "diskGiB": 16,
305 "startedAt": "2026-08-31T12:00:00.000Z",
306 "endedAt": "2026-08-31T12:10:00.000Z"
307 }
308 },
309 {
310 "id": "concurrent-two-standard-8",
311 "expect": "sum",
312 "standardEquivalentSeconds": 1200,
313 "intervals": [
314 {
315 "admission": {
316 "admissionId": "adm_std8_conc_a",
317 "accountId": "acct_demo",
318 "computerId": "cmp_8gb_conc_a",
319 "runId": "run_conc_a",
320 "provider": "daytona",
321 "profileId": "standard-8",
322 "fundingAuthority": "coding_membership_included",
323 "quoteId": "quote_conc_a",
324 "expiresAt": "2026-08-31T18:00:00.000Z"
325 },
326 "observation": {
327 "provider": "daytona",
328 "providerSandboxId": "sbox_conc_a",
329 "providerEventRef": "daytona:sbox_conc_a:running:2026-08-31T12:00:00.000Z",
330 "state": "running",
331 "idle": false,
332 "providerAccepted": true,
333 "meterBasis": "provider_accepted_active",
334 "cpu": 2,
335 "memoryGiB": 8,
336 "diskGiB": 8,
337 "startedAt": "2026-08-31T12:00:00.000Z",
338 "endedAt": "2026-08-31T12:10:00.000Z"
339 }
340 },
341 {
342 "admission": {
343 "admissionId": "adm_std8_conc_b",
344 "accountId": "acct_demo",
345 "computerId": "cmp_8gb_conc_b",
346 "runId": "run_conc_b",
347 "provider": "daytona",
348 "profileId": "standard-8",
349 "fundingAuthority": "coding_membership_included",
350 "quoteId": "quote_conc_b",
351 "expiresAt": "2026-08-31T18:00:00.000Z"
352 },
353 "observation": {
354 "provider": "daytona",
355 "providerSandboxId": "sbox_conc_b",
356 "providerEventRef": "daytona:sbox_conc_b:running:2026-08-31T12:00:00.000Z",
357 "state": "running",
358 "idle": false,
359 "providerAccepted": true,
360 "meterBasis": "provider_accepted_active",
361 "cpu": 2,
362 "memoryGiB": 8,
363 "diskGiB": 8,
364 "startedAt": "2026-08-31T12:00:00.000Z",
365 "endedAt": "2026-08-31T12:10:00.000Z"
366 }
367 }
368 ]
369 },
370 {
371 "id": "historic-large-readable",
372 "expect": "decode",
373 "profileInput": "large",
374 "profileId": "standard-16",
375 "multiplier": 2
376 },
377 {
378 "id": "historic-large-not-admissible",
379 "expect": "admit_error",
380 "profileInput": "large",
381 "code": "computer_profile_historic_not_admissible"
382 },
383 {
384 "id": "append-only-correction",
385 "expect": "correction",
386 "acceptedSeconds": 590,
387 "standardEquivalentSeconds": 590,
388 "admission": {
389 "admissionId": "adm_std8_corr",
390 "accountId": "acct_demo",
391 "computerId": "cmp_8gb_corr",
392 "runId": "run_demo_corr",
393 "provider": "daytona",
394 "profileId": "standard-8",
395 "fundingAuthority": "coding_membership_included",
396 "quoteId": "quote_std8_corr",
397 "expiresAt": "2026-08-31T18:00:00.000Z"
398 },
399 "observation": {
400 "provider": "daytona",
401 "providerSandboxId": "sbox_corr",
402 "providerEventRef": "daytona:sbox_corr:running:2026-08-31T12:00:00.000Z",
403 "state": "running",
404 "idle": false,
405 "providerAccepted": true,
406 "meterBasis": "provider_accepted_active",
407 "cpu": 2,
408 "memoryGiB": 8,
409 "diskGiB": 8,
410 "startedAt": "2026-08-31T12:00:00.000Z",
411 "endedAt": "2026-08-31T12:10:00.000Z"
412 },
413 "restatedObservation": {
414 "provider": "daytona",
415 "providerSandboxId": "sbox_corr",
416 "providerEventRef": "daytona:sbox_corr:running:2026-08-31T12:00:00.000Z:restated",
417 "state": "running",
418 "idle": false,
419 "providerAccepted": true,
420 "meterBasis": "provider_accepted_active",
421 "cpu": 2,
422 "memoryGiB": 8,
423 "diskGiB": 8,
424 "startedAt": "2026-08-31T12:00:00.000Z",
425 "endedAt": "2026-08-31T12:09:50.000Z"
426 }
427 }
428 ]
429 }
430
430 lines JSON