@vzn/vx 0.0.150 → 0.0.151

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.150",
3
+ "version": "0.0.151",
4
4
  "description": "A fast, correct task runner and build cache for JavaScript monorepos.",
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.150",
21
- "@vzn/vx-linux-arm64": "0.0.150",
22
- "@vzn/vx-darwin-x64": "0.0.150",
23
- "@vzn/vx-darwin-arm64": "0.0.150"
20
+ "@vzn/vx-linux-x64": "0.0.151",
21
+ "@vzn/vx-linux-arm64": "0.0.151",
22
+ "@vzn/vx-darwin-x64": "0.0.151",
23
+ "@vzn/vx-darwin-arm64": "0.0.151"
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -144,8 +144,11 @@ export function placeTasks(
144
144
  }
145
145
 
146
146
  /**
147
- * `executorOf` for `planRun`, or nothing. Declining plugins, a single
148
- * executor, or a resolution error all yield nothing: `--dry` is an
147
+ * `executorOf` for `planRun`, or nothing. A remote-only task no remote
148
+ * executor takes is labelled `noop` whatever the executor count: the run
149
+ * does nothing for it, and a plan line without the label promises an
150
+ * execution. Otherwise declining plugins, a single executor, or a
151
+ * resolution error all yield nothing: `--dry` is an
149
152
  * inspection command and must not fail over a label. The error is still
150
153
  * said, on the status line, in the plugin's name: the run this plan
151
154
  * previews would refuse on it, and a plan that hid that would read as
@@ -188,11 +191,15 @@ export async function planExecutorOf(
188
191
  remoteOnly: placements.remoteOnly,
189
192
  })
190
193
  return {
191
- ...(executors.length < 2
194
+ ...(executors.length < 2 && placements.remoteOnlyNoop.size === 0
192
195
  ? {}
193
196
  : {
194
197
  executorOf: (id: string) =>
195
- placements.remoteOnlyNoop.has(id) ? 'noop' : placements.executors.get(id)?.name,
198
+ placements.remoteOnlyNoop.has(id)
199
+ ? 'noop'
200
+ : executors.length < 2
201
+ ? undefined
202
+ : placements.executors.get(id)?.name,
196
203
  }),
197
204
  ...(download === undefined
198
205
  ? {}
@@ -40,7 +40,8 @@ export interface PlannedTask {
40
40
  /**
41
41
  * Name of the executor this task would be PLACED on. Attached only when
42
42
  * the workspace declares more than one executor — with a single one every
43
- * line would carry the same label and say nothing. Absent for group tasks
43
+ * line would carry the same label and say nothing — except `'noop'`: a
44
+ * remote-only task no remote executor takes, which the run skips. Absent for group tasks
44
45
  * and persistent tasks, which never reach an executor.
45
46
  */
46
47
  executor?: string
@@ -105,7 +106,7 @@ export interface PlanArgs {
105
106
  /** When provided, per-task p50s are attached and `RunPlan.predicted` is
106
107
  * computed. Failing open: a history error yields a plan without them. */
107
108
  history?: HistoryProvider
108
- /** Placement lookup (`run.ts`), passed only when >1 executor is declared. */
109
+ /** Placement lookup (`placement.ts`): >1 executor declared, or a `noop` task. */
109
110
  executorOf?: (id: string) => string | undefined
110
111
  }
111
112
 
@@ -212,6 +213,8 @@ function downgradeField(args: PlanArgs): {
212
213
 
213
214
  /** A task the plan expects to EXECUTE (a no-cache task executes every run). */
214
215
  function wouldRun(t: PlannedTask): boolean {
216
+ // A `noop` task succeeds without running (execute-task.ts), whatever its key.
217
+ if (t.executor === 'noop') return false
215
218
  return t.cacheStatus === 'miss' || t.cacheStatus === 'no-cache'
216
219
  }
217
220