11/**
2- * AssetPack Pipeline
2+ * AssetPack domain library for **synthesis** SDIVF product pipelines
3+ * (deposit + read) and shared measurement/selection primitives.
34 *
4- * Bitcode SDIVF pipeline runs (Setup → Discovery → Implementation → Validation
5- * → Finish) that satisfy Reads, synthesize AssetPack artifacts and Exchange
6- * evidence, and use Finish-phase Delivering only for connected-interface
7- * delivery.
5+ * Settlement / buyer-repo delivery / shippable PR are **not** synthesis work.
6+ * They are exclusive to `execution-pipeline-simple-settle-asset-pack`.
7+ * Modules such as `asset-pack-settlement-rights-delivery` remain in this package
8+ * only as a library for the settle pipeline / host settle path — synthesis
9+ * preprocess/postprocess/Finish must never invoke or project them.
810 */
911
1012import { Executor , Execution } from '@bitcode/execution-generics' ;
@@ -34,10 +36,7 @@ import {
3436 buildAssetPackPreviewBoundary ,
3537 persistAssetPackPreviewBoundary ,
3638} from './asset-pack-preview-boundary' ;
37- import {
38- buildAssetPackSettlementRightsDeliveryBoundary ,
39- persistAssetPackSettlementRightsDeliveryBoundary ,
40- } from './asset-pack-settlement-rights-delivery' ;
39+ // Intentionally no settlement-rights import for synthesis preprocess.
4140import {
4241 buildReadingOperationalTelemetryRepairReadback ,
4342 persistReadingOperationalTelemetryRepairReadback ,
@@ -306,29 +305,15 @@ function factoryPreprocess(): Executor<any, any> {
306305 processedInput . sourceSafePreview = assetPackPreviewBoundary . sourceSafePreview ;
307306 processedInput . assetPackPreviewBoundary = assetPackPreviewBoundary ;
308307 processedInput . assetPackQuoteReceipt = assetPackPreviewBoundary . quoteReceipt ;
309- const suppliedSettlement =
310- processedInput ?. settlementObservation ||
311- processedInput ?. paymentObservation ||
312- processedInput ?. btcPaymentObservation ||
313- null ;
314- if ( suppliedSettlement ) {
315- const settlementBoundary = buildAssetPackSettlementRightsDeliveryBoundary ( {
316- previewBoundary : assetPackPreviewBoundary ,
317- paymentObservation : suppliedSettlement ,
318- finality : processedInput ?. settlementFinality || processedInput ?. btcFinality || undefined ,
319- readerWalletId : processedInput ?. readerWalletId || null ,
320- depositorWalletId : processedInput ?. depositorWalletId || null ,
321- pullRequestTarget : processedInput ?. deliveryTarget || null ,
322- } ) ;
323- persistAssetPackSettlementRightsDeliveryBoundary ( execution , settlementBoundary ) ;
324- persistAssetPackSettlementRightsDeliveryBoundary ( execution . parent as any , settlementBoundary ) ;
325- processedInput . assetPackSettlementRightsDeliveryBoundary = settlementBoundary ;
326- processedInput . assetPackSettlementReplayReceipt = settlementBoundary . replayReceipt ;
327- processedInput . assetPackDeliveryUnlock = settlementBoundary . deliveryUnlock ;
328- }
308+ // Never build settlement rights / delivery unlock during synthesis preprocess.
309+ // Payment observation + PR unlock belong exclusively to settle-asset-pack-pipeline.
310+ delete processedInput . assetPackSettlementRightsDeliveryBoundary ;
311+ delete processedInput . assetPackSettlementReplayReceipt ;
312+ delete processedInput . assetPackDeliveryUnlock ;
329313 }
330314 } catch { }
331315 try {
316+ // settlementBoundary always null on synthesis preprocess path.
332317 const operationalReadback = buildReadingOperationalTelemetryRepairReadback ( {
333318 runId : String ( execution . id || processedInput ?. transactionId || processedInput ?. id || '' ) ,
334319 readNeedRuntime :
@@ -346,11 +331,7 @@ function factoryPreprocess(): Executor<any, any> {
346331 ( execution . get ( 'asset-pack/preview' , 'boundary' ) as any ) ||
347332 ( ( execution . parent as any ) ?. get ?.( 'asset-pack/preview' , 'boundary' ) as any ) ||
348333 null ,
349- settlementBoundary :
350- processedInput ?. assetPackSettlementRightsDeliveryBoundary ||
351- ( execution . get ( 'asset-pack/settlement' , 'boundary' ) as any ) ||
352- ( ( execution . parent as any ) ?. get ?.( 'asset-pack/settlement' , 'boundary' ) as any ) ||
353- null ,
334+ settlementBoundary : null ,
354335 createdAt : new Date ( ) . toISOString ( ) ,
355336 } ) ;
356337 persistReadingOperationalTelemetryRepairReadback ( execution , operationalReadback ) ;
@@ -375,11 +356,7 @@ function factoryPreprocess(): Executor<any, any> {
375356 ( execution . get ( 'asset-pack/preview' , 'boundary' ) as any ) ||
376357 ( ( execution . parent as any ) ?. get ?.( 'asset-pack/preview' , 'boundary' ) as any ) ||
377358 null ,
378- settlementBoundary :
379- processedInput ?. assetPackSettlementRightsDeliveryBoundary ||
380- ( execution . get ( 'asset-pack/settlement' , 'boundary' ) as any ) ||
381- ( ( execution . parent as any ) ?. get ?.( 'asset-pack/settlement' , 'boundary' ) as any ) ||
382- null ,
359+ settlementBoundary : null ,
383360 operationalReadback,
384361 } ) ;
385362 persistReadingInterfaceProductParity ( execution , interfaceParity ) ;
@@ -409,11 +386,7 @@ function factoryPreprocess(): Executor<any, any> {
409386 ( execution . get ( 'asset-pack/preview' , 'boundary' ) as any ) ||
410387 ( ( execution . parent as any ) ?. get ?.( 'asset-pack/preview' , 'boundary' ) as any ) ||
411388 null ,
412- settlementBoundary :
413- processedInput ?. assetPackSettlementRightsDeliveryBoundary ||
414- ( execution . get ( 'asset-pack/settlement' , 'boundary' ) as any ) ||
415- ( ( execution . parent as any ) ?. get ?.( 'asset-pack/settlement' , 'boundary' ) as any ) ||
416- null ,
389+ settlementBoundary : null ,
417390 operationalReadback,
418391 interfaceParity,
419392 } ) ;
@@ -664,6 +637,10 @@ export * from './depository-search';
664637export * from './depository-supply-index' ;
665638export * from './read-fits-finding-runtime' ;
666639export * from './asset-pack-preview-boundary' ;
640+ /**
641+ * Settle-pipeline library only (rights unlock / delivery after payment).
642+ * Synthesis deposit/read SDIVF must not call these builders or project their results.
643+ */
667644export * from './asset-pack-settlement-rights-delivery' ;
668645export * from './reading-operational-telemetry-repair-readback' ;
669646export * from './reading-interface-product-parity' ;
0 commit comments