@brainervirus/workit-cli 8.39.0 → 8.39.1

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.
Files changed (2) hide show
  1. package/dist/index.js +22 -9
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -9317,7 +9317,7 @@ var package_default;
9317
9317
  var init_package = __esm(() => {
9318
9318
  package_default = {
9319
9319
  name: "@brainervirus/workit-cli",
9320
- version: "8.39.0",
9320
+ version: "8.39.1",
9321
9321
  private: false,
9322
9322
  description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
9323
9323
  keywords: [
@@ -9355,13 +9355,13 @@ var init_package = __esm(() => {
9355
9355
  },
9356
9356
  dependencies: {
9357
9357
  "@babel/parser": "7.29.9",
9358
- "@brainervirus/workit-cursor": "^8.39.0",
9358
+ "@brainervirus/workit-cursor": "^8.39.1",
9359
9359
  "@inkjs/ui": "2.0.0",
9360
9360
  ink: "7.1.1",
9361
9361
  react: "19.2.8"
9362
9362
  },
9363
9363
  devDependencies: {
9364
- "@brainervirus/workit-core": "^8.39.0"
9364
+ "@brainervirus/workit-core": "^8.39.1"
9365
9365
  },
9366
9366
  engines: {
9367
9367
  node: ">=24"
@@ -80765,12 +80765,15 @@ function waitVerdict(doc, options) {
80765
80765
  return { state: "waiting", reason: "checks_pending" };
80766
80766
  if (doc.checks.pending.length > 0)
80767
80767
  return { state: "waiting", reason: "checks_pending" };
80768
+ const grace = options.noChecksGraceMs ?? NO_CHECKS_GRACE_MS;
80769
+ if ((options.expectedMissing?.length ?? 0) > 0 && options.elapsedMs < grace)
80770
+ return { state: "waiting", reason: "checks_not_registered" };
80768
80771
  if (checks === "passing")
80769
80772
  return { state: "ready", reason: "checks_passing" };
80770
- const ciRequired = doc.checks.missingRequired === null || doc.mergeState === "ci_must_pass" || doc.mergeState === "ci_still_running";
80773
+ const ciRequired = (doc.checks.missingRequired?.length ?? 0) > 0 || doc.mergeState === "ci_must_pass" || doc.mergeState === "ci_still_running";
80771
80774
  if (ciRequired)
80772
80775
  return { state: "waiting", reason: "no_checks_yet" };
80773
- if (options.elapsedMs < (options.noChecksGraceMs ?? NO_CHECKS_GRACE_MS))
80776
+ if (options.elapsedMs < grace)
80774
80777
  return { state: "waiting", reason: "no_checks_yet" };
80775
80778
  return { state: "ready", reason: "no_checks" };
80776
80779
  }
@@ -80865,7 +80868,7 @@ function recordAccepted(cwd, resolved, status, accepted, options) {
80865
80868
  }));
80866
80869
  return recordReruns(cwd, rows);
80867
80870
  }
80868
- var MAX_LOG_TAILS = 5, GITLAB_MERGEABLE, GITHUB_MERGEABLE, NO_CHECKS_GRACE_MS = 90000;
80871
+ var MAX_LOG_TAILS = 5, GITLAB_MERGEABLE, GITHUB_MERGEABLE, NO_CHECKS_GRACE_MS = 120000;
80869
80872
  var init_report2 = __esm(() => {
80870
80873
  init_rev();
80871
80874
  init_ledger();
@@ -87232,6 +87235,8 @@ async function wait2(argv, io) {
87232
87235
  let errors = 0;
87233
87236
  let status = null;
87234
87237
  let verdict = { state: "waiting", reason: "not_polled" };
87238
+ let baseContexts = null;
87239
+ let expectedMissing = [];
87235
87240
  for (;; ) {
87236
87241
  const read = resolved.forge.prStatus(number.data);
87237
87242
  polls += 1;
@@ -87243,7 +87248,13 @@ async function wait2(argv, io) {
87243
87248
  if (!doc.ok)
87244
87249
  return forgeFail(io, doc);
87245
87250
  recordPrStatus(io.cwd, doc.data, actor);
87246
- verdict = waitVerdict(doc.data, { head, elapsedMs });
87251
+ if (status.requiredContexts === null && baseContexts === null) {
87252
+ const base = resolved.forge.branchChecks(status.base);
87253
+ baseContexts = base.ok ? [...new Set(base.data.checks.map((check) => check.context))] : [];
87254
+ }
87255
+ const seen = new Set(status.checks.map((check) => check.context));
87256
+ expectedMissing = (baseContexts ?? []).filter((context) => !seen.has(context));
87257
+ verdict = waitVerdict(doc.data, { head, elapsedMs, expectedMissing });
87247
87258
  if (verdict.state !== "waiting")
87248
87259
  break;
87249
87260
  } else {
@@ -87275,6 +87286,7 @@ async function wait2(argv, io) {
87275
87286
  state: verdict.state === "waiting" ? "in_progress" : verdict.state,
87276
87287
  ...verdict.state === "failed" && doc.checks.pending.length > 0 ? { failFast: true, stillRunning: doc.checks.pending } : {},
87277
87288
  reason: verdict.reason,
87289
+ ...expectedMissing.length > 0 ? { expectedMissing } : {},
87278
87290
  polls,
87279
87291
  elapsedMs,
87280
87292
  timeoutMs,
@@ -87284,13 +87296,14 @@ async function wait2(argv, io) {
87284
87296
  for (const value of renderStatus(doc))
87285
87297
  io.stdout(`${value}
87286
87298
  `);
87299
+ const never = expectedMissing.length > 0 ? `; checks the base ran never registered: ${expectedMissing.join(", ")}` : "";
87287
87300
  if (verdict.state === "ready")
87288
87301
  return emit(io, ok2(data), () => [
87289
- `CI ready (${verdict.reason}) after ${polls} poll${polls === 1 ? "" : "s"}, ${seconds(elapsedMs)}`,
87302
+ (verdict.reason === "no_checks" ? `CI none: no CI configured for this head (no checks registered within the grace) after ${polls} poll${polls === 1 ? "" : "s"}, ${seconds(elapsedMs)}` : `CI pass (${verdict.reason}) after ${polls} poll${polls === 1 ? "" : "s"}, ${seconds(elapsedMs)}`) + never,
87290
87303
  ...renderStatus(doc)
87291
87304
  ]);
87292
87305
  if (verdict.state === "failed")
87293
- return emit(io, fail2("failed", `CI failed: ${doc.checks.failing.map((check) => check.name).join(", ")}`, {
87306
+ return emit(io, fail2("failed", `CI fail: ${doc.checks.failing.map((check) => check.name).join(", ")}`, {
87294
87307
  data,
87295
87308
  unblock: "fix the failure, or if it is a flake: workit ci rerun --failed --reason flake"
87296
87309
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cli",
3
- "version": "8.39.0",
3
+ "version": "8.39.1",
4
4
  "private": false,
5
5
  "description": "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
6
6
  "keywords": [
@@ -38,13 +38,13 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@babel/parser": "7.29.9",
41
- "@brainervirus/workit-cursor": "^8.39.0",
41
+ "@brainervirus/workit-cursor": "^8.39.1",
42
42
  "@inkjs/ui": "2.0.0",
43
43
  "ink": "7.1.1",
44
44
  "react": "19.2.8"
45
45
  },
46
46
  "devDependencies": {
47
- "@brainervirus/workit-core": "^8.39.0"
47
+ "@brainervirus/workit-core": "^8.39.1"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=24"