Skip to content

Commit 893f017

Browse files
V48 Gate 3 (implementation-only): #25 harness deposit-mode plumbing (synthesizeMode + steering into the in-box runner)
The harness can now run the in-box pipeline in DEPOSIT mode (the foundation of #25). synthesizeMode ('deposit'|'read') + deposit steering (obfuscations, protectedIpExclusions, demandContext) flow through buildAssetPackSandboxHarness → PipelineHarnessManifest → the in-box runner INPUT, so the in-box assetPackPipeline resolves deposit mode (resolveSynthesizeAssetPacksMode reads input.synthesizeMode) and runs the deposit SDIVF over the box's local checkout. The runner now surfaces the synthesized implementation:options in evidence.json as depositOptions, so the dispatching route can project them. - types.ts: PipelineHarnessManifest gains synthesizeMode + depositSteering. - manifest.ts: buildAssetPackPipelineHarnessManifest accepts + stores them. - asset-pack-harness.ts: options → manifest; the in-box runner template carries synthesizeMode + steering in the input and depositOptions in the evidence. Tests: deposit-mode plumbing (manifest carries synthesizeMode + steering; defaults to read) + the existing runner-syntax-validity test confirms the template edits compile. pipeline-hosts 6 suites/34 green; tsc clean. The deposit route's sandbox dispatch (reading evidence.depositOptions → projection → persist) is the remaining #25 piece. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d7f1d0a commit 893f017

4 files changed

Lines changed: 56 additions & 0 deletions

File tree

packages/pipeline-hosts/src/__tests__/asset-pack-harness.test.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,35 @@ describe('asset-pack sandbox harness plan', () => {
3939
expect(plan.manifest.expectedEvidenceTables).toContain('deliverable_pipeline_events');
4040
});
4141

42+
it('carries deposit synthesis mode + steering into the manifest (#25)', () => {
43+
const plan = buildAssetPackSandboxHarness({
44+
...baseOptions,
45+
mode: 'asset_pack_pipeline',
46+
source: {
47+
type: 'git',
48+
url: 'https://github.com/engineeredsoftware/ENGI.git',
49+
revision: baseOptions.sourceRevision.commit,
50+
depth: 1,
51+
},
52+
synthesizeMode: 'deposit',
53+
depositSteering: {
54+
obfuscations: 'hide internal names',
55+
protectedIpExclusions: ['secret/'],
56+
demandContext: ['auth'],
57+
},
58+
});
59+
expect(plan.manifest.synthesizeMode).toBe('deposit');
60+
expect(plan.manifest.depositSteering).toEqual({
61+
obfuscations: 'hide internal names',
62+
protectedIpExclusions: ['secret/'],
63+
demandContext: ['auth'],
64+
});
65+
});
66+
67+
it('defaults synthesizeMode to read when unset', () => {
68+
expect(buildAssetPackSandboxHarness(baseOptions).manifest.synthesizeMode).toBe('read');
69+
});
70+
4271
it('requires a repository source before planning the real pipeline mode', () => {
4372
expect(() =>
4473
buildAssetPackSandboxHarness({

packages/pipeline-hosts/src/asset-pack-harness.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ export interface BuildAssetPackSandboxHarnessOptions {
4545
commandEnvironment?: Record<string, string>;
4646
installDependencies?: boolean;
4747
sourceOverlayPatch?: Buffer | string;
48+
/** V48 Gate 3 #25: run the in-box synthesis in deposit (vs read) mode. */
49+
synthesizeMode?: 'deposit' | 'read';
50+
/** Deposit steering for the in-box deposit synthesis (source-safe). */
51+
depositSteering?: {
52+
obfuscations?: string | null;
53+
protectedIpExclusions?: string[];
54+
demandContext?: string[];
55+
};
4856
}
4957

5058
export function buildAssetPackSandboxHarness(
@@ -87,6 +95,8 @@ export function buildAssetPackSandboxHarness(
8795
sourceRevision: options.sourceRevision,
8896
sourceOverlay,
8997
commandEnvironment,
98+
synthesizeMode: options.synthesizeMode ?? 'read',
99+
depositSteering: options.depositSteering,
90100
});
91101

92102
const commands = buildCommands(
@@ -1783,6 +1793,10 @@ try {
17831793
writtenAssetType: 'asset_pack',
17841794
deliveryMechanismTemplate: 'pull-request',
17851795
harness: manifest,
1796+
synthesizeMode: manifest.synthesizeMode || 'read',
1797+
obfuscations: (manifest.depositSteering && manifest.depositSteering.obfuscations) || null,
1798+
protectedIpExclusions: (manifest.depositSteering && manifest.depositSteering.protectedIpExclusions) || [],
1799+
demandContext: (manifest.depositSteering && manifest.depositSteering.demandContext) || [],
17861800
};
17871801
17881802
record({ type: 'pipeline-start', stage: 'read-comprehension', sourceRevision: manifest.sourceRevision });
@@ -2145,6 +2159,7 @@ try {
21452159
manifestRoot,
21462160
manifest,
21472161
output,
2162+
depositOptions: findExecutionValueDown(execution, 'implementation', 'options') || null,
21482163
fitResult,
21492164
depositorySearch,
21502165
sourceSafePreview: settledSourceSafePreview,

packages/pipeline-hosts/src/manifest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ export function buildAssetPackPipelineHarnessManifest(input: {
112112
commandEnvironment?: Record<string, string | undefined>;
113113
readNeed?: unknown;
114114
requireAcceptedReadNeed?: boolean;
115+
synthesizeMode?: 'deposit' | 'read';
116+
depositSteering?: PipelineHarnessManifest['depositSteering'];
115117
createdAt?: string;
116118
}): PipelineHarnessManifest {
117119
assertNonEmpty(input.read.id, 'read.id');
@@ -130,6 +132,8 @@ export function buildAssetPackPipelineHarnessManifest(input: {
130132
deposit: input.deposit,
131133
sourceRevision: input.sourceRevision,
132134
sourceOverlay: input.sourceOverlay,
135+
synthesizeMode: input.synthesizeMode ?? 'read',
136+
depositSteering: input.depositSteering,
133137
host: {
134138
hostKind: VERCEL_SANDBOX_HOST_CAPABILITIES.hostKind,
135139
provider: VERCEL_SANDBOX_HOST_CAPABILITIES.provider,

packages/pipeline-hosts/src/types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ export interface PipelineHarnessManifest {
102102
deposit: PipelineDepositReference;
103103
sourceRevision: PipelineSourceRevision;
104104
sourceOverlay?: PipelineHarnessSourceOverlay;
105+
/** V48 Gate 3 #25: the synthesis lens the in-box pipeline runs (deposit | read). */
106+
synthesizeMode?: 'deposit' | 'read';
107+
/** Deposit steering for the in-box deposit synthesis (source-safe). */
108+
depositSteering?: {
109+
obfuscations?: string | null;
110+
protectedIpExclusions?: string[];
111+
demandContext?: string[];
112+
};
105113
host: Pick<
106114
PipelineHostCapabilities,
107115
| 'hostKind'

0 commit comments

Comments
 (0)