fix: address composite input contract review

This commit is contained in:
lda
2026-08-13 21:44:29 +07:00 Verified
parent 1bb684bfcd
commit cca1be891f
18 changed files with 455 additions and 172 deletions
@@ -6,6 +6,7 @@ import {
type WorkflowOperationResult,
} from "../generated/workflow-contract.js";
import { translateJsonSchema } from "./translator.js";
import { hasBoundedInputExpressionPayload } from "./input-expression-limits.js";
type RuntimeOperationName = keyof typeof workflowRuntimeContract.operations;
const MAX_RUNTIME_VALUE_DEPTH = 64;
@@ -47,6 +48,10 @@ const BoundedRuntimeValueSchema = Schema.Unknown.pipe(
message: () =>
`runtime value exceeds ${MAX_RUNTIME_VALUE_DEPTH} nested containers`,
}),
Schema.filter((value) => hasBoundedInputExpressionPayload(value), {
message: () =>
"runtime value contains an input expression over the 1024-node budget",
}),
);
const translatedAst = (schema: unknown): AST.AST => {