Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 38x | /**
* Review Coordination
*
* Safety checks for stale comment resolution across multiple triggers.
*/
import type { SkillReport } from '../../types/index.js';
import type { RenderResult } from '../../output/types.js';
// -----------------------------------------------------------------------------
// Types
// -----------------------------------------------------------------------------
/**
* A trigger's execution result. The subset of fields from TriggerResult
* needed for stale comment resolution decisions.
*/
export interface TriggerExecutionResult {
/** Name of the trigger (e.g., "security-review") */
triggerName: string;
/** Skill report, present when trigger succeeded */
report?: SkillReport;
/** Rendered review/comments, present when trigger succeeded */
renderResult?: RenderResult;
/** Error, present when trigger failed */
error?: unknown;
}
// -----------------------------------------------------------------------------
// Functions
// -----------------------------------------------------------------------------
/**
* Check if stale comment resolution should proceed.
*
* Returns false if any trigger failed, because failed triggers may have
* had findings that we can no longer verify are fixed.
*/
export function shouldResolveStaleComments(results: TriggerExecutionResult[]): boolean {
return results.every((r) => !r.error);
}
|