@vzn/vx 0.0.569 → 0.0.571

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx",
3
- "version": "0.0.569",
3
+ "version": "0.0.571",
4
4
  "description": "The fastest task runner and build cache for JavaScript monorepos.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,10 +21,10 @@
21
21
  "node": ">=18"
22
22
  },
23
23
  "optionalDependencies": {
24
- "@vzn/vx-linux-x64": "0.0.569",
25
- "@vzn/vx-linux-arm64": "0.0.569",
26
- "@vzn/vx-darwin-x64": "0.0.569",
27
- "@vzn/vx-darwin-arm64": "0.0.569"
24
+ "@vzn/vx-linux-x64": "0.0.571",
25
+ "@vzn/vx-linux-arm64": "0.0.571",
26
+ "@vzn/vx-darwin-x64": "0.0.571",
27
+ "@vzn/vx-darwin-arm64": "0.0.571"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/show.ts CHANGED
@@ -338,6 +338,7 @@ function taskBlock(taskName: string, raw: TaskConfig): string {
338
338
  .map(([k, v]) => `${k}=${v}`)
339
339
  .join(', '),
340
340
  )
341
+ add('env.secret', list(exec?.env?.secret))
341
342
  add('remote', exec?.remote === undefined ? undefined : String(exec.remote))
342
343
  add('sandbox', exec?.sandbox === undefined ? undefined : JSON.stringify(exec.sandbox))
343
344
  const persistent = exec?.persistent
@@ -347,6 +348,7 @@ function taskBlock(taskName: string, raw: TaskConfig): string {
347
348
  persistent.readyWhen === undefined ? 'yes' : `readyWhen: ${persistent.readyWhen}`,
348
349
  )
349
350
  }
351
+ add('interactive', exec?.interactive === undefined ? undefined : exec.interactive ? 'yes' : 'no')
350
352
  const cache = task.cache
351
353
  if (cache !== undefined) {
352
354
  add('inputs.files', list(cache.inputs.files))
@@ -428,7 +428,31 @@ function unchangedKeyNote(
428
428
  if (createdAt !== undefined && createdAt >= this_.startedAt) {
429
429
  return 'cache key unchanged — no entry for this key was in the cache when it ran (pruned or evicted), so it executed and saved one'
430
430
  }
431
- return 'cache key unchanged — re-executed on the same key (--no-cache / --force, or unrelated)'
431
+ // The flags that skip a read were ruled out above whenever the policy was
432
+ // recorded; blaming them here named a flag the policy shows was not passed
433
+ // when the previous run's save had failed (X-46). No row records a failed
434
+ // save, only its trace: the previous run executed, succeeded, and no entry
435
+ // holds the key.
436
+ if (policy === undefined) {
437
+ return 'cache key unchanged — re-executed on the same key (--no-cache / --force, or unrelated)'
438
+ }
439
+ if (createdAt === undefined && prev.status === 'success' && prev.cacheHit === 0) {
440
+ const prevPolicy =
441
+ prev.runId === null
442
+ ? undefined
443
+ : (
444
+ db
445
+ .query('SELECT cache_policy AS p FROM invocations WHERE run_id = ?')
446
+ .get(prev.runId) as {
447
+ p: string
448
+ } | null
449
+ )?.p
450
+ if (prevPolicy !== undefined && !prevPolicy.split(',').some((a) => a === 'lW' || a === 'rW')) {
451
+ return 'cache key unchanged — the previous run on this key did not write the cache (--no-cache, or a --cache without write), so there was nothing to hit'
452
+ }
453
+ return 'cache key unchanged — the previous run on this key executed but no entry for it is in the cache (its save failed, or it was pruned since), so there was nothing to hit'
454
+ }
455
+ return 'cache key unchanged — re-executed on the same key though this run read the cache; vx cannot name the cause'
432
456
  }
433
457
 
434
458
  /**