1'use strict';23// Per-record operator choice to import a dependent without a parent link. A waiver is scoped to4// the exact site, task, dependent key, parent key, and current parent status.5const fs = require('node:fs');6const path = require('node:path');7const crypto = require('node:crypto');8const FILE = 'execution/link-waivers.json';
34 const current = finals.get([row.sourceStableKey, row.ref, row.dependencySourceKey].join('\n'));
35 if (!current) throw refuse('dependency-link-waiver-refused', `${row.sourceStableKey} is not waiting on a final ${row.ref} parent ${row.dependencySourceKey}`, row);
36 if (current.linkRequired) throw refuse('dependency-link-waiver-impossible', `${row.sourceStableKey} cannot exist without its ${row.ref} link; fix ${row.dependencySourceKey} and re-run instead`, row);
37 if (current.linkChoice !== 'offer-omit' && (explicitRequest !== true || !nonEmpty(warning))) throw refuse('dependency-link-waiver-refused', `importing without ${row.ref} requires an explicit request and warning`, row);