mirror of
https://github.com/morluto/rea.git
synced 2026-11-04 22:06:10 +00:00
Share ledger status, coverage, reports, graphs, Evidence links and closure commitments between the producer and readiness validation. Preserve limitation-driven unknown results and reject stale or inconsistent projections. Distinguish malformed CDP response envelopes from unavailable JSON payload shapes. Validate required encoding flags and preserve partial request facts. Validation: 116 focused tests, static and architecture checks, documentation checks. Browser regression coverage uses controlled CDP responses.
25 lines
987 B
TypeScript
25 lines
987 B
TypeScript
import type {
|
|
ReconstructionObligation,
|
|
ReconstructionObligationManifest,
|
|
} from "../domain/reconstructionObligationLedgerSchemas.js";
|
|
import { reconstructionObligationEvidenceIds } from "../domain/reconstructionObligationLedgerIntegrity.js";
|
|
import { compareUnicodeCodePoints } from "../domain/unicodeCodePointOrder.js";
|
|
|
|
export const obligationLedgerEvidenceLinks = (
|
|
obligations: readonly ReconstructionObligation[],
|
|
manifest: ReconstructionObligationManifest,
|
|
): string[] =>
|
|
[
|
|
...new Set([
|
|
...reconstructionObligationEvidenceIds(obligations),
|
|
...manifest.bindings.flatMap((binding) => [
|
|
...binding.original_cases.map(({ evidence_id: id }) => id),
|
|
...binding.fixtures.flatMap(({ evidence_ids: ids }) => ids),
|
|
...(binding.verifier === null
|
|
? []
|
|
: [binding.verifier.result_evidence_id]),
|
|
]),
|
|
...manifest.contradictions.flatMap(({ evidence_ids: ids }) => ids),
|
|
]),
|
|
].sort(compareUnicodeCodePoints);
|