StandalonePrCriticService
Defined in: src/standalone-critic.ts:134
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new StandalonePrCriticService(
deps):StandalonePrCriticService
Defined in: src/standalone-critic.ts:183
Parameters
Section titled “Parameters”Returns
Section titled “Returns”StandalonePrCriticService
Methods
Section titled “Methods”inFlightKeys()
Section titled “inFlightKeys()”inFlightKeys():
string[]
Defined in: src/standalone-critic.ts:656
PR keys with a critic run currently in flight (for diagnostics / shutdown).
Returns
Section titled “Returns”string[]
inflightWorktrees()
Section titled “inflightWorktrees()”inflightWorktrees():
string[]
Defined in: src/standalone-critic.ts:662
Worktree paths of standalone critic runs currently owned in-memory — the GC sweep must spare these (a re-adopted #631 orphan’s tick() still needs its worktree).
Returns
Section titled “Returns”string[]
stopAll()
Section titled “stopAll()”stopAll():
void
Defined in: src/standalone-critic.ts:667
Tear down every in-flight run (reap its terminal + worktree). For process shutdown.
Returns
Section titled “Returns”void
sweep()
Section titled “sweep()”sweep():
Promise<void>
Defined in: src/standalone-critic.ts:218
The 60s enumeration. For each swept repo (round-robin), list its open PRs, filter to the session-less ones worth reviewing, and spawn a critic for as many as the global concurrency cap allows — deferring (and logging) the rest to the next sweep.
The swept set is the UNION of (a) repos with criticAllPrs ON and (b) repos with a pending
epic LANDING PR (Stage B, #635). An epic completion opens an aggregate PR off the epic
integration branch; the operator wants the critic to review THAT PR even when the repo never
opted into all-PR review — so (b) is added unconditionally. We must union at the SWEEP level,
not just in eligible(): if no repo has criticAllPrs, an eligible()-only widening would never
run because sweep() early-returns here before ever calling sweepRepo. eligible() then carves
the (b)-only repos down to JUST the landing PR (head == the integration branch).
Returns
Section titled “Returns”Promise<void>
tick()
Section titled “tick()”tick():
Promise<void>
Defined in: src/standalone-critic.ts:529
The 15s finalize poll. Mirror ReviewService.tick: for each in-flight run not already finalizing, read its verdict file; if absent and not timed out, leave it running; else claim the finalizing guard and finalize in a try/finally that always drops the entry (so a throw can’t wedge the run forever / leak its worktree+terminal).
Returns
Section titled “Returns”Promise<void>