@brainervirus/workit-cli 8.39.0 → 8.39.2
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/dist/index.js +28 -13
- 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.
|
|
9320
|
+
version: "8.39.2",
|
|
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.
|
|
9358
|
+
"@brainervirus/workit-cursor": "^8.39.2",
|
|
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.
|
|
9364
|
+
"@brainervirus/workit-core": "^8.39.2"
|
|
9365
9365
|
},
|
|
9366
9366
|
engines: {
|
|
9367
9367
|
node: ">=24"
|
|
@@ -78219,11 +78219,12 @@ async function acquireLease(options) {
|
|
|
78219
78219
|
position: ahead + 1
|
|
78220
78220
|
};
|
|
78221
78221
|
if (!queued) {
|
|
78222
|
-
writeTicket(ticket, ticketRecord);
|
|
78223
|
-
queued = true;
|
|
78224
78222
|
process.on("exit", leave);
|
|
78225
78223
|
process.on("SIGINT", onSignal);
|
|
78226
78224
|
process.on("SIGTERM", onSignal);
|
|
78225
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
78226
|
+
writeTicket(ticket, ticketRecord);
|
|
78227
|
+
queued = true;
|
|
78227
78228
|
} else if (!fs24.existsSync(ticket)) {
|
|
78228
78229
|
writeTicket(ticket, ticketRecord);
|
|
78229
78230
|
}
|
|
@@ -78232,7 +78233,8 @@ async function acquireLease(options) {
|
|
|
78232
78233
|
position: ahead + 1,
|
|
78233
78234
|
ahead,
|
|
78234
78235
|
holders,
|
|
78235
|
-
waitedMs: waited
|
|
78236
|
+
waitedMs: waited,
|
|
78237
|
+
first: nextStatus === 0
|
|
78236
78238
|
});
|
|
78237
78239
|
nextStatus = waited + (options.statusEveryMs ?? 30000);
|
|
78238
78240
|
}
|
|
@@ -78675,7 +78677,7 @@ async function prepareHeavy(io, settings, label, runCwd, timeoutMs) {
|
|
|
78675
78677
|
onStatus: (status) => {
|
|
78676
78678
|
const slots = `${settings.slots} slot${settings.slots === 1 ? "" : "s"}`;
|
|
78677
78679
|
const holders = status.holders.map((holder) => describeHolder(holder)).join("; ");
|
|
78678
|
-
io.stderr(status.
|
|
78680
|
+
io.stderr(status.first ? `workit: waiting for the heavy-check lease (${slots}): held by ${holders || "nobody; waiters ahead"}; queued at position ${status.position}, waiting up to ${formatWait(settings.waitMs)} (--wait <dur> sets it)
|
|
78679
78681
|
` : `workit: still queued for the heavy-check lease: position ${status.position}, ${formatWait(status.waitedMs)} of ${formatWait(settings.waitMs)} waited; held by ${holders || "nobody; waiters ahead"}
|
|
78680
78682
|
`);
|
|
78681
78683
|
}
|
|
@@ -80765,12 +80767,15 @@ function waitVerdict(doc, options) {
|
|
|
80765
80767
|
return { state: "waiting", reason: "checks_pending" };
|
|
80766
80768
|
if (doc.checks.pending.length > 0)
|
|
80767
80769
|
return { state: "waiting", reason: "checks_pending" };
|
|
80770
|
+
const grace = options.noChecksGraceMs ?? NO_CHECKS_GRACE_MS;
|
|
80771
|
+
if ((options.expectedMissing?.length ?? 0) > 0 && options.elapsedMs < grace)
|
|
80772
|
+
return { state: "waiting", reason: "checks_not_registered" };
|
|
80768
80773
|
if (checks === "passing")
|
|
80769
80774
|
return { state: "ready", reason: "checks_passing" };
|
|
80770
|
-
const ciRequired = doc.checks.missingRequired
|
|
80775
|
+
const ciRequired = (doc.checks.missingRequired?.length ?? 0) > 0 || doc.mergeState === "ci_must_pass" || doc.mergeState === "ci_still_running";
|
|
80771
80776
|
if (ciRequired)
|
|
80772
80777
|
return { state: "waiting", reason: "no_checks_yet" };
|
|
80773
|
-
if (options.elapsedMs <
|
|
80778
|
+
if (options.elapsedMs < grace)
|
|
80774
80779
|
return { state: "waiting", reason: "no_checks_yet" };
|
|
80775
80780
|
return { state: "ready", reason: "no_checks" };
|
|
80776
80781
|
}
|
|
@@ -80865,7 +80870,7 @@ function recordAccepted(cwd, resolved, status, accepted, options) {
|
|
|
80865
80870
|
}));
|
|
80866
80871
|
return recordReruns(cwd, rows);
|
|
80867
80872
|
}
|
|
80868
|
-
var MAX_LOG_TAILS = 5, GITLAB_MERGEABLE, GITHUB_MERGEABLE, NO_CHECKS_GRACE_MS =
|
|
80873
|
+
var MAX_LOG_TAILS = 5, GITLAB_MERGEABLE, GITHUB_MERGEABLE, NO_CHECKS_GRACE_MS = 120000;
|
|
80869
80874
|
var init_report2 = __esm(() => {
|
|
80870
80875
|
init_rev();
|
|
80871
80876
|
init_ledger();
|
|
@@ -87232,6 +87237,8 @@ async function wait2(argv, io) {
|
|
|
87232
87237
|
let errors = 0;
|
|
87233
87238
|
let status = null;
|
|
87234
87239
|
let verdict = { state: "waiting", reason: "not_polled" };
|
|
87240
|
+
let baseContexts = null;
|
|
87241
|
+
let expectedMissing = [];
|
|
87235
87242
|
for (;; ) {
|
|
87236
87243
|
const read = resolved.forge.prStatus(number.data);
|
|
87237
87244
|
polls += 1;
|
|
@@ -87243,7 +87250,13 @@ async function wait2(argv, io) {
|
|
|
87243
87250
|
if (!doc.ok)
|
|
87244
87251
|
return forgeFail(io, doc);
|
|
87245
87252
|
recordPrStatus(io.cwd, doc.data, actor);
|
|
87246
|
-
|
|
87253
|
+
if (status.requiredContexts === null && baseContexts === null) {
|
|
87254
|
+
const base = resolved.forge.branchChecks(status.base);
|
|
87255
|
+
baseContexts = base.ok ? [...new Set(base.data.checks.map((check) => check.context))] : [];
|
|
87256
|
+
}
|
|
87257
|
+
const seen = new Set(status.checks.map((check) => check.context));
|
|
87258
|
+
expectedMissing = (baseContexts ?? []).filter((context) => !seen.has(context));
|
|
87259
|
+
verdict = waitVerdict(doc.data, { head, elapsedMs, expectedMissing });
|
|
87247
87260
|
if (verdict.state !== "waiting")
|
|
87248
87261
|
break;
|
|
87249
87262
|
} else {
|
|
@@ -87275,6 +87288,7 @@ async function wait2(argv, io) {
|
|
|
87275
87288
|
state: verdict.state === "waiting" ? "in_progress" : verdict.state,
|
|
87276
87289
|
...verdict.state === "failed" && doc.checks.pending.length > 0 ? { failFast: true, stillRunning: doc.checks.pending } : {},
|
|
87277
87290
|
reason: verdict.reason,
|
|
87291
|
+
...expectedMissing.length > 0 ? { expectedMissing } : {},
|
|
87278
87292
|
polls,
|
|
87279
87293
|
elapsedMs,
|
|
87280
87294
|
timeoutMs,
|
|
@@ -87284,13 +87298,14 @@ async function wait2(argv, io) {
|
|
|
87284
87298
|
for (const value of renderStatus(doc))
|
|
87285
87299
|
io.stdout(`${value}
|
|
87286
87300
|
`);
|
|
87301
|
+
const never = expectedMissing.length > 0 ? `; checks the base ran never registered: ${expectedMissing.join(", ")}` : "";
|
|
87287
87302
|
if (verdict.state === "ready")
|
|
87288
87303
|
return emit(io, ok2(data), () => [
|
|
87289
|
-
`CI
|
|
87304
|
+
(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
87305
|
...renderStatus(doc)
|
|
87291
87306
|
]);
|
|
87292
87307
|
if (verdict.state === "failed")
|
|
87293
|
-
return emit(io, fail2("failed", `CI
|
|
87308
|
+
return emit(io, fail2("failed", `CI fail: ${doc.checks.failing.map((check) => check.name).join(", ")}`, {
|
|
87294
87309
|
data,
|
|
87295
87310
|
unblock: "fix the failure, or if it is a flake: workit ci rerun --failed --reason flake"
|
|
87296
87311
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-cli",
|
|
3
|
-
"version": "8.39.
|
|
3
|
+
"version": "8.39.2",
|
|
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.
|
|
41
|
+
"@brainervirus/workit-cursor": "^8.39.2",
|
|
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.
|
|
47
|
+
"@brainervirus/workit-core": "^8.39.2"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=24"
|