Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/server/src/reviewRunner

runs ONE analysis in a forked child process (reviewWorker.mjs), so the synchronous PR-health engine can never stall the Cockpit server's request thread.

Cockpit server, next. Source: ui/server/src/reviewRunner.mjs.

Variables#

CANCEL_GRACE_MS#

const CANCEL_GRACE_MS: 3000 = 3_000

Defined in: ui/server/src/reviewRunner.mjs:19


JOB_TIMEOUT_MS#

const JOB_TIMEOUT_MS: 180000 = 180_000

Defined in: ui/server/src/reviewRunner.mjs:18


WORKER#

const WORKER: any

Defined in: ui/server/src/reviewRunner.mjs:17

Functions#

forkRunner()#

forkRunner(job, opts?): Promise<any>

Defined in: ui/server/src/reviewRunner.mjs:50

Default runner: one child process per job. Resolves to the worker's result object; never rejects.

Parameters#

job

any

{root, baseSha, headSha, expected?} (validated by the caller)

opts?

reclaim removes what a SIGKILLed child left behind (default: the review worker's temporary checkouts; passes its own for a test run). what is the noun in the messages.

graceMs?

number = CANCEL_GRACE_MS

onProgress?

(m) => void

reclaim?

(pid, root) => void = reclaimTreesOf

signal?

AbortSignal

timeoutMs?

number = JOB_TIMEOUT_MS

what?

string = 'analysis'

worker?

string = WORKER

Returns#

Promise<any>