evaluateEvidence (evidence-gate.ts)

oh-my-matrix · evidence-gate, validation-evaluation, pure-functions, automation

M2.6 Evidence Gate Evaluates validation command results before marking a run as done. Pure functions — no command execution, no I/O. /

/**
 * M2.6 Evidence Gate
 *
 * Evaluates validation command results before marking a run as done.
 * Pure functions — no command execution, no I/O.
 */
import type { ValidationCommand, EvidenceCommandResult, EvidenceSummary } from './types';

export interface EvaluateEvidenceInput {
  commands: ValidationCommand[];
  results: EvidenceCommandResult[];
  diffSummary: string;
  now: number;
  failOnOptional?: boolean;
  /** V1: commands configured but dropped at load (S1 allowlist) — a dropped
   *  required command means "configured but didn't run" (not_executed), NOT
   *  "never configured" (not_configured → done). */
  droppedCommands?: number;
}

const MAX_DIFF_SUMMARY_LENGTH = 500;

/**
 * Evaluate evidence from validation command results.
 * Returns an EvidenceSummary with pass/fail/s

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key