@vzn/vx-ci 0.0.651 → 0.0.652

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/README.md CHANGED
@@ -25,7 +25,8 @@ That's the whole setup. On a GitHub Actions runner (`GITHUB_STEP_SUMMARY`
25
25
  set) every `vx run` appends a summary block, on its own line after
26
26
  anything already written in the step: verdict headline, stats
27
27
  (tasks / executed / cache hits / duration, and the ideal time an executor says
28
- the run could have taken, as `@vzn/vx-dte` replays it), failures called out above the
28
+ the run could have taken, as `@vzn/vx-dte` replays it), the workers
29
+ that would have run it best (`@vzn/vx-dte`'s "Workers to declare"), failures called out above the
29
30
  per-task table (rows by status, failures first, then the longest first) with their exit code, the signal an exit above 128
30
31
  stands for (`exit 137 (128 + SIGKILL)`, as the run's own frame and
31
32
  `vx last` say it), a timeout as `timed out, exit 143`, a persistent task
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx-ci",
3
- "version": "0.0.651",
3
+ "version": "0.0.652",
4
4
  "license": "MIT",
5
5
  "description": "GitHub Actions and GitLab CI integration for vx — a job summary on Actions and the branch cache scope on both.",
6
6
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "access": "public"
34
34
  },
35
35
  "peerDependencies": {
36
- "@vzn/vx": "^0.0.651"
36
+ "@vzn/vx": "^0.0.652"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
package/src/summary.ts CHANGED
@@ -198,6 +198,9 @@ export function renderJobSummary(summary: RunSummaryRecord, title = 'vx run'): s
198
198
  if (summary.machines !== undefined && summary.machines.length > 0) {
199
199
  lines.push(...renderWorkers(summary.machines, summary.tasks), '')
200
200
  }
201
+ if (summary.advice !== undefined && summary.advice.length > 0) {
202
+ lines.push(...renderAdvice(summary.advice), '')
203
+ }
201
204
 
202
205
  const header = ['Task', 'Status', 'Duration']
203
206
  lines.push(`| ${header.join(' | ')} |`)
@@ -237,6 +240,36 @@ const tasksCell = (ok: number, failed: number): string =>
237
240
 
238
241
  const pct = (x: number): string => `${Math.round(x * 100)}%`
239
242
 
243
+ /** What each `WorkerAdvice` played. */
244
+ const ADVICE = {
245
+ declared: 'The fewest of the declared sizes',
246
+ more: "Past the sizes' max",
247
+ any: 'Any cores, least core time',
248
+ } as const
249
+
250
+ /**
251
+ * The workers that would have run it best (2026-11-05: "So I can add more
252
+ * or change their specs"): played again from what each task took.
253
+ */
254
+ function renderAdvice(advice: NonNullable<RunSummaryRecord['advice']>): string[] {
255
+ const lines = [
256
+ '### Workers to declare',
257
+ '',
258
+ '| Played on | Workers | Ends at |',
259
+ '| --- | --- | --- |',
260
+ ]
261
+ for (const a of advice)
262
+ lines.push(
263
+ `| ${ADVICE[a.of]} | ${a.workers
264
+ .map(
265
+ (w) =>
266
+ `${w.count} × ${w.size === undefined ? '' : `${escapeMarkdownCell(escapeInline(w.size))} `}(${w.cores} cores, ${gb(w.memoryBytes)} GB${w.platform === undefined ? '' : `, ${escapeMarkdownCell(escapeInline(w.platform))}`})`,
267
+ )
268
+ .join(' + ')} | ${fmtMs(a.endMs)} |`,
269
+ )
270
+ return lines
271
+ }
272
+
240
273
  /**
241
274
  * The workers an executor ran the run on (vx-dte's): the cores its tasks
242
275
  * booked beside the cores they used, each averaged over the time the