import { Seam } from '../seam.js'

/**
 * Audit trail and evidentiary record. SEAM — owned by #21.
 *
 * Four consecutive resolutions have handed protest surface here, and the
 * inputs are already fixed even though the retention and query design is not:
 *
 *   #14  the release matrix must be VERSIONED, and release_level's inputs
 *        reconstructable, or a past release cannot be explained. export_event.
 *   #15  score commits, rubric amendments with their voided-score set,
 *        gate results, and model_version per suggestion.
 *   #16  confirmation events with a confirmer per requirement,
 *        "not an obligation" dismissals with their author, amendment
 *        classification, and vendor omission reports WITH whether they were
 *        acted on — the strongest protest artifact on the map.
 *   #12  the invited set at issue, and the stage timeline.
 */
export interface AuditWriter {
  recordScoreCommit(e: { responseId: string; criterionId: string; by: string }): Promise<void>
  recordRubricAmendment(e: { solicitationId: string; voided: string[]; by: string }): Promise<void>
  recordSweepDismissal(e: { findingId: string; by: string }): Promise<void>
  recordExport(e: { orgId: string; classes: string[]; rowCount: number }): Promise<void>
}

export const auditWriter: AuditWriter = {
  async recordScoreCommit() { throw new Seam('#21', 'the audit trail') },
  async recordRubricAmendment() { throw new Seam('#21', 'the audit trail') },
  async recordSweepDismissal() { throw new Seam('#21', 'the audit trail') },
  async recordExport() { throw new Seam('#21', 'the audit trail') },
}
