MCPcopy Create free account
hub / github.com/cli/cli / readyForActor

Function readyForActor

evals/src/suites/events/commands.ts:81–86  ·  view source on GitHub ↗
(wait: Call, calls: Call[], now: number)

Source from the content-addressed store, hash-verified

79 * agent must have finished a status read started after the attachment, or had the catch-up limit to do so. Acting
80 * sooner lets that read reveal the change before the listener can deliver it, which a real reviewer rarely causes. */
81export function readyForActor(wait: Call, calls: Call[], now: number): boolean {
82 const attached = attachedSince(wait);
83 if (attached === undefined || now - attached < actorReactionDelayMs) return false;
84 return now - attached >= actorCatchUpLimitMs || calls.some(call => call.startedAt >= attached
85 && call.endedAt !== undefined && statusRead(call) !== undefined);
86}
87
88/** Repeated successful reads of the same projection between events count as polling. */
89export function statusRead(call: Call): string | undefined {

Callers 2

commands.test.tsFile · 0.85
startFunction · 0.85

Calls 2

attachedSinceFunction · 0.85
statusReadFunction · 0.85

Tested by

no test coverage detected