pinCarrierBlock function
Renders the verbatim pin block (the fold carrier / resume notice
body). Empty pins → empty string (E1: no empty carrier block).
restoredKeys marks pins that were absent from the window and are
restored verbatim by this block (AC3 repair — reported, never silent).
Implementation
String pinCarrierBlock(
SkillOperativePins registry, {
Set<String> restoredKeys = const {},
}) {
if (registry.pins.isEmpty) return '';
return '$pinBlockOpenTag\n'
'Operative directives pinned verbatim from skill manifests — follow '
'them even where the original skill text was compacted away:\n'
'${registry.pins.map((pin) => _renderPinLine(pin, restored: restoredKeys.contains(pin.contentKey))).join('\n')}\n'
'$pinBlockCloseTag';
}