@vzn/vx 0.0.556 → 0.0.557

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.556",
3
+ "version": "0.0.557",
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.556",
25
- "@vzn/vx-linux-arm64": "0.0.556",
26
- "@vzn/vx-darwin-x64": "0.0.556",
27
- "@vzn/vx-darwin-arm64": "0.0.556"
24
+ "@vzn/vx-linux-x64": "0.0.557",
25
+ "@vzn/vx-linux-arm64": "0.0.557",
26
+ "@vzn/vx-darwin-x64": "0.0.557",
27
+ "@vzn/vx-darwin-arm64": "0.0.557"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -692,10 +692,17 @@ export async function cleanOutputPaths(args: {
692
692
  await pruneEmptiedDirs(args.projectDir, await removeAll(files, args.projectDir))
693
693
  }
694
694
 
695
- /** A file's identity for the additive diff: what the hit path's fingerprint trusts too. */
695
+ /**
696
+ * A file's identity for the additive diff: what the hit path's
697
+ * `isOutputsCurrent` trusts too. Size and mtime alone missed a rewrite to
698
+ * bytes of the same length with the mtime stamped back; the inode and
699
+ * ctime are what no task sets (item 886).
700
+ */
696
701
  export interface OutputStamp {
697
702
  size: number
698
703
  mtimeMs: number
704
+ ino: number
705
+ ctimeMs: number
699
706
  }
700
707
 
701
708
  /**
@@ -724,7 +731,7 @@ function stampFiles(files: readonly string[]): Map<string, OutputStamp> {
724
731
  for (const f of files) {
725
732
  try {
726
733
  const st = lstatSync(f)
727
- out.set(f, { size: st.size, mtimeMs: st.mtimeMs })
734
+ out.set(f, { size: st.size, mtimeMs: st.mtimeMs, ino: st.ino, ctimeMs: st.ctimeMs })
728
735
  } catch {
729
736
  // Gone between the walk and the stat: not a file the task found.
730
737
  }
@@ -734,10 +741,10 @@ function stampFiles(files: readonly string[]): Map<string, OutputStamp> {
734
741
 
735
742
  /**
736
743
  * The files an additive task's run ADDED or CHANGED under its declared
737
- * outputs: every selected file that was not in `before`, or whose size or
738
- * mtime moved. Size + mtime is the proof the hit path already trusts for
739
- * a current tree, so no new trust is introduced. A file the run rewrote
740
- * with identical bytes counts as its own (the mtime moved), which is the
744
+ * outputs: every selected file that was not in `before`, or whose stamp
745
+ * (`OutputStamp`) moved — the proof the hit path trusts for a current
746
+ * tree, so no new trust is introduced. A file the run rewrote, even with
747
+ * identical bytes, counts as its own (its ctime moved), which is the
741
748
  * rewrite-in-place cost the design note records.
742
749
  *
743
750
  * Undefined when the run REMOVED a file it found: an artifact holds what a
@@ -774,7 +781,13 @@ function changedSince(
774
781
  try {
775
782
  const st = lstatSync(f)
776
783
  kept++
777
- if (st.size !== was.size || st.mtimeMs !== was.mtimeMs) own.push(f)
784
+ if (
785
+ st.size !== was.size ||
786
+ st.mtimeMs !== was.mtimeMs ||
787
+ st.ino !== was.ino ||
788
+ st.ctimeMs !== was.ctimeMs
789
+ )
790
+ own.push(f)
778
791
  } catch {
779
792
  // Vanished since the walk: removed, as one the walk missed is.
780
793
  }