import type { SemanticGraph } from './compiler.js'; import type { EvidenceLocator, EvidenceReport, EvidenceResult } from './evidence.js'; import type { ArtifactCoverage } from './artifact-coverage.js'; export interface AssertedRelationship { readonly from: string; readonly to: string; readonly kind: string; readonly name?: string; } export interface DeclaredSource { readonly document: string; readonly path: string; readonly pointer: string; readonly line: number; readonly column: number; } export interface ExpectationComparison { readonly provider: string; readonly key: string; readonly expected: string; readonly observed: string; readonly declared: DeclaredSource; } export interface UnobservedExpectation { readonly claim: string; readonly subject: string; readonly provider: string; readonly key: string; readonly expected: string; readonly declared: DeclaredSource; } export interface EvidenceFinding { readonly target: { readonly type: 'subject' | 'claim'; readonly id: string; }; readonly asserted?: AssertedRelationship; readonly expectation?: ExpectationComparison; readonly result: Exclude; readonly provider: string; readonly evidenceDocument: string; readonly evidence: EvidenceLocator; } export interface StaleAttestationFinding { readonly target: { readonly type: 'subject'; readonly id: string; }; readonly result: 'stale-attestation'; readonly attestation: { readonly topic: string; readonly by: string; readonly on: string; }; readonly provider: 'git'; readonly changedAt?: string; readonly evidence: EvidenceLocator; } export interface UnconfirmedAttestationFinding { readonly target: { readonly type: 'subject'; readonly id: string; }; readonly result: 'unconfirmed-attestation'; readonly attestation: { readonly topic: string; readonly by: string; readonly recordedBy: string; readonly on: string; }; readonly provider: 'model'; readonly declared: DeclaredSource; } export type ReconciliationFinding = EvidenceFinding | StaleAttestationFinding | UnconfirmedAttestationFinding; export interface AttestationStaleness { readonly findings: readonly StaleAttestationFinding[]; readonly notes: readonly string[]; } export interface ReconciliationReport { readonly format: 'yarramate/reconciliation-report/v1'; readonly workspace: string; readonly summary: { readonly evidenceDocuments: number; readonly observations: number; readonly confirmed: number; readonly findings: number; readonly contradicted: number; readonly unknown: number; readonly notObserved: number; /** * `not-observed` observations naming no search. A negative claim about a * tree nobody read exhaustively is the one result whose message nothing * can check, so the ones offering a reader nothing to re-run are counted * rather than left to read like any other finding (ADR 0107). */ readonly unsupportedAbsences?: number; readonly subjectsWithoutEvidence: number; readonly staleAttestations?: number; readonly unconfirmedAttestations?: number; readonly expectationsCompared: number; readonly expectationsWithoutObservation: number; /** * Files the declared coverage scope selected, and the ones no * observation's `repo:` locator claims (ADR 0130). Both appear exactly * when coverage was assessed, so a report without them is one that * never looked, not one that found nothing. */ readonly artifactsInScope?: number; readonly unclaimedArtifacts?: number; }; readonly findings: readonly ReconciliationFinding[]; readonly unobservedSubjects?: readonly string[]; readonly unobservedExpectations?: readonly UnobservedExpectation[]; /** * The coverage patterns as the manifest declared them, echoed so the * report is honest about what it was asked to look at (ADR 0130). */ readonly coverageScope?: readonly string[]; /** * In-scope artifacts no observation claims, sorted. Absence, never * accusation: no finding is fabricated and `check --strict` never reads * this (ADR 0130), the line ADR 0049 drew for unobserved subjects. */ readonly unclaimedArtifacts?: readonly string[]; readonly notes?: readonly string[]; } export declare const constraintExpectsPredicate = "yarramate/constraint/expects"; export declare function reconcileEvidenceReports(workspace: string, reports: readonly EvidenceReport[], graph?: SemanticGraph, staleness?: AttestationStaleness, coverage?: ArtifactCoverage): ReconciliationReport;