@vzn/vx 0.0.55 → 0.0.56

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.55",
3
+ "version": "0.0.56",
4
4
  "description": "An open, extensible monorepo task runner.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,10 +17,10 @@
17
17
  "node": ">=18"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@vzn/vx-linux-x64": "0.0.55",
21
- "@vzn/vx-linux-arm64": "0.0.55",
22
- "@vzn/vx-darwin-x64": "0.0.55",
23
- "@vzn/vx-darwin-arm64": "0.0.55"
20
+ "@vzn/vx-linux-x64": "0.0.56",
21
+ "@vzn/vx-linux-arm64": "0.0.56",
22
+ "@vzn/vx-darwin-x64": "0.0.56",
23
+ "@vzn/vx-darwin-arm64": "0.0.56"
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -1655,13 +1655,17 @@ export class Cache implements CacheLayer {
1655
1655
  * orphan sweep alone when an hour has passed since the last one. A run
1656
1656
  * with nothing due pays the accessed-at flush it owed at close anyway, one
1657
1657
  * scan of the index and one read of the sweep's clock — never the
1658
- * sweep's readdir. Null when nothing was due or this handle does not write.
1658
+ * sweep's readdir. Null when nothing was due or the directory is not this
1659
+ * handle's to write. The local WRITE axis does not gate it: under
1660
+ * `--cache=local:r,remote:rw` a save writes nothing here, but every remote
1661
+ * hit is still ingested (`ingest`, ungated by design), and gated on that
1662
+ * axis the retention never ran while the store grew hit by hit (A-7).
1659
1663
  */
1660
1664
  async evictIfDue(
1661
1665
  policy: { maxAgeMs?: number; maxBytes?: number },
1662
1666
  now: number = Date.now(),
1663
1667
  ): Promise<PruneResult | null> {
1664
- if (!this.write) return null
1668
+ if (this.writeBlocked !== null || this.inspecting) return null
1665
1669
  // First: an entry this run restored still carries its old `accessed_at`
1666
1670
  // until the deferred bump lands, and would read as due for eviction.
1667
1671
  this.flushAccessed()
@@ -3,11 +3,13 @@
3
3
  // Two vx processes on one workspace race on every task's OUTPUT TREE: both
4
4
  // clean and restore the same `dist/`, and a clean landing while the other
5
5
  // run's restore is staging takes its files out from under it (item 215).
6
- // The cache itself is safe (SQLite waits, artifacts land by rename); the
7
- // tree is not, and a run that finished "green" can have had its restored
8
- // outputs deleted by the other run's clean a moment later. So a run takes
9
- // this lock before it schedules and releases it with its cache handle —
10
- // before a persistent task's wait, so a dev server never holds it.
6
+ // The cache itself is safe (SQLite waits, and an artifact lands by rename
7
+ // inside its rows' transaction, A-3), across workspaces sharing one
8
+ // `--cache-dir` too; the tree is not, and a run that finished "green" can
9
+ // have had its restored outputs deleted by the other run's clean a moment
10
+ // later. So a run takes this lock before it schedules and releases it with
11
+ // its cache handle — before a persistent task's wait, so a dev server never
12
+ // holds it.
11
13
  //
12
14
  // Keyed by the workspace, not the cache directory (`--cache-dir` must not
13
15
  // make two runs strangers), and kept under the temp directory so a
@@ -1192,7 +1192,9 @@ async function applyCacheRetention(prepared: PreparedRun, log: Logger): Promise<
1192
1192
  * existence check — no artifact download, no ingest, no accessed_at bump.
1193
1193
  */
1194
1194
  export async function planRun(options: RunOptions): Promise<RunPlan> {
1195
- const log = options.log ?? defaultLogger()
1195
+ // The plan is the product and goes to stdout (`--dry=json` is parsed):
1196
+ // what a stage says on the way goes to stderr (C-6).
1197
+ const log = options.log ?? defaultLogger(undefined, undefined, process.stderr)
1196
1198
  const prepared = await prepareRun(options, log)
1197
1199
  try {
1198
1200
  if (prepared.unresolvedTasks.length > 0) {