Line

ui/server/src/reviewWorker

runs ONE analysis in a child process, so the synchronous PR-health engine (seconds on a big change) can never stall the Cockpit server's request thread.

Cockpit server, v0.9. Source: ui/server/src/reviewWorker.mjs.

Variables#

MAX_SUMMARIZED#

const MAX_SUMMARIZED: 40 = 40

Defined in: ui/server/src/reviewWorker.mjs:12

How many changed files get a "what it now does" sentence; the rest are one "+N more" row.

Functions#

analyse()#

analyse(__namedParameters, deps?): { error?: undefined; ok: boolean; units: any[]; unitsError?: any; unitsOmitted: any; } | { error: any; ok: boolean; } | { error?: undefined; ok: boolean; report: any; units: any[]; unitsError?: any; unitsOmitted: any; worker: { pid: any; }; }

Defined in: ui/server/src/reviewWorker.mjs:34

The whole job. baseSha/headSha are commit ids the parent took from its validated branch list. unitsOnly skips the PR-health computation, which the real CLI did in another process, and answers only the "what it now does" rows for the given files.

Parameters#

__namedParameters
baseSha

any

expected

any

files

any

headSha

any

root

any

unitsOnly

any

deps?
prHealth

(root, request, opts?) => any

summarizeChangedUnits

(root, headSha, files) => { error: any; omitted: any; units: any[]; } | { error?: undefined; omitted: number; units: any[]; }

Returns#

{ error?: undefined; ok: boolean; units: any[]; unitsError?: any; unitsOmitted: any; } | { error: any; ok: boolean; } | { error?: undefined; ok: boolean; report: any; units: any[]; unitsError?: any; unitsOmitted: any; worker: { pid: any; }; }


summarizeChangedUnits()#

summarizeChangedUnits(root, headSha, files): { error: any; omitted: any; units: any[]; } | { error?: undefined; omitted: number; units: any[]; }

Defined in: ui/server/src/reviewWorker.mjs:16

What each changed unit does on the HEAD commit, from summarizeUnit (deterministic, no model).

Parameters#

root

any

headSha

any

files

any

Returns#

{ error: any; omitted: any; units: any[]; } | { error?: undefined; omitted: number; units: any[]; }