Skip to content

Commit 7eae90a

Browse files
V48 (impl-only): Cut shippables dual keys; settleDelivery only
Pre-production: no dual-read/write of shippables or shippable_templates. Completion, history, stream, host emit settleDelivery only. Template prefs use delivery_templates only. Drop MeasureAgentOutput/MeasurementCategory/factoryMeasureAgentAbsolutes aliases. Base SDIVF is phase-shell only (no agents in sdivf-phases).
1 parent 21ffb23 commit 7eae90a

42 files changed

Lines changed: 165 additions & 202 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/uapi/app/api/auxillaries/template-preferences/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import userTemplatesDefaultMock from '@/mocks/user-template-preferences-default.
1111
import userTemplatesEmptyMock from '@/mocks/user-template-preferences-empty.json';
1212

1313
const EMPTY_TEMPLATE_PREFERENCES = {
14-
shippable_templates: {},
14+
delivery_templates: {},
1515
evidence_document_templates: {},
1616
};
1717

apps/uapi/components/bitcode/pipeline/ExecutionsCompleteHeaderContent/ExecutionsCompleteHeaderContent.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ export type RepoSnapshot = { org: string; repo: string; branch: string; commit:
7878

7979
export type HeaderAssetPackCompletion = {
8080
summary?: string | null;
81+
/** Buyer-repo delivery after settle Simple (sole field name). */
8182
settleDelivery?: HeaderSettleDelivery;
82-
/** Historical dual-write of settleDelivery. */
83-
shippables?: HeaderSettleDelivery;
8483
assetPackSynthesisArtifacts?: HeaderSettleDelivery;
8584
writtenAssets?: HeaderSettleDelivery;
8685
deliveryMechanism?: HeaderSettleDelivery;
@@ -344,13 +343,16 @@ export function getHeaderWrittenAssets(
344343
);
345344
}
346345

346+
/**
347+
* Resolve buyer-repo delivery for the executions header.
348+
* settleDelivery first; deliveryMechanism is a separate connected-interface
349+
* projection used only when settleDelivery is absent. Does not invent PRs.
350+
*/
347351
export function getHeaderSettleDelivery(
348352
assetPackCompletion?: HeaderAssetPackCompletion | null,
349353
): HeaderSettleDelivery | null {
350-
// Prefer settleDelivery; dual-read historical shippables.
351354
return (
352355
assetPackCompletion?.settleDelivery ||
353-
assetPackCompletion?.shippables ||
354356
assetPackCompletion?.deliveryMechanism ||
355357
null
356358
);

apps/uapi/components/bitcode/pipeline/ExecutionsPageClient/ExecutionsPageClient.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ const calculateInstructionTimeoutSeconds = (confidence: number): number => {
5252
};
5353

5454
export function ExecutionsClient() {
55-
// Settle delivery panels: buyer PR after settle, not SDIVF Finish.
55+
// Settle delivery panels: buyer-repo PR/summary from settle Simple
56+
// (ship-asset-pack-patch-pr after rights). Separate from Deposit/Read SDIVF
57+
// Finish, which only stores synthesis evidence and closes the run.
5658
const router = useRouter();
5759
const searchParams = useSearchParams();
5860
const runId = searchParams.get('runId');
@@ -66,7 +68,7 @@ export function ExecutionsClient() {
6668
const mergedTemplates: DeliveryTemplates = React.useMemo(() => {
6769
if (!preferences) return templatesSource;
6870
const filterByPrefs = (category: keyof DeliveryTemplates, list: DeliveryTemplates[keyof DeliveryTemplates]) => {
69-
const prefIds = preferences.shippable_templates?.[category] ?? [];
71+
const prefIds = preferences.delivery_templates?.[category] ?? [];
7072
if (!prefIds.length) return list;
7173
return list.filter((t) => prefIds.includes(t.id));
7274
};
@@ -348,7 +350,6 @@ export function ExecutionsClient() {
348350
const deliveryMechanismForPanels =
349351
getHeaderSettleDelivery(historyAssetPackCompletion) ||
350352
headerPostprocessed?.settleDelivery ||
351-
headerPostprocessed?.shippables ||
352353
headerPostprocessed?.deliveryMechanism ||
353354
null;
354355
const settleDeliveryForPanels = mergeHeaderSettleDelivery(

apps/uapi/components/bitcode/pipeline/SettleDeliveryDocPanel/SettleDeliveryDocPanel.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ export interface SettleDeliveryDocPanelProps {
3434

3535
/**
3636
* Renders settle delivery summary (buyer PR when present) plus synthesis summary.
37-
* PR shipping is settle-asset-pack-pipeline only — not SDIVF Finish.
37+
*
38+
* settleDelivery is the output surface of settle Simple (BTC → BTD → co-own →
39+
* ship-asset-pack-patch-pr). It is not a phase of base SDIVF and not Finish of
40+
* Deposit/Read product SDIVF pipelines.
3841
*/
3942
export function SettleDeliveryDocPanel({ settleDelivery, summaryOpen, onToggleSummary }: SettleDeliveryDocPanelProps) {
4043
const tldr: React.ReactNode[] = [];

apps/uapi/components/bitcode/pipeline/models/pipeline-activity-history.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ export function mapExecutionHistoryRunToWorkspaceRun(run: PipelineExecution): Wo
668668
run.asset_pack_completion?.summary ||
669669
run.asset_pack_completion?.assetPackSynthesisArtifacts?.summary ||
670670
run.asset_pack_completion?.writtenAssets?.summary ||
671-
run.asset_pack_completion?.settleDelivery?.summary || run.asset_pack_completion?.shippables?.summary ||
671+
run.asset_pack_completion?.settleDelivery?.summary ||
672672
run.asset_pack_completion?.deliveryMechanism?.summary ||
673673
failureSummary ||
674674
null,

apps/uapi/hooks/useTemplatePreferences.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { useCallback, useEffect, useState } from 'react';
22

33
interface UserTemplatePreferencesApiResponse {
4-
shippable_templates?: Record<string, string[]>;
54
delivery_templates?: Record<string, string[]>;
65
evidence_document_templates?: Record<string, string[]>;
76
}
87

98
export interface UserTemplatePreferences {
10-
shippable_templates: Record<string, string[]>;
119
delivery_templates: Record<string, string[]>;
1210
evidence_document_templates: Record<string, string[]>;
1311
}
@@ -43,8 +41,7 @@ export const useTemplatePreferences = (): UseTemplatePreferencesHook => {
4341
const res = await fetch('/api/auxillaries/template-preferences');
4442
if (res.status === 401 || res.status === 404) {
4543
setPreferences({
46-
shippable_templates: {},
47-
delivery_templates: {},
44+
delivery_templates: {},
4845
evidence_document_templates: {},
4946
});
5047
return;
@@ -65,13 +62,11 @@ export const useTemplatePreferences = (): UseTemplatePreferencesHook => {
6562
const data = (await res.json()) as UserTemplatePreferencesApiResponse;
6663

6764
setPreferences({
68-
shippable_templates: data.delivery_templates ?? data.shippable_templates ?? {},
69-
delivery_templates: data.delivery_templates ?? data.shippable_templates ?? {},
65+
delivery_templates: data.delivery_templates ?? {},
7066
evidence_document_templates: data.evidence_document_templates ?? {},
7167
});
7268
} catch (err) {
7369
setPreferences({
74-
shippable_templates: {},
7570
delivery_templates: {},
7671
evidence_document_templates: {},
7772
});

apps/uapi/jest.config.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ module.exports = {
202202
'<rootDir>/tests/productRoutes.test.ts',
203203
'<rootDir>/tests/repositoryContext.test.ts',
204204
'<rootDir>/tests/pipelineRunData.test.ts',
205+
// Settle delivery completion mapping (settleDelivery only; pre-production)
206+
'<rootDir>/tests/streamParser.completion.test.ts',
207+
'<rootDir>/tests/executionsHeaderSemanticMirrors.test.ts',
205208
'<rootDir>/tests/transactionReadiness.test.ts',
206209
'<rootDir>/tests/pipelineSelectionQuery.test.ts',
207210
'<rootDir>/tests/pipelineActivityHistory.test.ts',

apps/uapi/mocking/engines/StreamingPipelineEngine.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ export class StreamingPipelineEngine {
654654
paths: ['src/mock.ts', 'README.md']
655655
}
656656
};
657-
// Settle delivery surface; dual-write historical shippables for reread.
657+
// Mock settle Simple delivery surface; settleDelivery only (no shippables).
658658
const settleDelivery = {
659659
pullRequest: {
660660
url: 'https://github.com/mock/repo/pull/123',
@@ -669,7 +669,6 @@ export class StreamingPipelineEngine {
669669
summary: writtenAssets.summary,
670670
display: 'Mock Asset Pack',
671671
settleDelivery,
672-
shippables: settleDelivery,
673672
assetPackSynthesisArtifacts: {
674673
...settleDelivery,
675674
proofEvidence: ['mock AssetPack evidence captured for reread'],

apps/uapi/mocking/generators/MockDataGenerators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,8 @@ class CompletionDataGenerator extends BaseDataGenerator {
477477
paths: ['src/main.ts', 'README.md', 'package.json'].slice(0, Math.floor(Math.random() * 3) + 1)
478478
} : null
479479
};
480-
// Settle delivery surface (buyer PR after rights); dual-write historical key.
480+
// Mock settle Simple delivery surface (buyer PR after rights). New-world
481+
// mocks emit settleDelivery only — not the legacy shippables key.
481482
const settleDelivery = {
482483
pullRequest: hasPR ? {
483484
url: 'https://github.com/mock/repo/pull/123',
@@ -493,7 +494,6 @@ class CompletionDataGenerator extends BaseDataGenerator {
493494
summary: writtenAssets.summary || this.generateRealisticText(25),
494495
display: 'Mock Asset Pack',
495496
settleDelivery,
496-
shippables: settleDelivery,
497497
assetPackSynthesisArtifacts: {
498498
...settleDelivery,
499499
proofEvidence: ['mock AssetPack evidence captured for reread'],

apps/uapi/mocks/user-template-preferences-default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"shippable_templates": {
2+
"delivery_templates": {
33
"pullRequests": ["pr-quick-todo"]
44
},
55
"evidence_document_templates": {

0 commit comments

Comments
 (0)