@indigoai-us/hq-cli 5.345.231 → 5.345.232
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/CHANGELOG.md +31 -0
- package/README.md +3 -2
- package/assets/lanes-reconcile/hq-lanes-reconcile.service +1 -1
- package/assets/scaffold/core/scripts/pipeline-conductor.sh +14 -14
- package/assets/scaffold/core/scripts/pipeline-driver.sh +7 -7
- package/assets/scaffold/core/scripts/session-project.sh +19 -4
- package/dist/command-catalog.generated.d.ts +213 -177
- package/dist/command-catalog.generated.js +263 -212
- package/dist/command-registration-plan.d.ts +6 -24
- package/dist/command-registration-plan.js +4 -8
- package/dist/commands/auth.js +3 -2
- package/dist/commands/core-pipeline-conductor-command.js +1 -1
- package/dist/commands/core-pipeline-conductor-native.js +5 -5
- package/dist/commands/core-pipeline-driver-native.js +5 -5
- package/dist/commands/daemon.js +7 -36
- package/dist/commands/deploy-access.js +6 -13
- package/dist/commands/deploy-comments.js +5 -13
- package/dist/commands/deploy-domains.js +6 -13
- package/dist/commands/deploy-list.js +25 -11
- package/dist/commands/deploy-mutations.d.ts +3 -0
- package/dist/commands/deploy-mutations.js +147 -0
- package/dist/commands/link.js +29 -0
- package/dist/commands/mesh.js +3 -1
- package/dist/commands/report.js +8 -9
- package/dist/data/command-states.json +10 -7
- package/dist/lib/bot/fleet-bots-update-pass.d.ts +8 -0
- package/dist/lib/bot/fleet-bots-update-pass.js +40 -0
- package/dist/lib/bot/fleet-bots-update-task.d.ts +12 -0
- package/dist/lib/bot/fleet-bots-update-task.js +52 -0
- package/dist/lib/bot/fleet-bots-update-worker-v1.d.ts +2 -0
- package/dist/lib/bot/fleet-bots-update-worker-v1.js +5 -0
- package/dist/lib/daemon/catalog.d.ts +8 -5
- package/dist/lib/daemon/catalog.js +15 -8
- package/dist/lib/daemon/lock.js +33 -37
- package/dist/lib/daemon/ops/skill-command.d.ts +99 -0
- package/dist/lib/daemon/ops/skill-command.js +260 -0
- package/dist/lib/daemon/protocol.d.ts +1 -1
- package/dist/lib/daemon/protocol.js +1 -0
- package/dist/lib/daemon/run.js +10 -18
- package/dist/lib/daemon/server.js +7 -0
- package/dist/lib/daemon/supervisor.d.ts +5 -0
- package/dist/lib/daemon/supervisor.js +17 -2
- package/dist/lib/db/app-ref.js +10 -15
- package/dist/lib/deploy-apps.d.ts +29 -0
- package/dist/lib/deploy-apps.js +37 -0
- package/dist/lib/doctor/checks/search-index.d.ts +16 -0
- package/dist/lib/doctor/checks/search-index.js +61 -0
- package/dist/lib/doctor/checks/stranded-lanes.js +1 -1
- package/dist/lib/doctor/registry.js +4 -0
- package/dist/lib/lanes/accounts.js +3 -3
- package/dist/lib/lanes/admission-host.js +1 -1
- package/dist/lib/lanes/admission.js +4 -4
- package/dist/lib/lanes/autopilot.js +2 -2
- package/dist/lib/lanes/blocker-freshness.js +1 -1
- package/dist/lib/lanes/compaction.js +5 -5
- package/dist/lib/lanes/delivery.js +1 -1
- package/dist/lib/lanes/depth-cap.js +1 -1
- package/dist/lib/lanes/disk-guard.js +1 -1
- package/dist/lib/lanes/dropbox.js +1 -1
- package/dist/lib/lanes/hooks-install.js +1 -1
- package/dist/lib/lanes/imported-question.js +1 -1
- package/dist/lib/lanes/keep-alive.d.ts +2 -2
- package/dist/lib/lanes/keep-alive.js +3 -3
- package/dist/lib/lanes/kr-freshness.js +1 -1
- package/dist/lib/lanes/links.js +4 -4
- package/dist/lib/lanes/loop.js +2 -2
- package/dist/lib/lanes/machine-identity.js +3 -3
- package/dist/lib/lanes/models.js +6 -6
- package/dist/lib/lanes/quota.js +1 -1
- package/dist/lib/lanes/reconcile-install.js +3 -3
- package/dist/lib/lanes/reconcile.js +16 -16
- package/dist/lib/lanes/remote-control-lane.js +6 -6
- package/dist/lib/lanes/reviews.js +2 -2
- package/dist/lib/lanes/spawn.js +24 -24
- package/dist/lib/lanes/status-fields.js +4 -4
- package/dist/lib/lanes/wait.js +4 -4
- package/dist/lib/lanes/watch.js +2 -2
- package/dist/lib/lanes/watcher-main.js +1 -1
- package/dist/lib/lanes/watcher.js +38 -38
- package/dist/lib/lanes/worker-process.js +5 -5
- package/dist/lib/mesh/live/daemon/pid-lock.d.ts +2 -4
- package/dist/lib/mesh/live/daemon/pid-lock.js +38 -55
- package/dist/utils/exclusive-lock.d.ts +60 -0
- package/dist/utils/exclusive-lock.js +65 -0
- package/package.json +8 -7
- package/dist/commands/staff/listings.d.ts +0 -41
- package/dist/commands/staff/listings.js +0 -160
- package/dist/commands/staff/reset-test-account.d.ts +0 -121
- package/dist/commands/staff/reset-test-account.js +0 -285
- package/dist/commands/staff/test-account.d.ts +0 -51
- package/dist/commands/staff/test-account.js +0 -196
|
@@ -458,7 +458,7 @@ export function accountStatus(provider, accountId, config, deps = defaultAccount
|
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
catch {
|
|
461
|
-
process.stderr.write(`hq
|
|
461
|
+
process.stderr.write(`hq runners: Claude credential expiry check failed for account ${accountId}\n`);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
if (homeExists && !present && provider === "claude" && deps.probe !== undefined) {
|
|
@@ -472,7 +472,7 @@ export function accountStatus(provider, accountId, config, deps = defaultAccount
|
|
|
472
472
|
identity = claudeIdentityFromProbe(result) ?? undefined;
|
|
473
473
|
}
|
|
474
474
|
catch {
|
|
475
|
-
process.stderr.write(`hq
|
|
475
|
+
process.stderr.write(`hq runners: Claude auth status probe failed for account ${accountId}\n`);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
if (token?.state === "expired") {
|
|
@@ -520,7 +520,7 @@ function claudeLoginStatus(result) {
|
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
catch (err) {
|
|
523
|
-
process.stderr.write(`hq
|
|
523
|
+
process.stderr.write(`hq runners: Claude auth status returned invalid JSON: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
524
524
|
return null;
|
|
525
525
|
}
|
|
526
526
|
}
|
|
@@ -12,7 +12,7 @@ export function readOutpostIdentity(existsSync = (p) => fs.existsSync(p), readFi
|
|
|
12
12
|
text = readFileSync(OUTPOST_ID_PATH);
|
|
13
13
|
}
|
|
14
14
|
catch (err) {
|
|
15
|
-
process.stderr.write(`hq
|
|
15
|
+
process.stderr.write(`hq runners: failed to read ${OUTPOST_ID_PATH}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
16
16
|
throw err;
|
|
17
17
|
}
|
|
18
18
|
const id = text.trim();
|
|
@@ -49,7 +49,7 @@ async function withAdmissionLock(lockPath, fn, sleep) {
|
|
|
49
49
|
fs.closeSync(fd);
|
|
50
50
|
}
|
|
51
51
|
catch (err) {
|
|
52
|
-
process.stderr.write(`hq
|
|
52
|
+
process.stderr.write(`hq runners: admission lock close failed for ${lockPath}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
55
|
const currentStat = fs.statSync(lockPath);
|
|
@@ -59,7 +59,7 @@ async function withAdmissionLock(lockPath, fn, sleep) {
|
|
|
59
59
|
}
|
|
60
60
|
catch (err) {
|
|
61
61
|
if (err.code !== "ENOENT") {
|
|
62
|
-
process.stderr.write(`hq
|
|
62
|
+
process.stderr.write(`hq runners: admission lock unlink failed for ${lockPath}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -74,13 +74,13 @@ async function withAdmissionLock(lockPath, fn, sleep) {
|
|
|
74
74
|
if (reclaimStaleLock(lockPath, {
|
|
75
75
|
staleMs: ADMISSION_LOCK_STALE_MS,
|
|
76
76
|
liveOwnerMaxMs: liveOwnerMaxMs(),
|
|
77
|
-
label: "hq
|
|
77
|
+
label: "hq runners admission",
|
|
78
78
|
}, { isAlive: admissionLockOwnerAlive }))
|
|
79
79
|
continue;
|
|
80
80
|
}
|
|
81
81
|
catch (probeErr) {
|
|
82
82
|
if (probeErr.code !== "ENOENT") {
|
|
83
|
-
process.stderr.write(`hq
|
|
83
|
+
process.stderr.write(`hq runners: stale admission-lock probe failed for ${lockPath}: ${probeErr instanceof Error ? probeErr.message : String(probeErr)}\n`);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
await sleep(10);
|
|
@@ -1290,14 +1290,14 @@ export async function runLeadAutopilotPass(input) {
|
|
|
1290
1290
|
fs.closeSync(lockFd);
|
|
1291
1291
|
}
|
|
1292
1292
|
catch (error) {
|
|
1293
|
-
process.stderr.write(`hq
|
|
1293
|
+
process.stderr.write(`hq runners autopilot: lock close failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
1294
1294
|
}
|
|
1295
1295
|
try {
|
|
1296
1296
|
fs.unlinkSync(lockPath);
|
|
1297
1297
|
}
|
|
1298
1298
|
catch (error) {
|
|
1299
1299
|
if (error.code !== "ENOENT") {
|
|
1300
|
-
process.stderr.write(`hq
|
|
1300
|
+
process.stderr.write(`hq runners autopilot: lock removal failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
@@ -23,7 +23,7 @@ function errorCode(error) {
|
|
|
23
23
|
return error instanceof LanesError ? error.error : "blocker_freshness_unavailable";
|
|
24
24
|
}
|
|
25
25
|
function reportError(lane, error) {
|
|
26
|
-
process.stderr.write(`hq
|
|
26
|
+
process.stderr.write(`hq runners: blocker freshness disabled for ${lane.lane_id}: ${errorCode(error)}\n`);
|
|
27
27
|
}
|
|
28
28
|
function failedResolution(flagEnabled, error, onError) {
|
|
29
29
|
onError(error);
|
|
@@ -167,7 +167,7 @@ function isProviderMarkerLine(line, lineNumber, transcriptPath, provider, oversi
|
|
|
167
167
|
record = parsed;
|
|
168
168
|
}
|
|
169
169
|
catch (err) {
|
|
170
|
-
process.stderr.write(`hq
|
|
170
|
+
process.stderr.write(`hq runners: skipped unparseable provider transcript marker line ${lineNumber} in ${transcriptPath}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
171
171
|
return false;
|
|
172
172
|
}
|
|
173
173
|
return ((provider === "claude" && record.type === "system" && record.subtype === "compact_boundary") ||
|
|
@@ -218,7 +218,7 @@ function scanTranscriptLines(transcriptPath, startOffset, includeUnterminatedLas
|
|
|
218
218
|
lineNumber += 1;
|
|
219
219
|
const recognizedMarker = onLine(Buffer.concat(lineParts, lineBytes).toString("utf8"), lineNumber, skipLongLine);
|
|
220
220
|
if (skipLongLine && recognizedMarker !== true) {
|
|
221
|
-
process.stderr.write(`hq
|
|
221
|
+
process.stderr.write(`hq runners: skipped oversized transcript line ${lineNumber} in ${transcriptPath} (over ${maxLineBytes} bytes)\n`);
|
|
222
222
|
}
|
|
223
223
|
lineParts = [];
|
|
224
224
|
lineBytes = 0;
|
|
@@ -349,7 +349,7 @@ export function probeCompactBoundaries(transcriptPath, maxLineBytes = TRANSCRIPT
|
|
|
349
349
|
rec = JSON.parse(line);
|
|
350
350
|
}
|
|
351
351
|
catch (err) {
|
|
352
|
-
process.stderr.write(`hq
|
|
352
|
+
process.stderr.write(`hq runners: skipped an unparseable line in ${transcriptPath}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
353
353
|
return false;
|
|
354
354
|
}
|
|
355
355
|
if (rec.type !== "system" || rec.subtype !== "compact_boundary")
|
|
@@ -391,7 +391,7 @@ export const defaultRunCompaction = (input) => {
|
|
|
391
391
|
/** Stderr line printed before a resume-time `/compact` starts. */
|
|
392
392
|
export function compactionStartNotice(sessionId) {
|
|
393
393
|
const minutes = Math.round(COMPACTION_TIMEOUT_MS / 60_000);
|
|
394
|
-
return `hq
|
|
394
|
+
return `hq runners: compacting session ${sessionId} before resume; this can take up to ${minutes} minutes. ` +
|
|
395
395
|
`Re-run with --no-compact to skip it.\n`;
|
|
396
396
|
}
|
|
397
397
|
/**
|
|
@@ -431,7 +431,7 @@ export function compactLaneSession(input) {
|
|
|
431
431
|
reason = "the session transcript gained no compact_boundary record";
|
|
432
432
|
}
|
|
433
433
|
if (outcome !== "compacted") {
|
|
434
|
-
process.stderr.write(`hq
|
|
434
|
+
process.stderr.write(`hq runners: compaction of session ${input.sessionId} ${outcome}: ${reason ?? ""}\n`);
|
|
435
435
|
}
|
|
436
436
|
return {
|
|
437
437
|
at: started.toISOString(),
|
|
@@ -344,7 +344,7 @@ workerOutOffset = 0) {
|
|
|
344
344
|
cache_creation_input_tokens: null,
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
process.stderr.write(`hq
|
|
347
|
+
process.stderr.write(`hq runners: failed to read ${outPath}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
348
348
|
throw err;
|
|
349
349
|
}
|
|
350
350
|
return parseWorkerRunOutput(provider, text);
|
|
@@ -33,7 +33,7 @@ export function laneDepthCap(hqRoot, companySlug) {
|
|
|
33
33
|
if (value === undefined)
|
|
34
34
|
return { max: MAX_LANE_DEPTH, source: "default" };
|
|
35
35
|
if (typeof value !== "number" || !Number.isInteger(value) || value < 1 || value > 8) {
|
|
36
|
-
process.stderr.write(`hq
|
|
36
|
+
process.stderr.write(`hq runners: lane_depth_cap_invalid company=${companySlug} maxLaneDepth=${JSON.stringify(value)}; using default ${MAX_LANE_DEPTH}\n`);
|
|
37
37
|
return { max: MAX_LANE_DEPTH, source: "default" };
|
|
38
38
|
}
|
|
39
39
|
return { max: value, source: "company" };
|
|
@@ -163,7 +163,7 @@ async function gzipRolloutStream(source, temp, target, io) {
|
|
|
163
163
|
}
|
|
164
164
|
catch (cleanupError) {
|
|
165
165
|
if (cleanupError.code !== "ENOENT") {
|
|
166
|
-
process.stderr.write(`hq
|
|
166
|
+
process.stderr.write(`hq runners: rollout compression temp cleanup failed for ${temp}: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}\n`);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
throw error;
|
|
@@ -172,7 +172,7 @@ export function readToolActivity(hqRoot, laneId) {
|
|
|
172
172
|
return { at: parsed.at, hook_pid: parsed.hook_pid, hook_event: "PreToolUse" };
|
|
173
173
|
}
|
|
174
174
|
catch (err) {
|
|
175
|
-
process.stderr.write(`hq
|
|
175
|
+
process.stderr.write(`hq runners: tool activity for ${laneId} is unparseable: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
176
176
|
return null;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
@@ -698,7 +698,7 @@ export function probeDrainHookRegistration(provider, providerHome) {
|
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
700
|
catch (err) {
|
|
701
|
-
process.stderr.write(`hq
|
|
701
|
+
process.stderr.write(`hq runners: registration file ${regPath} is unreadable as ${kind}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
702
702
|
return { ...base, registered: false };
|
|
703
703
|
}
|
|
704
704
|
}
|
|
@@ -8,7 +8,7 @@ export function importedQuestionMarker(root, id) {
|
|
|
8
8
|
/** A pending transfer is also read-only: its remote POST may already have succeeded. */
|
|
9
9
|
export function assertQuestionNotImported(root, id) {
|
|
10
10
|
if (isQuestionImported(root, id)) {
|
|
11
|
-
throw new LanesError("question_imported_read_only", "This question was transferred to hq decide and is read-only in hq
|
|
11
|
+
throw new LanesError("question_imported_read_only", "This question was transferred to hq decide and is read-only in hq runners. Use hq decide list to find and answer the decision.", { question_id: id });
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export function isQuestionImported(root, id) {
|
|
@@ -31,9 +31,9 @@ export declare function queueLaneTerminalResume(current: LaneRecord, at: string,
|
|
|
31
31
|
}): LaneTerminalResumeResult;
|
|
32
32
|
/** Persist a manager status miss and queue its one bounded follow-up turn. */
|
|
33
33
|
export declare function queueManagerStatusGateResume(hqRoot: string, laneId: string, entry: Omit<ManagerStatusGateHistoryEntry, "event" | "resume_queued" | "resume_skipped_reason">, resumeText: string, skip?: (current: LaneRecord) => boolean): LaneRecord;
|
|
34
|
-
export declare const LEAD_LANE_KEEP_ALIVE_RESUME_TEXT = "Automatic keep-alive resume: your last turn ended with decision done and story_complete false. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq
|
|
34
|
+
export declare const LEAD_LANE_KEEP_ALIVE_RESUME_TEXT = "Automatic keep-alive resume: your last turn ended with decision done and story_complete false. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq runners ask or stay in the loop.";
|
|
35
35
|
export declare const LEAD_LANE_KEEP_ALIVE_BLOCKED_RESUME_TEXT = "You ended blocked with no pending question. Record the event you wait on in waiting_on, re-check each blocker, and continue the next unblocked story.";
|
|
36
|
-
export declare const LEAD_LANE_KEEP_ALIVE_INTERRUPTED_RESUME_TEXT = "Automatic keep-alive resume: your previous turn was interrupted by a provider process exit. Check your last state before continuing. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq
|
|
36
|
+
export declare const LEAD_LANE_KEEP_ALIVE_INTERRUPTED_RESUME_TEXT = "Automatic keep-alive resume: your previous turn was interrupted by a provider process exit. Check your last state before continuing. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq runners ask or stay in the loop.";
|
|
37
37
|
export type KeepAliveBlockedReason = NonNullable<LaneRecord["keep_alive_blocked_reason"]>;
|
|
38
38
|
/** The latest terminal envelope fields used by both watch and reconcile. */
|
|
39
39
|
export interface KeepAliveDoneEnvelope {
|
|
@@ -105,9 +105,9 @@ export function queueManagerStatusGateResume(hqRoot, laneId, entry, resumeText,
|
|
|
105
105
|
};
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
export const LEAD_LANE_KEEP_ALIVE_RESUME_TEXT = "Automatic keep-alive resume: your last turn ended with decision done and story_complete false. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq
|
|
108
|
+
export const LEAD_LANE_KEEP_ALIVE_RESUME_TEXT = "Automatic keep-alive resume: your last turn ended with decision done and story_complete false. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq runners ask or stay in the loop.";
|
|
109
109
|
export const LEAD_LANE_KEEP_ALIVE_BLOCKED_RESUME_TEXT = "You ended blocked with no pending question. Record the event you wait on in waiting_on, re-check each blocker, and continue the next unblocked story.";
|
|
110
|
-
export const LEAD_LANE_KEEP_ALIVE_INTERRUPTED_RESUME_TEXT = "Automatic keep-alive resume: your previous turn was interrupted by a provider process exit. Check your last state before continuing. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq
|
|
110
|
+
export const LEAD_LANE_KEEP_ALIVE_INTERRUPTED_RESUME_TEXT = "Automatic keep-alive resume: your previous turn was interrupted by a provider process exit. Check your last state before continuing. Continue the open work from where you stopped. End with done only when story_complete is true; if you are waiting, use hq runners ask or stay in the loop.";
|
|
111
111
|
export function keepAliveNextCheckAtMs(value, nowMs, anchorMs = nowMs) {
|
|
112
112
|
if (typeof value !== "string" || !isIsoDateTime(value))
|
|
113
113
|
return undefined;
|
|
@@ -182,7 +182,7 @@ function readKeepAliveQuestionRecords(hqRoot) {
|
|
|
182
182
|
questions.push(readQuestion(hqRoot, questionId));
|
|
183
183
|
}
|
|
184
184
|
catch (err) {
|
|
185
|
-
process.stderr.write(`hq
|
|
185
|
+
process.stderr.write(`hq runners keep-alive: skipped unreadable question ${questionId}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
return questions;
|
|
@@ -308,7 +308,7 @@ function viewsFromLedger(ledger, now, windowHours) {
|
|
|
308
308
|
}));
|
|
309
309
|
}
|
|
310
310
|
function reportFailure(lane, error) {
|
|
311
|
-
process.stderr.write(`hq
|
|
311
|
+
process.stderr.write(`hq runners: KR freshness disabled for ${lane.lane_id}: ${errorCode(error)}\n`);
|
|
312
312
|
}
|
|
313
313
|
function failedResolution(error, onError) {
|
|
314
314
|
onError(error);
|
package/dist/lib/lanes/links.js
CHANGED
|
@@ -136,7 +136,7 @@ function bindSignalLaneSession(root, sid, env) {
|
|
|
136
136
|
lane = readLane(root, laneId);
|
|
137
137
|
}
|
|
138
138
|
catch {
|
|
139
|
-
process.stderr.write("hq
|
|
139
|
+
process.stderr.write("hq runners signal link: lane record unavailable\n");
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
if (!lane.signal || !lane.signal_link || lane.signal_link !== env.HQ_LANE_SIGNAL_LINK)
|
|
@@ -162,7 +162,7 @@ export function isLinkedSession(root, sid, env = process.env) {
|
|
|
162
162
|
bindSignalLaneSession(root, sid, env);
|
|
163
163
|
}
|
|
164
164
|
catch {
|
|
165
|
-
process.stderr.write("hq
|
|
165
|
+
process.stderr.write("hq runners signal link: could not bind worker session\n");
|
|
166
166
|
return false;
|
|
167
167
|
}
|
|
168
168
|
return Boolean(safeId(sid) && readPointer(root, sid));
|
|
@@ -1053,8 +1053,8 @@ export async function runLaneLink(subcommand, options) {
|
|
|
1053
1053
|
// is refused above, so no session can take over a link it was not given.
|
|
1054
1054
|
if (previousHolds && !handoverTokenValid(meta.handover, token, now())) {
|
|
1055
1055
|
throw new LaneLinkError(tokenProvided ? "handover_token_invalid" : "link_owned", tokenProvided
|
|
1056
|
-
? `The handover token for ${link} is wrong, used, or expired; ask the conductor of record to run hq
|
|
1057
|
-
: `Link ${link} is held by conductor session ${previous}; that session must run hq
|
|
1056
|
+
? `The handover token for ${link} is wrong, used, or expired; ask the conductor of record to run hq runners link handover again`
|
|
1057
|
+
: `Link ${link} is held by conductor session ${previous}; that session must run hq runners link handover and pass you the token`);
|
|
1058
1058
|
}
|
|
1059
1059
|
const at = now().toISOString();
|
|
1060
1060
|
fs.mkdirSync(path.join(links, "by-session"), { recursive: true });
|
package/dist/lib/lanes/loop.js
CHANGED
|
@@ -450,7 +450,7 @@ function acquireRunnerLease(runDir, identity) {
|
|
|
450
450
|
atomicJson(ownerFile, { pid: process.pid, starttime, heartbeat_at: new Date().toISOString() });
|
|
451
451
|
}
|
|
452
452
|
catch (error) {
|
|
453
|
-
process.stderr.write(`hq
|
|
453
|
+
process.stderr.write(`hq runners: loop lease heartbeat failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
454
454
|
}
|
|
455
455
|
}, 15_000);
|
|
456
456
|
atomicJson(ownerFile, { pid: process.pid, starttime, heartbeat_at: new Date().toISOString() });
|
|
@@ -530,7 +530,7 @@ export function enqueueLoopEnvelope(input) {
|
|
|
530
530
|
return { file, dir, record: fileEnvelope(file) };
|
|
531
531
|
}
|
|
532
532
|
catch (error) {
|
|
533
|
-
process.stderr.write(`hq
|
|
533
|
+
process.stderr.write(`hq runners: ignored unreadable loop record ${file}: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
534
534
|
return undefined;
|
|
535
535
|
}
|
|
536
536
|
})
|
|
@@ -33,7 +33,7 @@ function curlImds(method, url, headers) {
|
|
|
33
33
|
return body.length > 0 ? body : null;
|
|
34
34
|
}
|
|
35
35
|
catch (err) {
|
|
36
|
-
process.stderr.write(`hq
|
|
36
|
+
process.stderr.write(`hq runners: IMDS request failed for ${url}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -81,7 +81,7 @@ export function resolveMachineIdentity(deps = {}) {
|
|
|
81
81
|
imdsId = typeof raw === "string" && raw.trim() !== "" ? raw.trim() : null;
|
|
82
82
|
}
|
|
83
83
|
catch (err) {
|
|
84
|
-
process.stderr.write(`hq
|
|
84
|
+
process.stderr.write(`hq runners: IMDS identity lookup failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
85
85
|
}
|
|
86
86
|
let hostname = null;
|
|
87
87
|
try {
|
|
@@ -90,7 +90,7 @@ export function resolveMachineIdentity(deps = {}) {
|
|
|
90
90
|
hostname = typeof host === "string" && host.trim() !== "" ? host.trim() : null;
|
|
91
91
|
}
|
|
92
92
|
catch (err) {
|
|
93
|
-
process.stderr.write(`hq
|
|
93
|
+
process.stderr.write(`hq runners: hostname identity lookup failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
94
94
|
if (!imdsId) {
|
|
95
95
|
return {
|
|
96
96
|
status: "unresolvable",
|
package/dist/lib/lanes/models.js
CHANGED
|
@@ -54,7 +54,7 @@ export function codexKnownModels(home, readFileSync = (p, enc) => fs.readFileSyn
|
|
|
54
54
|
return null;
|
|
55
55
|
// EACCES, EISDIR, EIO: the list cannot be read, which is the same
|
|
56
56
|
// contract as a missing or corrupt cache. Reported, never an internal failure.
|
|
57
|
-
process.stderr.write(`hq
|
|
57
|
+
process.stderr.write(`hq runners: cannot read ${source} (${err instanceof Error ? err.message : String(err)}); --model is not validated for codex\n`);
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
let parsed;
|
|
@@ -62,7 +62,7 @@ export function codexKnownModels(home, readFileSync = (p, enc) => fs.readFileSyn
|
|
|
62
62
|
parsed = JSON.parse(text);
|
|
63
63
|
}
|
|
64
64
|
catch (err) {
|
|
65
|
-
process.stderr.write(`hq
|
|
65
|
+
process.stderr.write(`hq runners: ${source} is not JSON (${err instanceof Error ? err.message : String(err)}); --model is not validated for codex\n`);
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
68
|
if (!isPlainObject(parsed) || !Array.isArray(parsed.models))
|
|
@@ -112,12 +112,12 @@ export function grokKnownModels(home, probe = defaultProbe, env = process.env) {
|
|
|
112
112
|
// print a partial list and then fail; an id missing from that output must
|
|
113
113
|
// not refuse the model, so a failed probe skips validation.
|
|
114
114
|
if (result.status !== 0) {
|
|
115
|
-
process.stderr.write(`hq
|
|
115
|
+
process.stderr.write(`hq runners: \`${source}\` failed (exit ${result.status ?? "spawn error"}${result.stderr.trim() ? `: ${result.stderr.trim().split("\n")[0]}` : ""}); --model is not validated for grok\n`);
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
118
118
|
const ids = parseGrokModelsOutput(result.stdout);
|
|
119
119
|
if (ids.length === 0) {
|
|
120
|
-
process.stderr.write(`hq
|
|
120
|
+
process.stderr.write(`hq runners: \`${source}\` listed no models (exit ${result.status ?? "spawn error"}${result.stderr.trim() ? `: ${result.stderr.trim().split("\n")[0]}` : ""}); --model is not validated for grok\n`);
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
123
|
return { provider: "grok", ids, prefixes: [], source };
|
|
@@ -160,12 +160,12 @@ export function claudeKnownModels(probe = defaultProbe, env = process.env) {
|
|
|
160
160
|
const source = "claude --help";
|
|
161
161
|
const result = probe("claude", ["--help"], env);
|
|
162
162
|
if (result.status !== 0) {
|
|
163
|
-
process.stderr.write(`hq
|
|
163
|
+
process.stderr.write(`hq runners: \`${source}\` failed (exit ${result.status ?? "spawn error"}${result.stderr.trim() ? `: ${result.stderr.trim().split("\n")[0]}` : ""}); --model is not validated for claude\n`);
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
166
166
|
const parsed = parseClaudeHelpModels(result.stdout);
|
|
167
167
|
if (parsed.aliases.length === 0 && parsed.prefixes.length === 0) {
|
|
168
|
-
process.stderr.write(`hq
|
|
168
|
+
process.stderr.write(`hq runners: \`${source}\` named no --model aliases (exit ${result.status ?? "spawn error"}); --model is not validated for claude\n`);
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
171
171
|
// Every Claude model's full name starts with `claude-`. Accept it even when
|
package/dist/lib/lanes/quota.js
CHANGED
|
@@ -644,7 +644,7 @@ export function clearAccountQuotaAfterSuccessfulTurnBestEffort(hqRoot, provider,
|
|
|
644
644
|
}
|
|
645
645
|
catch (err) {
|
|
646
646
|
const detail = err instanceof Error ? err.message : String(err);
|
|
647
|
-
process.stderr.write(`hq
|
|
647
|
+
process.stderr.write(`hq runners: quota cleanup after successful turn failed for provider=${provider} account=${accountId} model=${model}: ${detail}\n`);
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
function shouldReplaceReset(current, incoming) {
|
|
@@ -102,7 +102,7 @@ function shellQuote(v) {
|
|
|
102
102
|
return /^[A-Za-z0-9_./:-]+$/.test(v) ? v : `'${v.replace(/'/g, `'\\''`)}'`;
|
|
103
103
|
}
|
|
104
104
|
export function renderReconcileService(opts) {
|
|
105
|
-
const exec = [opts.nodeBinary, opts.hqBinary, "
|
|
105
|
+
const exec = [opts.nodeBinary, opts.hqBinary, "runners", "reconcile"]
|
|
106
106
|
.map(shellQuote)
|
|
107
107
|
.join(" ");
|
|
108
108
|
const home = opts.home ?? os.homedir();
|
|
@@ -168,7 +168,7 @@ function writeIfChanged(filePath, contents) {
|
|
|
168
168
|
catch (unlinkErr) {
|
|
169
169
|
const unlinkCode = unlinkErr.code;
|
|
170
170
|
if (unlinkCode !== "ENOENT") {
|
|
171
|
-
process.stderr.write(`hq
|
|
171
|
+
process.stderr.write(`hq runners reconcile install: unlink tmp failed for ${tmp}: ${unlinkErr instanceof Error ? unlinkErr.message : String(unlinkErr)}\n`);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
throw err;
|
|
@@ -237,7 +237,7 @@ export function uninstallReconcileTimer(opts) {
|
|
|
237
237
|
RECONCILE_TIMER_NAME,
|
|
238
238
|
]);
|
|
239
239
|
if (disable.status !== 0) {
|
|
240
|
-
process.stderr.write(`hq
|
|
240
|
+
process.stderr.write(`hq runners reconcile uninstall: systemctl disable exited ${disable.status}: ${(disable.stderr ?? "").trim()}\n`);
|
|
241
241
|
}
|
|
242
242
|
opts.runCommand("systemctl", ["--user", "daemon-reload"]);
|
|
243
243
|
}
|
|
@@ -110,12 +110,12 @@ async function resumeDueQuotaHeldLanes(hqRoot, lanes, summary, deps, now) {
|
|
|
110
110
|
const message = error instanceof Error ? error.message : String(error);
|
|
111
111
|
summary.errors.push({ message: `${lane.lane_id}: quota retry failed: ${message}` });
|
|
112
112
|
summary.ok = false;
|
|
113
|
-
process.stderr.write(`hq
|
|
113
|
+
process.stderr.write(`hq runners reconcile: quota retry failed for ${lane.lane_id}: ${message}\n`);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
function logSkip(skip) {
|
|
118
|
-
process.stderr.write(`hq
|
|
118
|
+
process.stderr.write(`hq runners reconcile: skipped ${skip.kind}${skip.id ? ` ${skip.id}` : ""}: ${skip.why}\n`);
|
|
119
119
|
}
|
|
120
120
|
function emptySummary(dryRun) {
|
|
121
121
|
return {
|
|
@@ -149,7 +149,7 @@ function recordMissingCodexHomeNote(summary, home) {
|
|
|
149
149
|
const note = `Codex rollout retention skipped home absent on this host: ${home}`;
|
|
150
150
|
summary.notes ??= [];
|
|
151
151
|
summary.notes.push(note);
|
|
152
|
-
process.stderr.write(`hq
|
|
152
|
+
process.stderr.write(`hq runners reconcile: note: ${note}\n`);
|
|
153
153
|
}
|
|
154
154
|
function homeIsMissingAfterError(home, error) {
|
|
155
155
|
if (!isMissingPathError(error))
|
|
@@ -172,7 +172,7 @@ function terminalizeModelUnsupported(hqRoot, lane, err) {
|
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
catch (writeErr) {
|
|
175
|
-
process.stderr.write(`hq
|
|
175
|
+
process.stderr.write(`hq runners reconcile: failed to terminalize ${lane.lane_id} after model validation: ${writeErr instanceof Error ? writeErr.message : String(writeErr)}\n`);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
function markError(summary, err) {
|
|
@@ -180,7 +180,7 @@ function markError(summary, err) {
|
|
|
180
180
|
const code = err instanceof LanesError ? err.error : undefined;
|
|
181
181
|
summary.errors.push(code ? { message, code } : { message });
|
|
182
182
|
summary.ok = false;
|
|
183
|
-
process.stderr.write(`hq
|
|
183
|
+
process.stderr.write(`hq runners reconcile: ${message}${err instanceof Error && err.stack ? `\n${err.stack}` : ""}\n`);
|
|
184
184
|
}
|
|
185
185
|
export function reconcileHeartbeatPath(hqRoot) {
|
|
186
186
|
return path.join(hqRoot, "workspace", "lanes-runs", "reconcile-heartbeat.json");
|
|
@@ -926,7 +926,7 @@ function writeHeartbeatFile(hqRoot, summary, at) {
|
|
|
926
926
|
catch (unlinkErr) {
|
|
927
927
|
const code = unlinkErr.code;
|
|
928
928
|
if (code !== "ENOENT") {
|
|
929
|
-
process.stderr.write(`hq
|
|
929
|
+
process.stderr.write(`hq runners reconcile: unlink heartbeat tmp failed: ${unlinkErr instanceof Error ? unlinkErr.message : String(unlinkErr)}\n`);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
throw err;
|
|
@@ -963,7 +963,7 @@ async function withReconcileLock(hqRoot, fn) {
|
|
|
963
963
|
fs.closeSync(fd);
|
|
964
964
|
}
|
|
965
965
|
catch (err) {
|
|
966
|
-
process.stderr.write(`hq
|
|
966
|
+
process.stderr.write(`hq runners reconcile: lock close failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
967
967
|
}
|
|
968
968
|
try {
|
|
969
969
|
// Unlink only our own lock; a reclaimer may have replaced it.
|
|
@@ -974,7 +974,7 @@ async function withReconcileLock(hqRoot, fn) {
|
|
|
974
974
|
catch (err) {
|
|
975
975
|
const code = err.code;
|
|
976
976
|
if (code !== "ENOENT") {
|
|
977
|
-
process.stderr.write(`hq
|
|
977
|
+
process.stderr.write(`hq runners reconcile: lock unlink failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
980
|
}
|
|
@@ -990,14 +990,14 @@ async function withReconcileLock(hqRoot, fn) {
|
|
|
990
990
|
if (reclaimStaleLock(lockPath, {
|
|
991
991
|
staleMs: RECONCILE_LOCK_STALE_MS,
|
|
992
992
|
liveOwnerMaxMs: liveOwnerMaxMs(),
|
|
993
|
-
label: "hq
|
|
993
|
+
label: "hq runners reconcile",
|
|
994
994
|
}))
|
|
995
995
|
continue;
|
|
996
996
|
}
|
|
997
997
|
catch (statErr) {
|
|
998
998
|
const statCode = statErr.code;
|
|
999
999
|
if (statCode !== "ENOENT") {
|
|
1000
|
-
process.stderr.write(`hq
|
|
1000
|
+
process.stderr.write(`hq runners reconcile: stale-lock probe failed: ${statErr instanceof Error ? statErr.message : String(statErr)}\n`);
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 10);
|
|
@@ -1401,7 +1401,7 @@ export async function runPassBody(hqRoot, deps) {
|
|
|
1401
1401
|
if (!(err instanceof LanesError))
|
|
1402
1402
|
throw err;
|
|
1403
1403
|
maxAgedAdvances = MAX_AGED_ADVANCES;
|
|
1404
|
-
process.stderr.write(`hq
|
|
1404
|
+
process.stderr.write(`hq runners reconcile: lane depth config failed for company=${JSON.stringify(question.company?.slug)}; using default ${MAX_LANE_DEPTH}: ${err.message}\n`);
|
|
1405
1405
|
}
|
|
1406
1406
|
if (shouldAgeQuestion(question, audience, nowMs, questionAgeWindowMs(audience), maxAgedAdvances)) {
|
|
1407
1407
|
const nextHop = question.hop + 1;
|
|
@@ -1892,7 +1892,7 @@ async function heartbeatAndDeadHosts(hqRoot, lanes, summary, deps, now) {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
catch (sizeErr) {
|
|
1894
1894
|
const sizeMessage = sizeErr instanceof Error ? sizeErr.message : String(sizeErr);
|
|
1895
|
-
process.stderr.write(`hq
|
|
1895
|
+
process.stderr.write(`hq runners reconcile: run size not recorded before account failover for ${lane.lane_id}: ${sizeMessage}\n`);
|
|
1896
1896
|
// The write did not land, so the classified record is still current.
|
|
1897
1897
|
retryLane = classified;
|
|
1898
1898
|
}
|
|
@@ -1910,7 +1910,7 @@ async function heartbeatAndDeadHosts(hqRoot, lanes, summary, deps, now) {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
catch (err) {
|
|
1912
1912
|
const message = err instanceof Error ? err.message : String(err);
|
|
1913
|
-
process.stderr.write(`hq
|
|
1913
|
+
process.stderr.write(`hq runners reconcile: account failover failed for ${lane.lane_id}: ${message}\n`);
|
|
1914
1914
|
if (readLane(hqRoot, lane.lane_id).state !== "running") {
|
|
1915
1915
|
summary.errors.push({ message: `${lane.lane_id}: account failover left a non-running record after ${message}` });
|
|
1916
1916
|
continue;
|
|
@@ -1934,7 +1934,7 @@ async function heartbeatAndDeadHosts(hqRoot, lanes, summary, deps, now) {
|
|
|
1934
1934
|
state: "failed",
|
|
1935
1935
|
reason: `question_record_refused:${questionRefusalCode}`,
|
|
1936
1936
|
};
|
|
1937
|
-
process.stderr.write(`hq
|
|
1937
|
+
process.stderr.write(`hq runners reconcile: terminal ask refused for ${lane.lane_id}: ${questionRefusalCode}\n`);
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
1940
|
let terminalEnvelope = latest?.envelope;
|
|
@@ -2043,7 +2043,7 @@ async function heartbeatAndDeadHosts(hqRoot, lanes, summary, deps, now) {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
catch (err) {
|
|
2045
2045
|
const message = err instanceof Error ? err.message : String(err);
|
|
2046
|
-
process.stderr.write(`hq
|
|
2046
|
+
process.stderr.write(`hq runners reconcile: quota notice failed for ${lane.lane_id}: ${message}\n`);
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
2049
|
if (result.changed) {
|
|
@@ -2549,7 +2549,7 @@ function recordKeepAliveSkip(hqRoot, lane, reason, summary, deps, detail) {
|
|
|
2549
2549
|
});
|
|
2550
2550
|
if (lane.keep_alive === true) {
|
|
2551
2551
|
summary.keep_alive_blocked.push({ id: lane.lane_id, reason });
|
|
2552
|
-
process.stderr.write(`hq
|
|
2552
|
+
process.stderr.write(`hq runners reconcile: keep-alive blocked for lane ${lane.lane_id} (${reason}); ${keepAliveSkipGuidance(lane.lane_id, reason)}\n`);
|
|
2553
2553
|
}
|
|
2554
2554
|
if (deps.dryRun)
|
|
2555
2555
|
return;
|
|
@@ -184,13 +184,13 @@ async function runInside(args) {
|
|
|
184
184
|
tmux(socket, ["kill-session", "-t", session]);
|
|
185
185
|
const started = tmux(socket, ["new-session", "-d", "-s", session, "-c", process.cwd(), command]);
|
|
186
186
|
if (started.status !== 0) {
|
|
187
|
-
process.stderr.write(`hq
|
|
187
|
+
process.stderr.write(`hq runners: could not start Remote Control terminal: ${started.stderr}\n`);
|
|
188
188
|
return 1;
|
|
189
189
|
}
|
|
190
190
|
const retained = tmux(socket, ["set-option", "-t", session, "remain-on-exit", "on"]);
|
|
191
191
|
if (retained.status !== 0) {
|
|
192
192
|
tmux(socket, ["kill-session", "-t", session]);
|
|
193
|
-
process.stderr.write(`hq
|
|
193
|
+
process.stderr.write(`hq runners: could not retain Remote Control terminal output: ${retained.stderr}\n`);
|
|
194
194
|
return 1;
|
|
195
195
|
}
|
|
196
196
|
let stopped = false;
|
|
@@ -200,7 +200,7 @@ async function runInside(args) {
|
|
|
200
200
|
try {
|
|
201
201
|
while (!stopped) {
|
|
202
202
|
if (!ownedForwarder(readyFile, accountId)) {
|
|
203
|
-
process.stderr.write(`hq
|
|
203
|
+
process.stderr.write(`hq runners: daemon inference forwarder for account ${accountId} stopped\n`);
|
|
204
204
|
return 1;
|
|
205
205
|
}
|
|
206
206
|
if (fs.existsSync(envelopePath)) {
|
|
@@ -211,7 +211,7 @@ async function runInside(args) {
|
|
|
211
211
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
212
212
|
}
|
|
213
213
|
if (!fs.existsSync(transcript)) {
|
|
214
|
-
process.stderr.write("hq
|
|
214
|
+
process.stderr.write("hq runners: Remote Control wrote an envelope but its session transcript is missing\n");
|
|
215
215
|
return 1;
|
|
216
216
|
}
|
|
217
217
|
process.stdout.write(`${JSON.stringify({ type: "result", session_id: sessionId })}\n`);
|
|
@@ -223,7 +223,7 @@ async function runInside(args) {
|
|
|
223
223
|
const paneText = remoteControlFailureText(socket, session);
|
|
224
224
|
if (paneText.trim())
|
|
225
225
|
process.stderr.write(`${paneText}\n`);
|
|
226
|
-
process.stderr.write("hq
|
|
226
|
+
process.stderr.write("hq runners: Remote Control terminal exited before the lane envelope was written\n");
|
|
227
227
|
return 1;
|
|
228
228
|
}
|
|
229
229
|
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
@@ -268,7 +268,7 @@ async function runOuter(args) {
|
|
|
268
268
|
process.once("SIGTERM", forward);
|
|
269
269
|
process.once("SIGINT", forward);
|
|
270
270
|
child.once("error", (error) => {
|
|
271
|
-
process.stderr.write(`hq
|
|
271
|
+
process.stderr.write(`hq runners: Remote Control namespace could not start: ${error.message}\n`);
|
|
272
272
|
finish(127);
|
|
273
273
|
});
|
|
274
274
|
child.once("exit", (code) => finish(code ?? 1));
|
|
@@ -345,7 +345,7 @@ async function withReviewRecordLock(file, action) {
|
|
|
345
345
|
fs.closeSync(fd);
|
|
346
346
|
}
|
|
347
347
|
catch (error) {
|
|
348
|
-
process.stderr.write(`hq
|
|
348
|
+
process.stderr.write(`hq runners review: lock close failed for ${lockPath}: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
349
349
|
}
|
|
350
350
|
if (ownedStat) {
|
|
351
351
|
try {
|
|
@@ -355,7 +355,7 @@ async function withReviewRecordLock(file, action) {
|
|
|
355
355
|
}
|
|
356
356
|
catch (error) {
|
|
357
357
|
if (error.code !== "ENOENT") {
|
|
358
|
-
process.stderr.write(`hq
|
|
358
|
+
process.stderr.write(`hq runners review: lock cleanup failed for ${lockPath}: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
}
|