Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/data/schemas/v0/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55279,6 +55279,9 @@ const schema: Record<string, any> = {
},
"instructions": {
"type": "string"
},
"llmConnectorRef": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -55314,6 +55317,9 @@ const schema: Record<string, any> = {
},
"instructions": {
"type": "string"
},
"llmConnectorRef": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -83615,6 +83621,18 @@ const schema: Record<string, any> = {
}
]
},
"ignoreMissingValues": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "string",
"pattern": "(<\\+.+>.*)",
"minLength": 1
}
]
},
"skipPipelineVariables": {
"oneOf": [
{
Expand Down
18 changes: 18 additions & 0 deletions src/data/schemas/v0/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31297,6 +31297,18 @@ const schema: Record<string, any> = {
}
]
},
"ignoreMissingValues": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "string",
"pattern": "(<\\+.+>.*)",
"minLength": 1
}
]
},
"skipPipelineVariables": {
"oneOf": [
{
Expand Down Expand Up @@ -132396,6 +132408,9 @@ const schema: Record<string, any> = {
},
"instructions": {
"type": "string"
},
"llmConnectorRef": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -132431,6 +132446,9 @@ const schema: Record<string, any> = {
},
"instructions": {
"type": "string"
},
"llmConnectorRef": {
"type": "string"
}
}
}
Expand Down
50 changes: 50 additions & 0 deletions tests/schemas/schema-bundle-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,54 @@ describe("schema bundle contract", () => {
expect(dynamicStage.properties.dynamic.properties).toHaveProperty("source-config");
}
});

it("includes upstream llmConnectorRef on IACMRemediationAgentInfo in v0 pipeline and template", () => {
for (const key of ["pipeline", "template"] as const) {
const defs = SCHEMAS[key].definitions as Record<string, Record<string, unknown>>;
const iacmSteps = defs.pipeline.steps.iacm as Record<string, unknown>;

expect(iacmSteps).toHaveProperty("IACMRemediationAgentStepNode");
expect(iacmSteps).toHaveProperty("IACMRemediationAgentInfo");

const stepNode = iacmSteps.IACMRemediationAgentStepNode as {
properties: { type: { enum: string[] } };
};
expect(stepNode.properties.type.enum).toContain("IACMRemediationAgent");

const agentInfo = iacmSteps.IACMRemediationAgentInfo as {
properties: Record<string, { type?: string }>;
};
expect(agentInfo.properties).toHaveProperty("llmConnectorRef");
expect(agentInfo.properties.llmConnectorRef.type).toBe("string");
expect(agentInfo.properties).toHaveProperty("instructions");
expect(agentInfo.properties).toHaveProperty("remediationType");
}
});

it("includes upstream ignoreMissingValues on UpdateReleaseRepoStepInfo in v0 pipeline and template", () => {
for (const key of ["pipeline", "template"] as const) {
const defs = SCHEMAS[key].definitions as Record<string, Record<string, unknown>>;
const cdSteps = defs.pipeline.steps.cd as Record<string, unknown>;

expect(cdSteps).toHaveProperty("UpdateReleaseRepoStepNode");
expect(cdSteps).toHaveProperty("UpdateReleaseRepoStepInfo");

const stepNode = cdSteps.UpdateReleaseRepoStepNode as {
properties: { type: { enum: string[] } };
};
expect(stepNode.properties.type.enum).toContain("GitOpsUpdateReleaseRepo");

const stepInfo = cdSteps.UpdateReleaseRepoStepInfo as {
properties: Record<string, { oneOf?: Array<{ type?: string; pattern?: string }> }>;
};
expect(stepInfo.properties).toHaveProperty("ignoreMissingValues");
const ignoreMissing = stepInfo.properties.ignoreMissingValues;
expect(ignoreMissing.oneOf).toEqual(
expect.arrayContaining([
expect.objectContaining({ type: "boolean" }),
expect.objectContaining({ type: "string", pattern: "(<\\+.+>.*)" }),
]),
);
}
});
});
32 changes: 32 additions & 0 deletions tests/tools/harness-schema-tool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,38 @@ describe("harness_schema nested static definition lookup", () => {
expect(schema.properties?.type?.enum).toContain("DeployAwsAgentCoreRevision");
});

it("resolves newly synced IACMRemediationAgentInfo with llmConnectorRef from v0 pipeline", async () => {
const server = makeMcpServer();
registerSchemaTool(server, undefined, undefined);
const result = await server.call("harness_schema", {
resource_type: "pipeline",
path: "IACMRemediationAgentInfo",
});
const parsed = parseResult(result) as Record<string, unknown>;

expect(result.isError).toBeFalsy();
expect(parsed.path).toBe("steps.iacm.IACMRemediationAgentInfo");
expect(parsed.requested_path).toBe("IACMRemediationAgentInfo");
const schema = parsed.schema as { properties?: Record<string, { type?: string }> };
expect(schema.properties?.llmConnectorRef?.type).toBe("string");
});

it("resolves newly synced UpdateReleaseRepoStepNode from v0 pipeline", async () => {
const server = makeMcpServer();
registerSchemaTool(server, undefined, undefined);
const result = await server.call("harness_schema", {
resource_type: "pipeline",
path: "UpdateReleaseRepoStepNode",
});
const parsed = parseResult(result) as Record<string, unknown>;

expect(result.isError).toBeFalsy();
expect(parsed.path).toBe("steps.cd.UpdateReleaseRepoStepNode");
expect(parsed.requested_path).toBe("UpdateReleaseRepoStepNode");
const schema = parsed.schema as { properties?: { type?: { enum?: string[] } } };
expect(schema.properties?.type?.enum).toContain("GitOpsUpdateReleaseRepo");
});

it("resolves IdentitiesConfig from v0 pipeline common definitions", async () => {
const server = makeMcpServer();
registerSchemaTool(server, undefined, undefined);
Expand Down
Loading